s5pc110: universal: support the ramoops
authorMinkyu Kang <mk7.kang@samsung.com>
Fri, 29 Oct 2010 08:14:44 +0000 (17:14 +0900)
committerMinkyu Kang <mk7.kang@samsung.com>
Fri, 29 Oct 2010 08:14:44 +0000 (17:14 +0900)
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
arch/arm/include/asm/arch-s5pc1xx/cpu.h
board/samsung/universal_c110/universal.c
include/configs/s5pc110_universal.h

index f689ec4..6c77a51 100644 (file)
@@ -40,6 +40,7 @@
 #define S5PC100_UART_BASE      0xEC000000
 #define S5PC100_USBOTG_BASE    0xED200000
 #define S5PC100_USBPHY_BASE    0xED300000
+#define S5PC100_MODEM_BASE     0xED500000
 #define S5PC100_MMC_BASE       0xED800000
 #define S5PC100_FIMD_BASE      0xEE000000
 
@@ -56,6 +57,7 @@
 #define S5PC110_MMC_BASE       0xEB000000
 #define S5PC110_USBOTG_BASE    0xEC000000
 #define S5PC110_USBPHY_BASE    0xEC100000
+#define S5PC110_MODEM_BASE     0xED000000
 #define S5PC110_DMC0_BASE      0xF0000000
 #define S5PC110_DMC1_BASE      0xF1400000
 #define S5PC110_VIC0_BASE      0xF2000000
@@ -100,6 +102,7 @@ SAMSUNG_BASE(fimd, FIMD_BASE)
 SAMSUNG_BASE(gpio, GPIO_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 a54779d..23c0ac4 100644 (file)
@@ -44,6 +44,7 @@
 #include <dsim.h>
 #include <spi.h>
 #include <bmp_layout.h>
+#include <ramoops.h>
 
 #include "animation_frames.h"
 #include "gpio_setting.h"
@@ -2448,39 +2449,28 @@ static void setup_meminfo(void)
        setenv("meminfo", meminfo);
 }
 
-#define KMSG_SIZE      0x1000
-#define KMSG_ADDRESS   0xED000000
-
+#ifdef CONFIG_RAMOOPS
 static void show_dump_msg(void)
 {
        int status = get_reset_status();
-       long *msg_header = (long *)KMSG_ADDRESS;
-       char msg[KMSG_SIZE];
-       int i;
+       int ret;
 
        if (status != SWRESET)
                return;
 
-       if (*msg_header != 0x3d3d3d3d)
-               return;
+       ret = ramoops_show_msg(samsung_get_base_modem());
 
-       memcpy(msg, (void *)KMSG_ADDRESS, KMSG_SIZE);
-
-       printf("\n\n");
-       for (i = 0; i < KMSG_SIZE; i++) {
-               printf("%c", msg[i]);
-       }
-       printf("\n\n");
-
-       memset((void *)KMSG_ADDRESS, 0x0, KMSG_SIZE);
-
-       setenv("bootdelay", "-1");
+       if (!ret)
+               setenv("bootdelay", "-1");
 }
+#endif
 
 int misc_init_r(void)
 {
        check_reset_status();
+#ifdef CONFIG_RAMOOPS
        show_dump_msg();
+#endif
 
 #ifdef CONFIG_LCD
        /* It should be located at first */
index 45c2751..98b220b 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
+
 #endif /* __CONFIG_H */