Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2ea75ab0 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "power: reset: Disable sdi if the CONFIG_QCOM_DLOAD_MODE is not defined"

parents dd487206 cd47e863
Loading
Loading
Loading
Loading
+11 −4
Original line number Diff line number Diff line
@@ -50,20 +50,23 @@
#define SCM_DLOAD_BOTHDUMPS	(SCM_DLOAD_MINIDUMP | SCM_DLOAD_FULLDUMP)

static int restart_mode;
static void __iomem *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 */
static void __iomem *msm_ps_hold;
static phys_addr_t tcsr_boot_misc_detect;
static void scm_disable_sdi(void);

#ifdef CONFIG_QCOM_DLOAD_MODE
/* Runtime could be only changed value once.
 * 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;
static void scm_disable_sdi(void);

#else
static const int download_mode;
#endif

#ifdef CONFIG_QCOM_DLOAD_MODE
#define EDL_MODE_PROP "qcom,msm-imem-emergency_download_mode"
@@ -81,6 +84,8 @@ static void *emergency_dload_mode_addr;
static void *kaslr_imem_addr;
#endif
static bool scm_dload_supported;
static struct kobject dload_kobj;
static void *dload_type_addr;

static int dload_set(const char *val, const struct kernel_param *kp);
/* interface for exporting attributes */
@@ -431,6 +436,7 @@ static void do_msm_poweroff(void)
	pr_err("Powering off has failed\n");
}

#ifdef CONFIG_QCOM_DLOAD_MODE
static ssize_t attr_show(struct kobject *kobj, struct attribute *attr,
				char *buf)
{
@@ -561,6 +567,7 @@ static struct attribute *reset_attrs[] = {
static struct attribute_group reset_attr_group = {
	.attrs = reset_attrs,
};
#endif

static int msm_restart_probe(struct platform_device *pdev)
{