[RAMEN9610-13098][COMMON] soc: samsung: exynos-reboot: clear RAMDUMP SCRATCH register
authorYoungmin Nam <youngmin.nam@samsung.com>
Mon, 11 Mar 2019 08:34:07 +0000 (17:34 +0900)
committerhskang <hs1218.kang@samsung.com>
Wed, 13 Mar 2019 12:35:28 +0000 (21:35 +0900)
This patch clears RAMDUMP SCRATCH register in case of device power off.

As soon as the devcie power is down and then the device power is up with pin reset,
the device can enter fastboot mode when power up.
To avoid this situation we should clear RAMDUMP SCRATCH register.

Change-Id: I01c05fa6c67bc8ea1c7dcd11a4e2777f279c87af
Signed-off-by: Youngmin Nam <youngmin.nam@samsung.com>
drivers/soc/samsung/exynos-reboot.c
lib/debug-snapshot-local.h

index 399c0cf1d87cdaaab57de5a19b9ca42ea7be1cc3..ed6f086397c66b93df9a7b2b82c48ae5d5e3ee7c 100644 (file)
@@ -21,6 +21,7 @@
 #include <linux/reboot.h>
 #include <linux/soc/samsung/exynos-soc.h>
 #include <linux/debug-snapshot.h>
+#include "../../../lib/debug-snapshot-local.h"
 
 #ifdef CONFIG_EXYNOS_ACPM
 #include <soc/samsung/acpm_ipc_ctrl.h>
@@ -246,6 +247,7 @@ static void exynos_power_off(void)
 #ifdef CONFIG_EXYNOS_ACPM
                        exynos_acpm_reboot();
 #endif
+                       dbg_snapshot_scratch_reg(DSS_SIGN_RESET);
                        pr_emerg("%s: Set PS_HOLD Low.\n", __func__);
                        writel(readl(exynos_pmu_base + PS_HOLD_CONTROL) & 0xFFFFFEFF,
                                                exynos_pmu_base + PS_HOLD_CONTROL);
index 09b7603aeaee4d59a137e7390e9babb3c8f2204b..4c9114db612b28c885dc249e9d2062f6998c49a7 100644 (file)
@@ -23,8 +23,6 @@
 #include <linux/clk-provider.h>
 #endif
 
-extern void (*arm_pm_restart)(char str, const char *cmd);
-
 extern void dbg_snapshot_init_log_idx(void);
 extern void dbg_snapshot_init_utils(void);
 extern void dbg_snapshot_init_helper(void);