static int restart_mode;
-static void *restart_reason, *dload_type_addr;
+static void *restart_reason;
static bool scm_pmic_arbiter_disable_supported;
static bool scm_deassert_ps_hold_supported;
/* Download mode master kill-switch */
* There is no API from TZ to re-enable the registers.
* So the SDI cannot be re-enabled when it already by-passed.
*/
-static int download_mode = 1;
-static struct kobject dload_kobj;
#ifdef CONFIG_QCOM_DLOAD_MODE
#define EDL_MODE_PROP "qcom,msm-imem-emergency_download_mode"
#endif
static int in_panic;
-static void *dload_mode_addr;
+static int download_mode = 1;
+static struct kobject dload_kobj;
+static void *dload_mode_addr, *dload_type_addr;
static bool dload_mode_enabled;
static void *emergency_dload_mode_addr;
#ifdef CONFIG_RANDOMIZE_BASE
static void msm_restart_prepare(const char *cmd)
{
-#ifdef CONFIG_QCOM_DLOAD_MODE
bool need_warm_reset = false;
+#ifdef CONFIG_QCOM_DLOAD_MODE
/* Write download mode flags if we're panic'ing
* Write download mode flags if restart_mode says so
return;
}
+#ifdef CONFIG_QCOM_DLOAD_MODE
static ssize_t attr_show(struct kobject *kobj, struct attribute *attr,
char *buf)
{
static struct attribute_group reset_attr_group = {
.attrs = reset_attrs,
};
+#endif
static int msm_restart_probe(struct platform_device *pdev)
{
if (scm_is_call_available(SCM_SVC_PWR, SCM_IO_DEASSERT_PS_HOLD) > 0)
scm_deassert_ps_hold_supported = true;
+#ifdef CONFIG_QCOM_DLOAD_MODE
download_mode = scm_is_secure_device();
set_dload_mode(download_mode);
if (!download_mode)
scm_disable_sdi();
-
+#endif
return 0;
err_restart_reason: