Loading Documentation/devicetree/bindings/power/reset/msm-poweroff.txt +4 −0 Original line number Diff line number Diff line Loading @@ -9,6 +9,10 @@ Required Properties: -compatible: "qcom,pshold" -reg: Specifies the physical address of the ps-hold register Optional Properties: -qcom,force-warm-reboot: Issue a warm reboot, even for the traditional cases where hard reboot is issued. Example: restart@fc4ab000 { Loading arch/arm64/boot/dts/qcom/sdxprairie.dtsi +8 −0 Original line number Diff line number Diff line Loading @@ -150,6 +150,14 @@ }; }; restart@c264000 { compatible = "qcom,pshold"; reg = <0xc264000 0x4>, <0x1fd3000 0x4>; reg-names = "pshold-base", "tcsr-boot-misc-detect"; qcom,force-warm-reboot; }; clock_gcc: qcom,gcc { compatible = "qcom,dummycc"; clock-output-names = "gcc_clocks"; Loading drivers/power/reset/msm-poweroff.c +10 −2 Original line number Diff line number Diff line /* Copyright (c) 2013-2017, The Linux Foundation. All rights reserved. /* Copyright (c) 2013-2018, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -83,6 +83,8 @@ static void *kaslr_imem_addr; #endif static bool scm_dload_supported; static bool force_warm_reboot; static int dload_set(const char *val, const struct kernel_param *kp); /* interface for exporting attributes */ struct reset_attribute { Loading Loading @@ -286,8 +288,11 @@ static void msm_restart_prepare(const char *cmd) (cmd != NULL && cmd[0] != '\0')); } if (force_warm_reboot) pr_info("Forcing a warm reset of the system\n"); /* Hard reset the PMIC unless memory contents must be maintained. */ if (need_warm_reset) if (force_warm_reboot || need_warm_reset) qpnp_pon_system_pwr_off(PON_POWER_OFF_WARM_RESET); else qpnp_pon_system_pwr_off(PON_POWER_OFF_HARD_RESET); Loading Loading @@ -649,6 +654,9 @@ static int msm_restart_probe(struct platform_device *pdev) if (!download_mode) scm_disable_sdi(); force_warm_reboot = of_property_read_bool(dev->of_node, "qcom,force-warm-reboot"); return 0; err_restart_reason: Loading Loading
Documentation/devicetree/bindings/power/reset/msm-poweroff.txt +4 −0 Original line number Diff line number Diff line Loading @@ -9,6 +9,10 @@ Required Properties: -compatible: "qcom,pshold" -reg: Specifies the physical address of the ps-hold register Optional Properties: -qcom,force-warm-reboot: Issue a warm reboot, even for the traditional cases where hard reboot is issued. Example: restart@fc4ab000 { Loading
arch/arm64/boot/dts/qcom/sdxprairie.dtsi +8 −0 Original line number Diff line number Diff line Loading @@ -150,6 +150,14 @@ }; }; restart@c264000 { compatible = "qcom,pshold"; reg = <0xc264000 0x4>, <0x1fd3000 0x4>; reg-names = "pshold-base", "tcsr-boot-misc-detect"; qcom,force-warm-reboot; }; clock_gcc: qcom,gcc { compatible = "qcom,dummycc"; clock-output-names = "gcc_clocks"; Loading
drivers/power/reset/msm-poweroff.c +10 −2 Original line number Diff line number Diff line /* Copyright (c) 2013-2017, The Linux Foundation. All rights reserved. /* Copyright (c) 2013-2018, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -83,6 +83,8 @@ static void *kaslr_imem_addr; #endif static bool scm_dload_supported; static bool force_warm_reboot; static int dload_set(const char *val, const struct kernel_param *kp); /* interface for exporting attributes */ struct reset_attribute { Loading Loading @@ -286,8 +288,11 @@ static void msm_restart_prepare(const char *cmd) (cmd != NULL && cmd[0] != '\0')); } if (force_warm_reboot) pr_info("Forcing a warm reset of the system\n"); /* Hard reset the PMIC unless memory contents must be maintained. */ if (need_warm_reset) if (force_warm_reboot || need_warm_reset) qpnp_pon_system_pwr_off(PON_POWER_OFF_WARM_RESET); else qpnp_pon_system_pwr_off(PON_POWER_OFF_HARD_RESET); Loading Loading @@ -649,6 +654,9 @@ static int msm_restart_probe(struct platform_device *pdev) if (!download_mode) scm_disable_sdi(); force_warm_reboot = of_property_read_bool(dev->of_node, "qcom,force-warm-reboot"); return 0; err_restart_reason: Loading