From: Kyungmin Park Date: Fri, 20 Aug 2010 06:07:15 +0000 (+0900) Subject: s5pc210: universal: Add magic asicc for T32 auto burn X-Git-Tag: JH02_20100820~15 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4e97aab9229ddb1411d16e1996da3e706918f8a4;p=kernel%2Fu-boot.git s5pc210: universal: Add magic asicc for T32 auto burn Signed-off-by: Kyungmin Park --- diff --git a/board/samsung/universal_c210/universal.c b/board/samsung/universal_c210/universal.c index 1c834b9..b578132 100644 --- a/board/samsung/universal_c210/universal.c +++ b/board/samsung/universal_c210/universal.c @@ -83,6 +83,37 @@ int dram_init(void) return 0; } +static void check_auto_burn(void) +{ + unsigned long magic_base = CONFIG_SYS_SDRAM_BASE + 0x02000000; + unsigned int count = 0; + char buf[64]; + + if (readl(magic_base) == 0x426f6f74) { /* ASICC: Boot */ + puts("Auto buring bootloader\n"); + count += sprintf(buf + count, "run updateb; "); + } + if (readl(magic_base + 0x4) == 0x4b65726e) { /* ASICC: Kern */ + puts("Auto buring kernel\n"); + count += sprintf(buf + count, "run updatek; "); + } + + if (count) { + count += sprintf(buf + count, "reset"); + setenv("bootcmd", buf); + } + + /* Clear the magic value */ + memset(magic_base, 0, 2); +} + +#ifdef CONFIG_MISC_INIT_R +int misc_init_r(void) +{ + check_auto_burn(); +} +#endif + #ifdef CONFIG_GENERIC_MMC int s5p_no_mmc_support(void) { diff --git a/include/configs/s5pc210_universal.h b/include/configs/s5pc210_universal.h index edcad16..68523ce 100644 --- a/include/configs/s5pc210_universal.h +++ b/include/configs/s5pc210_universal.h @@ -30,7 +30,7 @@ * High Level Configuration Options * (easy to change) */ -#define CONFIG_ARMCORTEXA8 1 /* This is an ARM V7 CPU core */ +#define CONFIG_ARMCORTEXA9 1 /* This is an ARM V7 CPU core */ #define CONFIG_SAMSUNG 1 /* in a SAMSUNG core */ #define CONFIG_S5P 1 /* which is in a S5P Family */ #define CONFIG_S5PC210 1 /* which is in a S5PC210 */ @@ -319,7 +319,7 @@ #define CONFIG_DOS_PARTITION 1 -//#define CONFIG_MISC_INIT_R +#define CONFIG_MISC_INIT_R /* I2C */ #if 0