From 9e14c436c55134136e6788474c4999530aed56fc Mon Sep 17 00:00:00 2001 From: Kyungmin Park Date: Fri, 31 Jul 2009 15:12:25 +0900 Subject: [PATCH] s5pc110: universal: Kernel auto burning support Signed-off-by: Kyungmin Park --- board/samsung/universal/universal.c | 9 +++++++-- include/configs/s5pc100_universal.h | 4 ++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/board/samsung/universal/universal.c b/board/samsung/universal/universal.c index 1cf00d3..949c730 100644 --- a/board/samsung/universal/universal.c +++ b/board/samsung/universal/universal.c @@ -121,14 +121,19 @@ static void check_hw_revision(void) setenv("mtdparts", MTDPARTS_DEFAULT_4KB); } else { setenv("bootk", "onenand read 0x20007FC0 0x60000 0x300000; bootm 0x20007FC0"); + setenv("updatek", "onenand erase 0x60000 0x300000; onenand write 0x21008000 0x60000 0x300000"); } } static void check_auto_burn(void) { - if (readl(0x22000000) == 0xa5a55a5a) { + if (readl(0x22000000) == 0x426f6f74) { /* ASICC: Boot */ printf("Auto burning bootloader\n"); - setenv("bootcmd", "run updateb"); + setenv("bootcmd", "run updateb; reset"); + } + if (readl(0x22000000) == 0x4b65726e) { /* ASICC: Kern */ + printf("Auto burning kernel\n"); + setenv("bootcmd", "run updatek; reset"); } } diff --git a/include/configs/s5pc100_universal.h b/include/configs/s5pc100_universal.h index 853a061..4c95002 100644 --- a/include/configs/s5pc100_universal.h +++ b/include/configs/s5pc100_universal.h @@ -160,8 +160,8 @@ #define CONFIG_ENV_OVERWRITE #define CONFIG_EXTRA_ENV_SETTINGS \ CONFIG_UPDATEB \ - "updatek=onenand erase 0x60000 0x300000;" \ - " onenand write 0x21008000 0x60000 0x300000\0" \ + "updatek=onenand erase 0x80000 0x300000;" \ + " onenand write 0x21008000 0x80000 0x300000\0" \ "updateu=onenand erase 0x01560000 0x1eaa0000;" \ " onenand write 0x22000000 0x1260000 0x8C0000\0" \ "bootk=onenand read 0x20007FC0 0x80000 0x300000;" \ -- 2.7.4