From 00fd6f7ba084d9f40f8499149455e83058899851 Mon Sep 17 00:00:00 2001 From: Hosung Kim Date: Thu, 24 May 2018 13:46:31 +0900 Subject: [PATCH] [COMMON] lib: dss: support soc_post_reboot_entry/exit Change-Id: Ifbc756ba82fe3755adaf8272f986151335b4d70c Signed-off-by: Hosung Kim --- drivers/soc/samsung/debug/exynos-helper.c | 13 +++++++++++++ include/linux/debug-snapshot-helper.h | 3 +++ lib/debug-snapshot-helper.c | 4 ++++ 3 files changed, 20 insertions(+) diff --git a/drivers/soc/samsung/debug/exynos-helper.c b/drivers/soc/samsung/debug/exynos-helper.c index 53699bb27865..0a197bc3d6a5 100644 --- a/drivers/soc/samsung/debug/exynos-helper.c +++ b/drivers/soc/samsung/debug/exynos-helper.c @@ -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, diff --git a/include/linux/debug-snapshot-helper.h b/include/linux/debug-snapshot-helper.h index 8a04ad8da4ca..2106cef5c8ae 100644 --- a/include/linux/debug-snapshot-helper.h +++ b/include/linux/debug-snapshot-helper.h @@ -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 *); diff --git a/lib/debug-snapshot-helper.c b/lib/debug-snapshot-helper.c index 7bc4b3af5526..3bdc0c162eaa 100644 --- a/lib/debug-snapshot-helper.c +++ b/lib/debug-snapshot-helper.c @@ -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); -- 2.20.1