Merge branch 'u-boot-atmel/master' into 'u-boot-arm/master'
authorAlbert ARIBAUD <albert.u.boot@aribaud.net>
Tue, 12 Mar 2013 16:27:44 +0000 (17:27 +0100)
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>
Tue, 12 Mar 2013 16:27:44 +0000 (17:27 +0100)
arch/arm/cpu/arm926ejs/at91/at91sam9x5_devices.c
arch/arm/include/asm/arch-at91/at91sam9x5.h
board/atmel/at91sam9260ek/at91sam9260ek.c
boards.cfg
include/configs/at91rm9200ek.h
include/configs/at91sam9260ek.h
include/configs/at91sam9261ek.h
include/configs/at91sam9263ek.h
include/configs/at91sam9m10g45ek.h
include/configs/at91sam9rlek.h
include/configs/at91sam9x5ek.h

index 0448c0b133b99e254d6c8a373ba731c19e933717..92185460a1ace1a5dd0a1ef7b0230c775585c0d0 100644 (file)
@@ -61,20 +61,20 @@ char *get_cpu_name()
        if (cpu_is_at91sam9x5()) {
                switch (extension_id) {
                case ARCH_EXID_AT91SAM9G15:
-                       return CONFIG_SYS_AT91_G15_CPU_NAME;
+                       return "AT91SAM9G15";
                case ARCH_EXID_AT91SAM9G25:
-                       return CONFIG_SYS_AT91_G25_CPU_NAME;
+                       return "AT91SAM9G25";
                case ARCH_EXID_AT91SAM9G35:
-                       return CONFIG_SYS_AT91_G35_CPU_NAME;
+                       return "AT91SAM9G35";
                case ARCH_EXID_AT91SAM9X25:
-                       return CONFIG_SYS_AT91_X25_CPU_NAME;
+                       return "AT91SAM9X25";
                case ARCH_EXID_AT91SAM9X35:
-                       return CONFIG_SYS_AT91_X35_CPU_NAME;
+                       return "AT91SAM9X35";
                default:
-                       return CONFIG_SYS_AT91_UNKNOWN_CPU;
+                       return "Unknown CPU type";
                }
        } else {
-               return CONFIG_SYS_AT91_UNKNOWN_CPU;
+               return "Unknown CPU type";
        }
 }
 
@@ -246,14 +246,14 @@ void at91_macb_hw_init(void)
 #ifndef CONFIG_RMII
        /* Only emac0 support MII */
        if (has_emac0()) {
-               at91_set_b_periph(AT91_PIO_PORTB, 16, 0);       /* ECRS */
-               at91_set_b_periph(AT91_PIO_PORTB, 17, 0);       /* ECOL */
-               at91_set_b_periph(AT91_PIO_PORTB, 13, 0);       /* ERX2 */
-               at91_set_b_periph(AT91_PIO_PORTB, 14, 0);       /* ERX3 */
-               at91_set_b_periph(AT91_PIO_PORTB, 15, 0);       /* ERXCK */
-               at91_set_b_periph(AT91_PIO_PORTB, 11, 0);       /* ETX2 */
-               at91_set_b_periph(AT91_PIO_PORTB, 12, 0);       /* ETX3 */
-               at91_set_b_periph(AT91_PIO_PORTB, 8, 0);        /* ETXER */
+               at91_set_a_periph(AT91_PIO_PORTB, 16, 0);       /* ECRS */
+               at91_set_a_periph(AT91_PIO_PORTB, 17, 0);       /* ECOL */
+               at91_set_a_periph(AT91_PIO_PORTB, 13, 0);       /* ERX2 */
+               at91_set_a_periph(AT91_PIO_PORTB, 14, 0);       /* ERX3 */
+               at91_set_a_periph(AT91_PIO_PORTB, 15, 0);       /* ERXCK */
+               at91_set_a_periph(AT91_PIO_PORTB, 11, 0);       /* ETX2 */
+               at91_set_a_periph(AT91_PIO_PORTB, 12, 0);       /* ETX3 */
+               at91_set_a_periph(AT91_PIO_PORTB, 8, 0);        /* ETXER */
        }
 #endif
 }
index de0f1b1923e60258c528724789365fd5c174acda..b7d1932f42d6b331d846ce0b3b54af7b3517126e 100644 (file)
 /*
  * Cpu Name
  */
