Loading Documentation/devicetree/bindings/power_supply/msm-poweroff.txt +7 −0 Original line number Diff line number Diff line Loading @@ -9,6 +9,13 @@ Required Properties: -compatible: "qcom,pshold" -reg: Specifies the physical address of the ps-hold register Optional Properties: -reg: A secondary reg address/size pair may be provided, to specify the address of the TCSR_BOOT_MISC_DETECT register. This address is typically used to configure the type of reset desired. Omitting this address implies that the reset type shall be configured by means of a call to the secure environment. Example: restart@fc4ab000 { Loading drivers/power/reset/msm-poweroff.c +10 −1 Original line number Diff line number Diff line Loading @@ -50,6 +50,7 @@ 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; #ifdef CONFIG_MSM_DLOAD_MODE #define EDL_MODE_PROP "qcom,msm-imem-emergency_download_mode" Loading Loading @@ -84,8 +85,12 @@ int scm_set_dload_mode(int arg1, int arg2) .arginfo = SCM_ARGS(2), }; if (!scm_dload_supported) if (!scm_dload_supported) { if (tcsr_boot_misc_detect) return scm_io_write(tcsr_boot_misc_detect, arg1); return 0; } if (!is_scm_armv8()) return scm_call_atomic2(SCM_SVC_BOOT, SCM_DLOAD_CMD, arg1, Loading Loading @@ -401,6 +406,10 @@ static int msm_restart_probe(struct platform_device *pdev) if (IS_ERR(msm_ps_hold)) return PTR_ERR(msm_ps_hold); mem = platform_get_resource(pdev, IORESOURCE_MEM, 1); if (mem) tcsr_boot_misc_detect = mem->start; pm_power_off = do_msm_poweroff; arm_pm_restart = do_msm_restart; Loading Loading
Documentation/devicetree/bindings/power_supply/msm-poweroff.txt +7 −0 Original line number Diff line number Diff line Loading @@ -9,6 +9,13 @@ Required Properties: -compatible: "qcom,pshold" -reg: Specifies the physical address of the ps-hold register Optional Properties: -reg: A secondary reg address/size pair may be provided, to specify the address of the TCSR_BOOT_MISC_DETECT register. This address is typically used to configure the type of reset desired. Omitting this address implies that the reset type shall be configured by means of a call to the secure environment. Example: restart@fc4ab000 { Loading
drivers/power/reset/msm-poweroff.c +10 −1 Original line number Diff line number Diff line Loading @@ -50,6 +50,7 @@ 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; #ifdef CONFIG_MSM_DLOAD_MODE #define EDL_MODE_PROP "qcom,msm-imem-emergency_download_mode" Loading Loading @@ -84,8 +85,12 @@ int scm_set_dload_mode(int arg1, int arg2) .arginfo = SCM_ARGS(2), }; if (!scm_dload_supported) if (!scm_dload_supported) { if (tcsr_boot_misc_detect) return scm_io_write(tcsr_boot_misc_detect, arg1); return 0; } if (!is_scm_armv8()) return scm_call_atomic2(SCM_SVC_BOOT, SCM_DLOAD_CMD, arg1, Loading Loading @@ -401,6 +406,10 @@ static int msm_restart_probe(struct platform_device *pdev) if (IS_ERR(msm_ps_hold)) return PTR_ERR(msm_ps_hold); mem = platform_get_resource(pdev, IORESOURCE_MEM, 1); if (mem) tcsr_boot_misc_detect = mem->start; pm_power_off = do_msm_poweroff; arm_pm_restart = do_msm_restart; Loading