s5pc210: universal: support the ramoops
authorMinkyu Kang <mk7.kang@samsung.com>
Fri, 29 Oct 2010 08:18:42 +0000 (17:18 +0900)
committerMinkyu Kang <mk7.kang@samsung.com>
Fri, 29 Oct 2010 08:18:42 +0000 (17:18 +0900)
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
arch/arm/include/asm/arch-s5pc2xx/cpu.h
board/samsung/universal_c210/universal.c
include/configs/s5pc210_universal.h

index a2d5e14..402d21e 100644 (file)
@@ -44,6 +44,7 @@
 #define S5PC210_UART_BASE      0x13800000
 #define S5PC210_ADC_BASE       0x13910000
 #define S5PC210_PWMTIMER_BASE  0x139D0000
+#define S5PC210_MODEM_BASE     0x13A00000
 
 #ifndef __ASSEMBLY__
 #include <asm/io.h>
@@ -80,6 +81,7 @@ SAMSUNG_BASE(gpio_part2, GPIO_PART2_BASE)
 SAMSUNG_BASE(gpio_part3, GPIO_PART3_BASE)
 SAMSUNG_BASE(pro_id, PRO_ID)
 SAMSUNG_BASE(mmc, MMC_BASE)
+SAMSUNG_BASE(modem, MODEM_BASE)
 SAMSUNG_BASE(sromc, SROMC_BASE)
 SAMSUNG_BASE(timer, PWMTIMER_BASE)
 SAMSUNG_BASE(uart, UART_BASE)
index 56cc93e..f229d17 100644 (file)
@@ -33,6 +33,7 @@
 #include <asm/arch/mmc.h>
 #include <asm/arch/power.h>
 #include <asm/arch/clk.h>
+#include <ramoops.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -933,10 +934,29 @@ static void check_reset_status(void)
        }
 }
 
+#ifdef CONFIG_RAMOOPS
+static void show_dump_msg(void)
+{
+       int status = get_reset_status();
+       int ret;
+
+       if (status != SWRESET)
+               return;
+
+       ret = ramoops_show_msg(samsung_get_base_modem());
+
+       if (!ret)
+               setenv("bootdelay", "-1");
+}
+#endif
+
 #ifdef CONFIG_MISC_INIT_R
 int misc_init_r(void)
 {
        check_reset_status();
+#ifdef CONFIG_RAMOOPS
+       show_dump_msg();
+#endif
        check_auto_burn();
 
        check_hw_revision();
index 73922e1..54e22d3 100644 (file)
 #define CONFIG_SYS_SP_ADDR     (CONFIG_SYS_LOAD_ADDR - 0x1000000)
 #define CONFIG_SYS_INIT_SP_ADDR        (CONFIG_SYS_SP_ADDR - CONFIG_SYS_GBL_DATA_SIZE)
 
+#define CONFIG_RAMOOPS
+
 #define CONFIG_TEST_BOOTTIME
 #define CONFIG_TEST_BOOTFAIL