-#define CONFIG_SYS_AT91_G15_CPU_NAME   "AT91SAM9G15"
-#define CONFIG_SYS_AT91_G25_CPU_NAME   "AT91SAM9G25"
-#define CONFIG_SYS_AT91_G35_CPU_NAME   "AT91SAM9G35"
-#define CONFIG_SYS_AT91_X25_CPU_NAME   "AT91SAM9X25"
-#define CONFIG_SYS_AT91_X35_CPU_NAME   "AT91SAM9X35"
-#define CONFIG_SYS_AT91_UNKNOWN_CPU    "Unknown CPU type"
 #define ATMEL_CPU_NAME get_cpu_name()
 
 /*
index 25556725242e5597f41afea17562aca15cbadc19..3aa394a4bb03b2bf1fd7f0c51a6a0eb6b6a7c10b 100644 (file)
@@ -157,12 +157,17 @@ int board_early_init_f(void)
 
 int board_init(void)
 {
+#ifdef CONFIG_AT91SAM9G20EK_2MMC
+       /* arch number of AT91SAM9G20EK_2MMC-Board */
+       gd->bd->bi_arch_number = MACH_TYPE_AT91SAM9G20EK_2MMC;
+#else
 #ifdef CONFIG_AT91SAM9G20EK
-       /* arch number of AT91SAM9260EK-Board */
+       /* arch number of AT91SAM9G20EK-Board */
        gd->bd->bi_arch_number = MACH_TYPE_AT91SAM9G20EK;
 #else
        /* arch number of AT91SAM9260EK-Board */
        gd->bd->bi_arch_number = MACH_TYPE_AT91SAM9260EK;
+#endif
 #endif
        /* adress of boot parameters */
        gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
index 198cc5ce8483ea33e3a1712a301516e815472de4..fdb32c29a29692e5c5d95cfcd986b1e7feca3111 100644 (file)
@@ -95,6 +95,7 @@ at91sam9g10ek_nandflash      arm         arm926ejs   at91sam9261ek       atmel
 at91sam9g20ek_dataflash_cs0  arm         arm926ejs   at91sam9260ek       atmel          at91        at91sam9260ek:AT91SAM9G20,SYS_USE_DATAFLASH_CS0
 at91sam9g20ek_dataflash_cs1  arm         arm926ejs   at91sam9260ek       atmel          at91        at91sam9260ek:AT91SAM9G20,SYS_USE_DATAFLASH_CS1
 at91sam9g20ek_nandflash      arm         arm926ejs   at91sam9260ek       atmel          at91        at91sam9260ek:AT91SAM9G20,SYS_USE_NANDFLASH
+at91sam9g20ek_2mmc_nandflash arm         arm926ejs   at91sam9260ek       atmel          at91        at91sam9260ek:AT91SAM9G20,AT91SAM9G20EK_2MMC,SYS_USE_NANDFLASH
 at91sam9m10g45ek_nandflash   arm         arm926ejs   at91sam9m10g45ek    atmel          at91        at91sam9m10g45ek:AT91SAM9M10G45,SYS_USE_NANDFLASH
 at91sam9rlek_dataflash       arm         arm926ejs   at91sam9rlek        atmel          at91        at91sam9rlek:AT91SAM9RL,SYS_USE_DATAFLASH
 at91sam9rlek_nandflash       arm         arm926ejs   at91sam9rlek        atmel          at91        at91sam9rlek:AT91SAM9RL,SYS_USE_NANDFLASH
index bf20065afda22273a117b0ae4c6bdb552619a9a7..735211326695fa6275ca450ca79ffa5445228f85 100644 (file)
@@ -75,6 +75,9 @@
 
 #define CONFIG_BOARD_EARLY_INIT_F
 
+#define CONFIG_CMD_BOOTZ
+#define CONFIG_OF_LIBFDT
+
 /*
  * Memory Configuration
  */
index f921fac64d06a89952e1ade21c2563ce16499adb..ebcc69afa3e6c0fa18074e0c4d1c58ca0e1b9bff 100644 (file)
@@ -62,6 +62,9 @@
 #define CONFIG_BOARD_EARLY_INIT_F
 #define CONFIG_DISPLAY_CPUINFO
 
