]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - include/configs/at91-sama5_common.h
ARM: at91: sama5: update the spi flash mapping
[karo-tx-uboot.git] / include / configs / at91-sama5_common.h
index 0fe0852821a2e2cdb5024febf0b3c5dae22844e4..de5f12ebb05a0c2b3b64b9a155ae63157d4150c4 100644 (file)
        "256K(env),256k(env_redundent),256k(spare),"                    \
        "512k(dtb),6M(kernel)ro,-(rootfs) "                             \
        "rootfstype=ubifs ubi.mtd=7 root=ubi0:rootfs"
+
+#ifdef CONFIG_SYS_USE_NANDFLASH
+/* u-boot env in nand flash */
+#define CONFIG_ENV_IS_IN_NAND
+#define CONFIG_ENV_OFFSET              0xc0000
+#define CONFIG_ENV_OFFSET_REDUND       0x100000
+#define CONFIG_ENV_SIZE                        0x20000
+#define CONFIG_BOOTCOMMAND             "nand read 0x21000000 0x180000 0x80000;"        \
+                                       "nand read 0x22000000 0x200000 0x600000;"       \
+                                       "bootz 0x22000000 - 0x21000000"
+#elif CONFIG_SYS_USE_SERIALFLASH
+/* u-boot env in serial flash, by default is bus 0 and cs 0 */
+#define CONFIG_ENV_IS_IN_SPI_FLASH
+#define CONFIG_ENV_OFFSET              0x4000
+#define CONFIG_ENV_SIZE                        0x4000
+#define CONFIG_ENV_SECT_SIZE           0x1000
+#define CONFIG_BOOTCOMMAND             "sf probe 0; "                          \
+                                       "sf read 0x21000000 0x60000 0xc000; "   \
+                                       "sf read 0x22000000 0x6c000 0x394000; " \
+                                       "bootz 0x22000000 - 0x21000000"
+#endif
+
 #endif
 
 #define CONFIG_BAUDRATE                        115200