]> git.karo-electronics.de Git - karo-tx-uboot.git/blobdiff - include/configs/at91sam9x5ek.h
Add GPL-2.0+ SPDX-License-Identifier to source files
[karo-tx-uboot.git] / include / configs / at91sam9x5ek.h
index 915714f0299ba5dfbfc61097d141ac98a1869caf..2b1533c85ac70eda187c9040f5daa7f5deb06c6e 100644 (file)
@@ -3,23 +3,7 @@
  *
  * Configuation settings for the AT91SAM9X5EK board.
  *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
+ * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #ifndef __CONFIG_H__
@@ -42,6 +26,7 @@
 #define CONFIG_BOARD_EARLY_INIT_F
 #define CONFIG_DISPLAY_CPUINFO
 
+#define CONFIG_CMD_BOOTZ
 #define CONFIG_OF_LIBFDT
 
 /* general purpose I/O */
 #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
 #define CONFIG_BOOTCOMMAND     "sf probe 0; " \
                                "sf read 0x22000000 0x100000 0x300000; " \
                                "bootm 0x22000000"
-#endif
+#elif defined(CONFIG_SYS_USE_DATAFLASH)
+/* bootstrap + u-boot + env + linux in data flash */
+#define CONFIG_ENV_IS_IN_SPI_FLASH
+#define CONFIG_ENV_OFFSET      0x4200
+#define CONFIG_ENV_SIZE                0x4200
+#define CONFIG_ENV_SECT_SIZE   0x210
+#define CONFIG_ENV_SPI_MAX_HZ  30000000
+#define CONFIG_BOOTCOMMAND     "sf probe 0; " \
+                               "sf read 0x22000000 0x84000 0x294000; " \
+                               "bootm 0x22000000"
+#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/mtdblock1 rw " \
-                               "rootfstype=ubifs ubi.mtd=1 root=ubi0:rootfs"
+                               "root=/dev/mmcblk0p2 " \
+                               "rw rootfstype=ext4 rootwait"
+#else
+#define CONFIG_BOOTARGS                                                        \
+       "console=ttyS0,115200 earlyprintk "                             \
+       "mtdparts=atmel_nand:256k(bootstrap)ro,512k(uboot)ro,"          \
+       "256k(env),256k(env_redundant),256k(spare),"                    \
+       "512k(dtb),6M(kernel)ro,-(rootfs) "                             \
+       "rootfstype=ubifs ubi.mtd=7 root=ubi0:rootfs rw"
+#endif
 
 #define CONFIG_BAUDRATE                115200