* [U-Boot] [PATCH] mmc: at91sam9x5: support to save environment in mmc
@ 2012-11-02 10:17 Josh Wu
2012-11-05 8:57 ` Andreas Bießmann
0 siblings, 1 reply; 2+ messages in thread
From: Josh Wu @ 2012-11-02 10:17 UTC (permalink / raw)
To: u-boot
Signed-off-by: Josh Wu <josh.wu@atmel.com>
---
boards.cfg | 1 +
include/configs/at91sam9x5ek.h | 19 ++++++++++++++++---
2 files changed, 17 insertions(+), 3 deletions(-)
diff --git a/boards.cfg b/boards.cfg
index 613d6b2..8ffe4f8 100644
--- a/boards.cfg
+++ b/boards.cfg
@@ -98,6 +98,7 @@ at91sam9rlek_dataflash arm arm926ejs at91sam9rlek atmel
at91sam9rlek_nandflash arm arm926ejs at91sam9rlek atmel at91 at91sam9rlek:AT91SAM9RL,SYS_USE_NANDFLASH
at91sam9x5ek_nandflash arm arm926ejs at91sam9x5ek atmel at91 at91sam9x5ek:AT91SAM9X5,SYS_USE_NANDFLASH
at91sam9x5ek_spiflash arm arm926ejs at91sam9x5ek atmel at91 at91sam9x5ek:AT91SAM9X5,SYS_USE_SPIFLASH
+at91sam9x5ek_mmc arm arm926ejs at91sam9x5ek atmel at91 at91sam9x5ek:AT91SAM9X5,SYS_USE_MMC
at91sam9xeek_dataflash_cs0 arm arm926ejs at91sam9260ek atmel at91 at91sam9260ek:AT91SAM9XE,SYS_USE_DATAFLASH_CS0
at91sam9xeek_dataflash_cs1 arm arm926ejs at91sam9260ek atmel at91 at91sam9260ek:AT91SAM9XE,SYS_USE_DATAFLASH_CS1
at91sam9xeek_nandflash arm arm926ejs at91sam9260ek atmel at91 at91sam9260ek:AT91SAM9XE,SYS_USE_NANDFLASH
diff --git a/include/configs/at91sam9x5ek.h b/include/configs/at91sam9x5ek.h
index 974e08f..e232221 100644
--- a/include/configs/at91sam9x5ek.h
+++ b/include/configs/at91sam9x5ek.h
@@ -164,8 +164,7 @@
#define CONFIG_BOOTCOMMAND "nand read " \
"0x22000000 0x200000 0x300000; " \
"bootm 0x22000000"
-#else
-#ifdef CONFIG_SYS_USE_SPIFLASH
+#elif defined(CONFIG_SYS_USE_SPIFLASH)
/* bootstrap + u-boot + env + linux in spi flash */
#define CONFIG_ENV_IS_IN_SPI_FLASH
#define CONFIG_ENV_OFFSET 0x5000
@@ -175,14 +174,28 @@
#define CONFIG_BOOTCOMMAND "sf probe 0; " \
"sf read 0x22000000 0x100000 0x300000; " \
"bootm 0x22000000"
-#endif
+#else /* CONFIG_SYS_USE_MMC */
+/* bootstrap + u-boot + env + linux in mmc */
+#define CONFIG_ENV_IS_IN_MMC
+/* For FAT system, most cases it should be in the reserved sector */
+#define CONFIG_ENV_OFFSET 0x2000
+#define CONFIG_ENV_SIZE 0x1000
+#define CONFIG_SYS_MMC_ENV_DEV 0
#endif
+#ifdef CONFIG_SYS_USE_MMC
+#define CONFIG_BOOTARGS "mem=128M console=ttyS0,115200 " \
+ "mtdparts=atmel_nand:" \
+ "8M(bootstrap/uboot/kernel)ro,-(rootfs) " \
+ "root=/dev/mmcblk0p2 " \
+ "rw rootfstype=ext4 rootwait"
+#else
#define CONFIG_BOOTARGS "mem=128M console=ttyS0,115200 " \
"mtdparts=atmel_nand:" \
"8M(bootstrap/uboot/kernel)ro,-(rootfs) " \
"root=/dev/mtdblock1 rw " \
"rootfstype=ubifs ubi.mtd=1 root=ubi0:rootfs"
+#endif
#define CONFIG_BAUDRATE 115200
--
1.7.9.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [U-Boot] [PATCH] mmc: at91sam9x5: support to save environment in mmc
2012-11-02 10:17 [U-Boot] [PATCH] mmc: at91sam9x5: support to save environment in mmc Josh Wu
@ 2012-11-05 8:57 ` Andreas Bießmann
0 siblings, 0 replies; 2+ messages in thread
From: Andreas Bießmann @ 2012-11-05 8:57 UTC (permalink / raw)
To: u-boot
Dear Josh Wu,
On 02.11.2012 11:17, Josh Wu wrote:
> Signed-off-by: Josh Wu <josh.wu@atmel.com>
Acked-by: Andreas Bie?mann <andreas.devel@googlemail.com>
> ---
> boards.cfg | 1 +
> include/configs/at91sam9x5ek.h | 19 ++++++++++++++++---
> 2 files changed, 17 insertions(+), 3 deletions(-)
Best regards
Andreas Bie?mann
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-11-05 8:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-02 10:17 [U-Boot] [PATCH] mmc: at91sam9x5: support to save environment in mmc Josh Wu
2012-11-05 8:57 ` Andreas Bießmann
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.