[COMMON] lib: dss: support soc_post_reboot_entry/exit
authorHosung Kim <hosung0.kim@samsung.com>
Thu, 24 May 2018 04:46:31 +0000 (13:46 +0900)
committerYoungmin Nam <youngmin.nam@samsung.com>
Fri, 29 Jun 2018 09:18:12 +0000 (18:18 +0900)
Change-Id: Ifbc756ba82fe3755adaf8272f986151335b4d70c
Signed-off-by: Hosung Kim <hosung0.kim@samsung.com>
drivers/soc/samsung/debug/exynos-helper.c
include/linux/debug-snapshot-helper.h
lib/debug-snapshot-helper.c

index 53699bb27865a806558bad0e02e96682df6e4303..0a197bc3d6a5387a3747bfc880b72536a0712055 100644 (file)
@@ -74,6 +74,17 @@ static void exynos_post_panic_exit(void *val)
 
 }
 
+static void exynos_post_reboot_entry(void *val)
+{
+       /* TODO: Something */
+
+}
+
+static void exynos_post_reboot_exit(void *val)
+{
+       flush_cache_all();
+}
+
 static void exynos_save_context_entry(void *val)
 {
 #ifdef CONFIG_EXYNOS_CORESIGHT_ETR
@@ -127,6 +138,8 @@ struct dbg_snapshot_helper_ops exynos_debug_ops = {
        .soc_prepare_panic_exit = exynos_prepare_panic_exit,
        .soc_post_panic_entry   = exynos_post_panic_entry,
        .soc_post_panic_exit    = exynos_post_panic_exit,
+       .soc_post_reboot_entry  = exynos_post_reboot_entry,
+       .soc_post_reboot_exit   = exynos_post_reboot_exit,
        .soc_save_context_entry = exynos_save_context_entry,
        .soc_save_context_exit  = exynos_save_context_exit,
        .soc_start_watchdog     = exynos_start_watchdog,
index 8a04ad8da4ca0d3984d90bff6394eca9fb323555..2106cef5c8ae707ff87e08b82ea061935e0dd444 100644 (file)
@@ -25,6 +25,9 @@ struct dbg_snapshot_helper_ops {
        void (*soc_post_panic_entry)(void *);
        void (*soc_post_panic_exit)(void *);
 
+       void (*soc_post_reboot_entry)(void *);
+       void (*soc_post_reboot_exit)(void *);
+
        void (*soc_save_context_entry)(void *);
        void (*soc_save_context_exit)(void *);
 
index 7bc4b3af55269cf7194ff02b389467772e6a66ec..3bdc0c162eaab259b90f7d35b876766e95f1e297 100644 (file)
@@ -305,6 +305,8 @@ int dbg_snapshot_post_reboot(char *cmd)
        if (unlikely(!dss_base.enabled))
                return 0;
 
+       dss_soc_ops->soc_post_reboot_entry(NULL);
+
        /* clear DSS_SIGN_PANIC when normal reboot */
        for_each_possible_cpu(cpu) {
                dbg_snapshot_set_core_panic_stat(DSS_SIGN_RESET, cpu);
@@ -321,6 +323,8 @@ int dbg_snapshot_post_reboot(char *cmd)
 
        dbg_snapshot_save_context(NULL);
 
+       dss_soc_ops->soc_post_reboot_exit(NULL);
+
        return 0;
 }
 EXPORT_SYMBOL(dbg_snapshot_post_reboot);