+#define CONFIG_CMD_BOOTZ
+#define CONFIG_OF_LIBFDT
+
 /* general purpose I/O */
 #define CONFIG_ATMEL_LEGACY            /* required until (g)pio is fixed */
 #define CONFIG_AT91_GPIO
 #endif
 
 /* DataFlash */
+#ifndef CONFIG_AT91SAM9G20EK_2MMC
 #define CONFIG_ATMEL_DATAFLASH_SPI
 #define CONFIG_HAS_DATAFLASH           1
 #define CONFIG_SYS_SPI_WRITE_TOUT              (5*CONFIG_SYS_HZ)
 #define CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS0    0xC0000000      /* CS0 */
 #define CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS1    0xD0000000      /* CS1 */
 #define AT91_SPI_CLK                   15000000
+#endif
 
 #ifdef CONFIG_AT91SAM9G20EK
 #define DATAFLASH_TCSS                 (0x22 << 16)
 
 /* bootstrap + u-boot + env + linux in nandflash */
 #define CONFIG_ENV_IS_IN_NAND  1
-#define CONFIG_ENV_OFFSET              0x60000
-#define CONFIG_ENV_OFFSET_REDUND       0x80000
+#define CONFIG_ENV_OFFSET              0xc0000
+#define CONFIG_ENV_OFFSET_REDUND       0x100000
 #define CONFIG_ENV_SIZE                0x20000         /* 1 sector = 128 kB */
-#define CONFIG_BOOTCOMMAND     "nand read 0x22000000 0xA0000 0x200000; bootm"
-#define CONFIG_BOOTARGS                "console=ttyS0,115200 "                 \
-                               "root=/dev/mtdblock5 "                  \
-                               "mtdparts=atmel_nand:128k(bootstrap)ro,"        \
-                               "256k(uboot)ro,128k(env1)ro,"           \
-                               "128k(env2)ro,2M(linux),-(root) "       \
-                               "rw rootfstype=jffs2"
+#define CONFIG_BOOTCOMMAND     "nand read 0x22000000 0x200000 0x300000; bootm"
+#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) "                             \
+       "root=/dev/mtdblock7 rw rootfstype=jffs2"
 
 #endif
 
index 611e3e253297ccb6f68adaa95a4be741f4f65fec..cabff9a9fe325c73977276d78cf3bbc0c9e56eaf 100644 (file)
 
 /* bootstrap + u-boot + env + linux in nandflash */
 #define CONFIG_ENV_IS_IN_NAND
-#define CONFIG_ENV_OFFSET              0x60000
-#define CONFIG_ENV_OFFSET_REDUND       0x80000
+#define CONFIG_ENV_OFFSET              0xc0000
+#define CONFIG_ENV_OFFSET_REDUND       0x100000
 #define CONFIG_ENV_SIZE                0x20000         /* 1 sector = 128 kB */
-#define CONFIG_BOOTCOMMAND     "nand read 0x22000000 0xA0000 0x200000; bootm"
-#define CONFIG_BOOTARGS                "console=ttyS0,115200 "                 \
-                               "root=/dev/mtdblock5 "                  \
-                               "mtdparts=atmel_nand:128k(bootstrap)ro,"        \
-                               "256k(uboot)ro,128k(env1)ro,"           \
-                               "128k(env2)ro,2M(linux),-(root) "       \
-                               "rw rootfstype=jffs2"
-
+#define CONFIG_BOOTCOMMAND     "nand read 0x22000000 0x200000 0x300000; bootm"
+#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) "                             \
+       "root=/dev/mtdblock7 rw rootfstype=jffs2"
 #endif
 
 #define CONFIG_SYS_PROMPT              "U-Boot> "
index 35038229ad5976d973d8e5d3b9dd6a953e0962de..1ab9c304887074acaf7b71f40420bc0b75f818d2 100644 (file)
@@ -62,6 +62,9 @@
 
 #define CONFIG_DISPLAY_CPUINFO
 
+#define CONFIG_CMD_BOOTZ
+#define CONFIG_OF_LIBFDT
+
 /*
  * Hardware drivers
  */
 
 /* bootstrap + u-boot + env + linux in nandflash */
 #define CONFIG_ENV_IS_IN_NAND          1
