From a7a29e5c7b069a5dac541017657c1ac53a653fe7 Mon Sep 17 00:00:00 2001 From: Jaehoon Chung Date: Wed, 5 Jan 2011 14:56:44 +0900 Subject: [PATCH] s5p: universal: Add saving boot image to eMMC update macro Signed-off-by: Jaehoon Chung --- board/samsung/universal_c110/universal.c | 5 +++++ board/samsung/universal_c210/universal.c | 5 +++++ include/configs/s5pc110_universal.h | 2 ++ include/configs/s5pc210_universal.h | 2 ++ 4 files changed, 14 insertions(+) diff --git a/board/samsung/universal_c110/universal.c b/board/samsung/universal_c110/universal.c index 582028f..7319efc 100644 --- a/board/samsung/universal_c110/universal.c +++ b/board/samsung/universal_c110/universal.c @@ -813,6 +813,11 @@ static void check_auto_burn(void) puts("Auto burning bootloader (eMMC)\n"); count += sprintf(buf + count, "run updatemmc; "); } + /* Save u-boot in eMMC */ + if (readl(magic_base) == 0x53617665) { /* ASICC: Save */ + puts("Auto buring u-boot image (boot partition2 in eMMC)\n"); + count += sprintf(buf + count, "run updatesave; "); + } if (readl(magic_base + 0x04) == 0x4b65726e) { /* ASICC: Kern */ puts("Auto burning kernel\n"); count += sprintf(buf + count, "run updatek; "); diff --git a/board/samsung/universal_c210/universal.c b/board/samsung/universal_c210/universal.c index b100997..96062f6 100644 --- a/board/samsung/universal_c210/universal.c +++ b/board/samsung/universal_c210/universal.c @@ -247,6 +247,11 @@ static void check_auto_burn(void) puts("Auto buring bootloader (eMMC)\n"); count += sprintf(buf + count, "run updatemmc; "); } + /* Save u-boot in eMMC */ + if (readl(magic_base) == 0x53617665) { /* ASICC: Save */ + puts("Auto buring u-boot image (boot partition2 in eMMC)\n"); + count += sprintf(buf + count, "run updatesave; "); + } if (readl(magic_base + 0x4) == 0x4b65726e) { /* ASICC: Kern */ puts("Auto buring kernel\n"); count += sprintf(buf + count, "run updatek; "); diff --git a/include/configs/s5pc110_universal.h b/include/configs/s5pc110_universal.h index 33cf53a..03d9cb4 100644 --- a/include/configs/s5pc110_universal.h +++ b/include/configs/s5pc110_universal.h @@ -284,6 +284,8 @@ " bootm 0x30007FC0\0" \ "updatemmc=mmc boot 0 1 1 1; mmc write 0 0x32008000 0 0x200;" \ " mmc boot 0 1 1 0\0" \ + "updatesave=mmc boot 0 1 1 2; mmc write 0 0x32000000 0 0x200;" \ + " mmc boot 0 1 1 0\0" \ "flashboot=set bootargs root=/dev/mtdblock${bootblock}" \ " rootfstype=${rootfstype}" \ CONFIG_UBI_MTD " ${opts} ${lcdinfo} " CONFIG_COMMON_BOOT "; run bootk\0" \ diff --git a/include/configs/s5pc210_universal.h b/include/configs/s5pc210_universal.h index 8ae46df..83686cd 100644 --- a/include/configs/s5pc210_universal.h +++ b/include/configs/s5pc210_universal.h @@ -267,6 +267,8 @@ "bootk=run loaduimage; bootm 0x40007FC0\0" \ "updatemmc=mmc boot 0 1 1 1; mmc write 0 0x42008000 0 0x200;" \ " mmc boot 0 1 1 0\0" \ + "updatesave=mmc boot 0 1 1 2; mmc write 0 0x42000000 0 0x200;" \ + " mmc boot 0 1 1 0\0" \ "lpj=lpj=3981312\0" \ "ubifsboot=set bootargs root=ubi0!rootfs rootfstype=ubifs ${lpj} " \ CONFIG_ENV_FLASHBOOT " ${opts} ${lcdinfo} " \ -- 2.7.4