-#define CONFIG_ENV_OFFSET              0x60000
-#define CONFIG_ENV_OFFSET_REDUND       0x80000
+#define CONFIG_ENV_OFFSET              0xc0000
+#define CONFIG_ENV_OFFSET_REDUND       0x100000
 #define CONFIG_ENV_SIZE                0x20000         /* 1 sector = 128 kB */
-#define CONFIG_BOOTCOMMAND     "nand read 0x22000000 0xA0000 0x200000; bootm"
-#define CONFIG_BOOTARGS                "console=ttyS0,115200 " \
-                               "root=/dev/mtdblock5 " \
-                               "mtdparts=atmel_nand:128k(bootstrap)ro,256k(uboot)ro,128k(env1)ro,128k(env2)ro,2M(linux),-(root) " \
-                               "rw rootfstype=jffs2"
-
+#define CONFIG_BOOTCOMMAND     "nand read 0x22000000 0x200000 0x300000; bootm"
+#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) "                             \
+       "root=/dev/mtdblock7 rw rootfstype=jffs2"
 #endif
 
 #define CONFIG_SYS_PROMPT              "U-Boot> "
index e988d8141078afaae38faf57f192894ea6eb073d..07e1c9f890fe24cfe85f777fdb384d4eaf29a954 100644 (file)
@@ -47,6 +47,7 @@
 #define CONFIG_BOARD_EARLY_INIT_F
 #define CONFIG_DISPLAY_CPUINFO
 
+#define CONFIG_CMD_BOOTZ
 #define CONFIG_OF_LIBFDT
 
 /* general purpose I/O */
 
 /* bootstrap + u-boot + env in nandflash */
 #define CONFIG_ENV_IS_IN_NAND
-#define CONFIG_ENV_OFFSET              0x60000
-#define CONFIG_ENV_OFFSET_REDUND       0x80000
+#define CONFIG_ENV_OFFSET              0xc0000
+#define CONFIG_ENV_OFFSET_REDUND       0x100000
 #define CONFIG_ENV_SIZE                        0x20000
 
-#define CONFIG_BOOTCOMMAND     "nand read 0x70000000 0x100000 0x200000;" \
+#define CONFIG_BOOTCOMMAND                                             \
+       "nand read 0x70000000 0x200000 0x300000;"                       \
        "bootm 0x70000000"
 #define CONFIG_BOOTARGS                                                        \
        "console=ttyS0,115200 earlyprintk "                             \
-       "root=/dev/mtdblock5 "                                          \
-       "mtdparts=atmel_nand:128k(bootstrap)ro,"                        \
-       "256k(uboot)ro,128k(env1)ro,128k(env2)ro,"                      \
-       "2M@1M(linux),-(root) "                                         \
-       "rw rootfstype=jffs2"
+       "mtdparts=atmel_nand:256k(bootstrap)ro,512k(uboot)ro,"          \
+       "256k(env),256k(env_redundant),256k(spare),"                    \
+       "512k(dtb),6M(kernel)ro,-(rootfs) "                             \
+       "root=/dev/mtdblock7 rw rootfstype=jffs2"
 
 #define CONFIG_BAUDRATE                        115200
 
index 8178b32a847bf98d8fd6be4ba84e040d5890e97e..aa359b13dbb7c2ed2ecc758413e8ecd84b5b5ebf 100644 (file)
@@ -48,6 +48,9 @@
 
 #define CONFIG_DISPLAY_CPUINFO
 
+#define CONFIG_CMD_BOOTZ
+#define CONFIG_OF_LIBFDT
+
 #define CONFIG_ATMEL_LEGACY
 #define CONFIG_AT91_GPIO               1
 #define CONFIG_AT91_GPIO_PULLUP                1
index 6fac5ac4eb870f386e1f4434b55e78ee3892c51d..ee6e3fcdecdb99d6eb25bd8ba377b83a60779e68 100644 (file)
@@ -42,6 +42,7 @@
 #define CONFIG_BOARD_EARLY_INIT_F
 #define CONFIG_DISPLAY_CPUINFO
 
+#define CONFIG_CMD_BOOTZ
 #define CONFIG_OF_LIBFDT
 
 /* general purpose I/O */
                                "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"
+#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