aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlf Samuelsson <ulf_samuelsson@telia.com>2011-11-21 16:32:29 +0100
committerUlf Samuelsson <ulf_samuelsson@telia.com>2011-11-21 16:32:29 +0100
commit83952adb7c31e619ec912197df5f475e8f3330d6 (patch)
treed4ee1e08284f8dd9a92a7bdec8acd9594863091d
parent3b53f49389c19df37d87e8c4c0dede33f4fea199 (diff)
downloadopenembedded-83952adb7c31e619ec912197df5f475e8f3330d6.zip
openembedded-83952adb7c31e619ec912197df5f475e8f3330d6.tar.gz
openembedded-83952adb7c31e619ec912197df5f475e8f3330d6.tar.bz2
u-boot-2009.11: Support at91sam9g20ek_2mmc
Signed-off-by: Ulf Samuelsson <ulf_samuelsson@telia.com>
-rw-r--r--recipes/u-boot/u-boot-2009.11/at91/0019-Add-to-.gitignore.patch24
-rw-r--r--recipes/u-boot/u-boot-2009.11/at91/0020-Update-build-script.patch58
-rw-r--r--recipes/u-boot/u-boot-2009.11/at91/0021-Makefile-add-at91sam9g20ek_2mmc.patch67
-rw-r--r--recipes/u-boot/u-boot-2009.11/at91/0022-sam920ek_2mmc-Add-support.patch203
-rw-r--r--recipes/u-boot/u-boot-2009.11/at91/0023-sam9m10g45ek-sd-card-boot-environment.patch30
-rw-r--r--recipes/u-boot/u-boot-2009.11/at91/0024-Minor-fixes-to-_2mmc-support.patch103
-rw-r--r--recipes/u-boot/u-boot-2009.11/at91/0026-Revert-bad-sam9m10g45_devices.c-patch.patch38
-rw-r--r--recipes/u-boot/u-boot-2009.11/at91/series5
-rw-r--r--recipes/u-boot/u-boot_2009.11.bb16
9 files changed, 542 insertions, 2 deletions
diff --git a/recipes/u-boot/u-boot-2009.11/at91/0019-Add-to-.gitignore.patch b/recipes/u-boot/u-boot-2009.11/at91/0019-Add-to-.gitignore.patch
new file mode 100644
index 0000000..028c8f4
--- /dev/null
+++ b/recipes/u-boot/u-boot-2009.11/at91/0019-Add-to-.gitignore.patch
@@ -0,0 +1,24 @@
+From bd666e06ba6a7ec853d2ac057ef11d4d9bcfa6d8 Mon Sep 17 00:00:00 2001
+From: Ulf Samuelsson <ulf_samuelsson@telia.com>
+Date: Fri, 28 Oct 2011 12:09:56 +0200
+Subject: [PATCH 19/23] Add to .gitignore
+
+---
+ .gitignore | 4 ++++
+ 1 files changed, 4 insertions(+), 0 deletions(-)
+
+diff --git a/.gitignore b/.gitignore
+index 67d2cd6..932f179 100644
+--- a/.gitignore
++++ b/.gitignore
+@@ -63,3 +63,7 @@ cscope.*
+ /onenand_ipl/onenand-ipl*
+ /onenand_ipl/board/*/onenand*
+ /onenand_ipl/board/*/*.S
++
++/binaries
++/binaries-old
++
+--
+1.7.5.4
+
diff --git a/recipes/u-boot/u-boot-2009.11/at91/0020-Update-build-script.patch b/recipes/u-boot/u-boot-2009.11/at91/0020-Update-build-script.patch
new file mode 100644
index 0000000..00a3509
--- /dev/null
+++ b/recipes/u-boot/u-boot-2009.11/at91/0020-Update-build-script.patch
@@ -0,0 +1,58 @@
+From b1f6887c71cc35b9f624cffc5eed6cd926362c28 Mon Sep 17 00:00:00 2001
+From: Ulf Samuelsson <ulf_samuelsson@telia.com>
+Date: Fri, 28 Oct 2011 12:10:20 +0200
+Subject: [PATCH 20/23] Update build script
+
+---
+ AT91BUILD | 21 +++++++++++++++++++--
+ 1 files changed, 19 insertions(+), 2 deletions(-)
+ mode change 100644 => 100755 AT91BUILD
+
+diff --git a/AT91BUILD b/AT91BUILD
+old mode 100644
+new mode 100755
+index c138bd1..3bea49d
+--- a/AT91BUILD
++++ b/AT91BUILD
+@@ -1,8 +1,11 @@
+ #!/bin/sh
+
+-GCCROOT=~/projects/OE_atmel/build/tmp/sysroots/i686-linux/usr/armv5te/bin
++#GCCROOT=~/projects/OE_atmel/build/tmp/sysroots/i686-linux/usr/armv5te/bin
++GCCROOT=/usr/bin
++
+ PATH=${GCCROOT}:${PATH}
+-CROSS_COMPILE=${GCCROOT}/arm-angstrom-linux-gnueabi-
++# Assume Ubuntu ARM toolchain
++CROSS_COMPILE=${GCCROOT}/arm-linux-gnueabi-
+ mkdir -p binaries
+
+ build ( )
+@@ -14,6 +17,7 @@ build ( )
+ make ${FLAGS} all
+ }
+
++if [ "0" == "1" ] ; then
+ build at91sam9m10g45ek_nandflash
+ build at91sam9m10g45ek_dataflash
+ build at91sam9m10g45ek_dataflash_cs0
+@@ -24,3 +28,16 @@ build at91sam9g45ekes_dataflash
+ build at91sam9g45ekes_dataflash_cs0
+ build at91sam9g45ekes_sd
+ build at91sam9g45ekes
++build at91sam9g20ek_nandflash
++build at91sam9g20ek_dataflash_cs0
++build at91sam9g20ek_dataflash_cs1
++build at91sam9g20ek_sd
++build at91sam9g20ek
++build at91sam9g20ek_2mmc_nandflash
++build at91sam9g20ek_2mmc_dataflash_cs0
++build at91sam9g20ek_2mmc_dataflash_cs1
++build at91sam9g20ek_2mmc
++fi
++build at91sam9g20ek_sd
++build at91sam9g20ek_2mmc_sd
++
+--
+1.7.5.4
+
diff --git a/recipes/u-boot/u-boot-2009.11/at91/0021-Makefile-add-at91sam9g20ek_2mmc.patch b/recipes/u-boot/u-boot-2009.11/at91/0021-Makefile-add-at91sam9g20ek_2mmc.patch
new file mode 100644
index 0000000..184b75d
--- /dev/null
+++ b/recipes/u-boot/u-boot-2009.11/at91/0021-Makefile-add-at91sam9g20ek_2mmc.patch
@@ -0,0 +1,67 @@
+From 8176a47931d8d418bacba4a6cfa0703f11f7b2a4 Mon Sep 17 00:00:00 2001
+From: Ulf Samuelsson <ulf_samuelsson@telia.com>
+Date: Fri, 28 Oct 2011 12:12:35 +0200
+Subject: [PATCH 21/23] Makefile: add at91sam9g20ek_2mmc
+
+---
+ Makefile | 28 +++++++++++++++++++++++-----
+ 1 files changed, 23 insertions(+), 5 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 2db49be..f7f530f 100644
+--- a/Makefile
++++ b/Makefile
+@@ -2740,27 +2740,45 @@ at91cap9adk_config : unconfig
+ at91sam9260ek_nandflash_config \
+ at91sam9260ek_dataflash_cs0_config \
+ at91sam9260ek_dataflash_cs1_config \
++at91sam9260ek_sd_config \
+ at91sam9260ek_config \
+ at91sam9g20ek_nandflash_config \
+ at91sam9g20ek_dataflash_cs0_config \
+ at91sam9g20ek_dataflash_cs1_config \
+-at91sam9g20ek_config : unconfig
++at91sam9g20ek_sd_config \
++at91sam9g20ek_config \
++at91sam9g20ek_2mmc_nandflash_config \
++at91sam9g20ek_2mmc_dataflash_cs0_config \
++at91sam9g20ek_2mmc_dataflash_cs1_config \
++at91sam9g20ek_2mmc_sd_config \
++at91sam9g20ek_2mmc_config : unconfig
+ @mkdir -p $(obj)include
+ @if [ "$(findstring 9g20,$@)" ] ; then \
+- echo "#define CONFIG_AT91SAM9G20EK 1" >>$(obj)include/config.h ; \
+- $(XECHO) "... 9G20 Variant" ; \
++ if [ "$(findstring 2mmc,$@)" ] ; then \
++ echo "#define CONFIG_AT91SAM9G20EK_2MMC 1" >>$(obj)include/config.h ; \
++ $(XECHO) "... 9G20_2mmc Variant" ; \
++ else \
++ echo "#define CONFIG_AT91SAM9G20EK 1" >>$(obj)include/config.h ; \
++ $(XECHO) "... 9G20 Variant" ; \
++ fi; \
+ else \
+ echo "#define CONFIG_AT91SAM9260EK 1" >>$(obj)include/config.h ; \
+ fi;
+ @if [ "$(findstring _nandflash,$@)" ] ; then \
+ echo "#define CONFIG_SYS_USE_NANDFLASH 1" >>$(obj)include/config.h ; \
+ $(XECHO) "... with environment variable in NAND FLASH" ; \
+- elif [ "$(findstring dataflash_cs0,$@)" ] ; then \
++ elif [ "$(findstring _sd,$@)" ] ; then \
++ echo "#define CONFIG_SYS_USE_SDCARD 1" >>$(obj)include/config.h ; \
++ $(XECHO) "... with environment variables on an SD-Card" ; \
++ elif [ "$(findstring _dataflash_cs0,$@)" ] ; then \
+ echo "#define CONFIG_SYS_USE_DATAFLASH_CS0 1" >>$(obj)include/config.h ; \
+ $(XECHO) "... with environment variable in SPI DATAFLASH CS0" ; \
+- else \
++ elif [ "$(findstring _dataflash_cs1,$@)" ] ; then \
+ echo "#define CONFIG_SYS_USE_DATAFLASH_CS1 1" >>$(obj)include/config.h ; \
+ $(XECHO) "... with environment variable in SPI DATAFLASH CS1" ; \
++ else \
++ echo "#define CONFIG_SYS_USE_DATAFLASH_CS0 1" >>$(obj)include/config.h ; \
++ $(XECHO) "... with environment variable in SPI DATAFLASH CS0" ; \
+ fi;
+ @$(MKCONFIG) -a at91sam9260ek arm arm926ejs at91sam9260ek atmel at91
+
+--
+1.7.5.4
+
diff --git a/recipes/u-boot/u-boot-2009.11/at91/0022-sam920ek_2mmc-Add-support.patch b/recipes/u-boot/u-boot-2009.11/at91/0022-sam920ek_2mmc-Add-support.patch
new file mode 100644
index 0000000..6cd28f0
--- /dev/null
+++ b/recipes/u-boot/u-boot-2009.11/at91/0022-sam920ek_2mmc-Add-support.patch
@@ -0,0 +1,203 @@
+From a8b47c3ed7121934fd5a412fc8c3e46289d1d476 Mon Sep 17 00:00:00 2001
+From: Ulf Samuelsson <ulf_samuelsson@telia.com>
+Date: Fri, 28 Oct 2011 12:13:50 +0200
+Subject: [PATCH 22/23] sam920ek_2mmc: Add support
+
+---
+ board/atmel/at91sam9260ek/at91sam9260ek.c | 24 +++++++++-
+ cpu/arm926ejs/at91/at91sam9260_devices.c | 12 +++++
+ include/configs/at91sam9260ek.h | 70 ++++++++++++++++++++++++++---
+ 3 files changed, 97 insertions(+), 9 deletions(-)
+
+diff --git a/board/atmel/at91sam9260ek/at91sam9260ek.c b/board/atmel/at91sam9260ek/at91sam9260ek.c
+index ed47360..874da86 100644
+--- a/board/atmel/at91sam9260ek/at91sam9260ek.c
++++ b/board/atmel/at91sam9260ek/at91sam9260ek.c
+@@ -38,7 +38,7 @@
+ #include <netdev.h>
+
+ DECLARE_GLOBAL_DATA_PTR;
+-
++extern atmel_mci_init(void);
+ /* ------------------------------------------------------------------------- */
+ /*
+ * Miscelaneous platform dependent initialisations
+@@ -148,9 +148,23 @@ int board_init(void)
+ #ifdef CONFIG_AT91SAM9G20EK
+ /* arch number of AT91SAM9260EK-Board */
+ gd->bd->bi_arch_number = MACH_TYPE_AT91SAM9G20EK;
+-#else
++#ifdef CONFIG_SYS_USE_SDCARD
++ setenv("machine", "at91sam9g20ek");
++#endif
++#endif
++#ifdef CONFIG_AT91SAM9G20EK_2MMC
++ /* arch number of AT91SAM9260EK-Board */
++ gd->bd->bi_arch_number = MACH_TYPE_AT91SAM9G20EK_2MMC;
++#ifdef CONFIG_SYS_USE_SDCARD
++ setenv("machine", "at91sam9g20ek_2mmc");
++#endif
++#endif
++#ifdef CONFIG_AT91SAM9260EK
+ /* arch number of AT91SAM9260EK-Board */
+ gd->bd->bi_arch_number = MACH_TYPE_AT91SAM9260EK;
++#ifdef CONFIG_SYS_USE_SDCARD
++ setenv("machine", "at91sam9260ek");
++#endif
+ #endif
+ /* adress of boot parameters */
+ gd->bd->bi_boot_params = PHYS_SDRAM + 0x100;
+@@ -162,6 +176,12 @@ int board_init(void)
+ #ifdef CONFIG_HAS_DATAFLASH
+ at91_spi0_hw_init((1 << 0) | (1 << 1));
+ #endif
++
++#if defined(CONFIG_MMC)
++ at91_mci0_hw_init();
++ atmel_mci_init();
++#endif
++
+ #ifdef CONFIG_MACB
+ at91sam9260ek_macb_hw_init();
+ #endif
+diff --git a/cpu/arm926ejs/at91/at91sam9260_devices.c b/cpu/arm926ejs/at91/at91sam9260_devices.c
+index f86cb99..dd66047 100644
+--- a/cpu/arm926ejs/at91/at91sam9260_devices.c
++++ b/cpu/arm926ejs/at91/at91sam9260_devices.c
+@@ -182,3 +182,15 @@ void at91_macb_hw_init(void)
+ #endif
+ }
+ #endif
++#if defined(CONFIG_MMC)
++void at91_mci0_hw_init()
++{
++ at91_set_A_periph(AT91_PIN_PA8, 0); /* MCI0_CK */
++ at91_set_A_periph(AT91_PIN_PA7, 0); /* MCI0_CDA */
++ at91_set_A_periph(AT91_PIN_PA6, 0); /* MCI0_DA0 */
++ at91_set_A_periph(AT91_PIN_PA9, 0); /* MCI0_DA1 */
++ at91_set_A_periph(AT91_PIN_PA10, 0); /* MCI0_DA2 */
++ at91_set_A_periph(AT91_PIN_PA11, 0); /* MCI0_DA3 */
++ at91_sys_write(AT91_PMC_PCER, 1 << AT91SAM9260_ID_MCI);
++}
++#endif
+diff --git a/include/configs/at91sam9260ek.h b/include/configs/at91sam9260ek.h
+index 3507de2..132c69e 100644
+--- a/include/configs/at91sam9260ek.h
++++ b/include/configs/at91sam9260ek.h
+@@ -82,13 +82,34 @@
+ #undef CONFIG_CMD_IMI
+ #undef CONFIG_CMD_IMLS
+ #undef CONFIG_CMD_LOADS
++
+ #undef CONFIG_CMD_SOURCE
+
++#define CONFIG_CMD_SOURCE
++#undef CONFIG_CMD_XIMG
++#define CONFIG_CMD_ASKENV
++#define CONFIG_CMD_EXT2
++#define CONFIG_CMD_FAT
++#undef CONFIG_CMD_JFFS2
++#define CONFIG_CMD_MMC
++#define CONFIG_CMD_AUTOSCRIPT
++
+ #define CONFIG_CMD_PING 1
+ #define CONFIG_CMD_DHCP 1
+ #define CONFIG_CMD_NAND 1
+ #define CONFIG_CMD_USB 1
+
++#define CONFIG_CMD_DEBUG 1
++#define CONFIG_CMD_FACTORY 1
++
++/* MCI */
++#define MMCI_BASE AT91SAM9260_BASE_MCI
++#define CONFIG_MMC 1
++#define CONFIG_ATMEL_MCI 1
++#define CONFIG_ATMEL_HSMCI 1
++#define CONFIG_SYS_MMC_CLK_OD 1000000
++#define CONFIG_SUPPORT_VFAT
++
+ /* SDRAM */
+ #define CONFIG_NR_DRAM_BANKS 1
+ #define PHYS_SDRAM 0x20000000
+@@ -145,7 +166,6 @@
+ #define CONFIG_SYS_USB_OHCI_SLOT_NAME "at91sam9260"
+ #define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 2
+ #define CONFIG_USB_STORAGE 1
+-#define CONFIG_CMD_FAT 1
+
+ #define CONFIG_SYS_LOAD_ADDR 0x22000000 /* load address */
+
+@@ -166,7 +186,9 @@
+ "mtdparts=atmel_nand:-(root) " \
+ "rw rootfstype=jffs2"
+
+-#elif CONFIG_SYS_USE_DATAFLASH_CS1
++#endif
++
++#ifdef CONFIG_SYS_USE_DATAFLASH_CS1
+
+ /* bootstrap + u-boot + env + linux in dataflash on CS1 */
+ #define CONFIG_ENV_IS_IN_DATAFLASH 1
+@@ -179,20 +201,54 @@
+ "root=/dev/mtdblock0 " \
+ "mtdparts=atmel_nand:-(root) " \
+ "rw rootfstype=jffs2"
++#endif
++
++#ifdef CONFIG_SYS_USE_SDCARD
++#define CONFIG_ENV_IS_NOWHERE
++#define CONFIG_ENV_SIZE 0x4200
++#define CONFIG_ENV_SECT_SIZE 0x420
++#define CONFIG_SYS_ROOTFS_SD 1
++
++/*
++ * Machine Ids
++ * at91sam9260ek= 44b 1099
++ * at91sam9g20ek= 658 1624
++ * at91sam9g20ek_2mmc= 8F0 2288
++ */
++
++#define CONFIG_EXTRA_ENV_SETTINGS \
++ "sdram_start=0x20000000\0" \
++ "kernel_address=0x22000000\0" \
++ "kernel=uimage\0" \
++ "load_env=fatload mmc 0:1 ${sdram_start} ${machine}/u-boot.env ; source ${sdram_start}\0" \
++ "load_kernel=fatload mmc 0:1 ${kernel_address} ${machine}/${kernel}\0" \
++
++
++#define CONFIG_BOOTCOMMAND "mmc init; run load_env ; run load_kernel ; bootm 0x22000000"
++#define CONFIG_BOOTARGS "mem=64M " \
++ "console=ttyS0,115200 " \
++ "root=/dev/mmcblk0p2 " \
++ "rootdelay=2 "\
++ "rootfstype=rootfs rw"
++#endif
+
+-#else /* CONFIG_SYS_USE_NANDFLASH */
++#ifdef CONFIG_SYS_USE_NANDFLASH
+
+ /* 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_SIZE 0x20000 /* 1 sector = 128 kB */
+-#define CONFIG_BOOTCOMMAND "nand read 0x22000000 0xA0000 0x200000; bootm"
++#define CONFIG_BOOTCOMMAND "nand read 0x22000000 0x200000 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) " \
++ "mtdparts=atmel_nand:128k(bootstrap)ro,"\
++ "256k(uboot)ro," \
++ "128k(env1)ro," \
++ "128k(env2)ro," \
++ "384k(unused)ro," \
++ "2M(linux)," \
++ "-(root) " \
+ "rw rootfstype=jffs2"
+
+ #endif
+--
+1.7.5.4
+
diff --git a/recipes/u-boot/u-boot-2009.11/at91/0023-sam9m10g45ek-sd-card-boot-environment.patch b/recipes/u-boot/u-boot-2009.11/at91/0023-sam9m10g45ek-sd-card-boot-environment.patch
new file mode 100644
index 0000000..55ad249
--- /dev/null
+++ b/recipes/u-boot/u-boot-2009.11/at91/0023-sam9m10g45ek-sd-card-boot-environment.patch
@@ -0,0 +1,30 @@
+From 1765845bf86b88a08bd8c009630cc442c43d9d05 Mon Sep 17 00:00:00 2001
+From: Ulf Samuelsson <ulf_samuelsson@telia.com>
+Date: Fri, 28 Oct 2011 12:14:36 +0200
+Subject: [PATCH 23/23] sam9m10g45ek: sd-card boot environment
+
+---
+ include/configs/at91sam9m10g45ek.h | 7 +++++--
+ 1 files changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/include/configs/at91sam9m10g45ek.h b/include/configs/at91sam9m10g45ek.h
+index a3d854b..7705adc 100644
+--- a/include/configs/at91sam9m10g45ek.h
++++ b/include/configs/at91sam9m10g45ek.h
+@@ -239,8 +239,11 @@
+ #define CONFIG_ENV_SECT_SIZE 0x420
+ #define CONFIG_SYS_ROOTFS_SD 1
+ #define CONFIG_EXTRA_ENV_SETTINGS \
+- "load_env=fatload mmc 0:1 0x70000000 u-boot.env ; source 0x70000000 \0" \
+- "load_kernel=fatload mmc 0:1 0x72000000 uimage\0" \
++ "sdram_start=0x70000000\0" \
++ "kernel_address=0x72000000\0" \
++ "kernel=uimage\0" \
++ "load_env=fatload mmc 0:1 ${sdram_start} u-boot.env ; source ${sdram_start}\0" \
++ "load_kernel=fatload mmc 0:1 ${kernel_address} ${machine}/${kernel}\0" \
+ "at91sam9m10ekes=9cd\0" \
+ "at91sam9g45ekes=8a4\0" \
+ "at91sam9m10g45ek=726\0" \
+--
+1.7.5.4
+
diff --git a/recipes/u-boot/u-boot-2009.11/at91/0024-Minor-fixes-to-_2mmc-support.patch b/recipes/u-boot/u-boot-2009.11/at91/0024-Minor-fixes-to-_2mmc-support.patch
new file mode 100644
index 0000000..7fd061d
--- /dev/null
+++ b/recipes/u-boot/u-boot-2009.11/at91/0024-Minor-fixes-to-_2mmc-support.patch
@@ -0,0 +1,103 @@
+From 5b9b37a48f4a1597731baa795f45c0a73867fce7 Mon Sep 17 00:00:00 2001
+From: Ulf Samuelsson <ulf_samuelsson@telia.com>
+Date: Sat, 29 Oct 2011 12:46:22 +0200
+Subject: [PATCH] Minor fixes to _2mmc support
+
+
+Signed-off-by: Ulf Samuelsson <ulf.samuelsson@telia.com>
+---
+ cpu/arm926ejs/at91/at91sam9m10g45_devices.c | 14 +++++++-------
+ include/configs/at91sam9260ek.h | 23 +++++++++++++----------
+ 2 files changed, 20 insertions(+), 17 deletions(-)
+
+diff --git a/cpu/arm926ejs/at91/at91sam9m10g45_devices.c b/cpu/arm926ejs/at91/at91sam9m10g45_devices.c
+index ad25e41..ec36209 100644
+--- a/cpu/arm926ejs/at91/at91sam9m10g45_devices.c
++++ b/cpu/arm926ejs/at91/at91sam9m10g45_devices.c
+@@ -176,13 +176,13 @@ void at91_macb_hw_init(void)
+ #if defined(CONFIG_MMC)
+ void at91_mci0_hw_init()
+ {
+- at91_set_A_periph(AT91_PIN_PA0, 0); /* MCI0_CK */
+- at91_set_A_periph(AT91_PIN_PA1, 0); /* MCI0_CDA */
+- at91_set_A_periph(AT91_PIN_PA2, 0); /* MCI0_DA0 */
+- at91_set_A_periph(AT91_PIN_PA3, 0); /* MCI0_DA1 */
+- at91_set_A_periph(AT91_PIN_PA4, 0); /* MCI0_DA2 */
+- at91_set_A_periph(AT91_PIN_PA5, 0); /* MCI0_DA3 */
+- at91_sys_write(AT91_PMC_PCER, 1 << AT91SAM9G45_ID_MCI0);
++ at91_set_A_periph(AT91_PIN_PA8, 0); /* MCI0_CK */
++ at91_set_A_periph(AT91_PIN_PA7, 0); /* MCI0_CDA */
++ at91_set_A_periph(AT91_PIN_PA6, 0); /* MCI0_DA0 */
++ at91_set_A_periph(AT91_PIN_PA9, 0); /* MCI0_DA1 */
++ at91_set_A_periph(AT91_PIN_PA10, 0); /* MCI0_DA2 */
++ at91_set_A_periph(AT91_PIN_PA11, 0); /* MCI0_DA3 */
++ at91_sys_write(AT91_PMC_PCER, 1 << AT91SAM9260_ID_MCI);
+ }
+ #endif
+
+diff --git a/include/configs/at91sam9260ek.h b/include/configs/at91sam9260ek.h
+index 132c69e..93d9007 100644
+--- a/include/configs/at91sam9260ek.h
++++ b/include/configs/at91sam9260ek.h
+@@ -30,13 +30,16 @@
+ /* ARM asynchronous clock */
+ #define AT91_MAIN_CLOCK 18432000 /* 18.432 MHz crystal */
+ #define CONFIG_SYS_HZ 1000
++#define CONFIG_SYS_MMC_CLK_PP 5000000
+
+ #define CONFIG_ARM926EJS 1 /* This is an ARM926EJS Core */
+
+-#ifdef CONFIG_AT91SAM9G20EK
++#if defined(CONFIG_AT91SAM9G20EK) || defined(CONFIG_AT91SAM9G20EK_2MMC)
+ #define CONFIG_AT91SAM9G20 1 /* It's an Atmel AT91SAM9G20 SoC*/
+-#else
++#elif defined(CONFIG_AT91SAM9260EK)
+ #define CONFIG_AT91SAM9260 1 /* It's an Atmel AT91SAM9260 SoC*/
++#else
++#error "Unknown board"
+ #endif
+
+ #define CONFIG_ARCH_CPU_INIT
+@@ -106,7 +109,7 @@
+ #define MMCI_BASE AT91SAM9260_BASE_MCI
+ #define CONFIG_MMC 1
+ #define CONFIG_ATMEL_MCI 1
+-#define CONFIG_ATMEL_HSMCI 1
++#undef CONFIG_ATMEL_HSMCI
+ #define CONFIG_SYS_MMC_CLK_OD 1000000
+ #define CONFIG_SUPPORT_VFAT
+
+@@ -124,7 +127,7 @@
+ #define CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS1 0xD0000000 /* CS1 */
+ #define AT91_SPI_CLK 15000000
+
+-#ifdef CONFIG_AT91SAM9G20EK
++#if defined(CONFIG_AT91SAM9G20EK) || defined(CONFIG_AT91SAM9G20EK_2MMC)
+ #define DATAFLASH_TCSS (0x22 << 16)
+ #else
+ #define DATAFLASH_TCSS (0x1a << 16)
+@@ -220,15 +223,15 @@
+ "sdram_start=0x20000000\0" \
+ "kernel_address=0x22000000\0" \
+ "kernel=uimage\0" \
+- "load_env=fatload mmc 0:1 ${sdram_start} ${machine}/u-boot.env ; source ${sdram_start}\0" \
+- "load_kernel=fatload mmc 0:1 ${kernel_address} ${machine}/${kernel}\0" \
++ "load_env=fatload mmc 0:1 ${sdram_start} u-boot.env ; source ${sdram_start}\0" \
++ "load_kernel=fatload mmc 0:1 ${kernel_address} ${kernel}\0" \
+
+
+ #define CONFIG_BOOTCOMMAND "mmc init; run load_env ; run load_kernel ; bootm 0x22000000"
+-#define CONFIG_BOOTARGS "mem=64M " \
+- "console=ttyS0,115200 " \
+- "root=/dev/mmcblk0p2 " \
+- "rootdelay=2 "\
++#define CONFIG_BOOTARGS "mem=64M " \
++ "console=ttyS0,115200 " \
++ "root=/dev/mmcblk0p2 " \
++ "rootdelay=2 " \
+ "rootfstype=rootfs rw"
+ #endif
+
+--
+1.7.5.4
+
diff --git a/recipes/u-boot/u-boot-2009.11/at91/0026-Revert-bad-sam9m10g45_devices.c-patch.patch b/recipes/u-boot/u-boot-2009.11/at91/0026-Revert-bad-sam9m10g45_devices.c-patch.patch
new file mode 100644
index 0000000..9ad0e95
--- /dev/null
+++ b/recipes/u-boot/u-boot-2009.11/at91/0026-Revert-bad-sam9m10g45_devices.c-patch.patch
@@ -0,0 +1,38 @@
+From 6b8008178f4b80c687d89127d32fb715fde2286e Mon Sep 17 00:00:00 2001
+From: Ulf Samuelsson <ulf_samuelsson@telia.com>
+Date: Sat, 29 Oct 2011 13:24:53 +0200
+Subject: [PATCH] Revert bad sam9m10g45_devices.c patch
+
+Signed-off-by: Ulf Samuelsson <ulf.samuelsson@telia.com>
+---
+ cpu/arm926ejs/at91/at91sam9m10g45_devices.c | 14 +++++++-------
+ 1 files changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/cpu/arm926ejs/at91/at91sam9m10g45_devices.c b/cpu/arm926ejs/at91/at91sam9m10g45_devices.c
+index ec36209..ad25e41 100644
+--- a/cpu/arm926ejs/at91/at91sam9m10g45_devices.c
++++ b/cpu/arm926ejs/at91/at91sam9m10g45_devices.c
+@@ -176,13 +176,13 @@ void at91_macb_hw_init(void)
+ #if defined(CONFIG_MMC)
+ void at91_mci0_hw_init()
+ {
+- at91_set_A_periph(AT91_PIN_PA8, 0); /* MCI0_CK */
+- at91_set_A_periph(AT91_PIN_PA7, 0); /* MCI0_CDA */
+- at91_set_A_periph(AT91_PIN_PA6, 0); /* MCI0_DA0 */
+- at91_set_A_periph(AT91_PIN_PA9, 0); /* MCI0_DA1 */
+- at91_set_A_periph(AT91_PIN_PA10, 0); /* MCI0_DA2 */
+- at91_set_A_periph(AT91_PIN_PA11, 0); /* MCI0_DA3 */
+- at91_sys_write(AT91_PMC_PCER, 1 << AT91SAM9260_ID_MCI);
++ at91_set_A_periph(AT91_PIN_PA0, 0); /* MCI0_CK */
++ at91_set_A_periph(AT91_PIN_PA1, 0); /* MCI0_CDA */
++ at91_set_A_periph(AT91_PIN_PA2, 0); /* MCI0_DA0 */
++ at91_set_A_periph(AT91_PIN_PA3, 0); /* MCI0_DA1 */
++ at91_set_A_periph(AT91_PIN_PA4, 0); /* MCI0_DA2 */
++ at91_set_A_periph(AT91_PIN_PA5, 0); /* MCI0_DA3 */
++ at91_sys_write(AT91_PMC_PCER, 1 << AT91SAM9G45_ID_MCI0);
+ }
+ #endif
+
+--
+1.7.5.4
+
diff --git a/recipes/u-boot/u-boot-2009.11/at91/series b/recipes/u-boot/u-boot-2009.11/at91/series
new file mode 100644
index 0000000..b31f489
--- /dev/null
+++ b/recipes/u-boot/u-boot-2009.11/at91/series
@@ -0,0 +1,5 @@
+ file://u-boot-2009.11/at91/0022-sam920ek_2mmc-Add-support.patch \
+ file://u-boot-2009.11/at91/0023-sam9m10g45ek-sd-card-boot-environment.patch \
+ file://u-boot-2009.11/at91/0024-Minor-fixes-to-_2mmc-support.patch \
+ file://u-boot-2009.11/at91/0026-Revert-bad-sam9m10g45_devices.c-patch.patch \
+
diff --git a/recipes/u-boot/u-boot_2009.11.bb b/recipes/u-boot/u-boot_2009.11.bb
index e2a8d5a..53af00e 100644
--- a/recipes/u-boot/u-boot_2009.11.bb
+++ b/recipes/u-boot/u-boot_2009.11.bb
@@ -4,6 +4,7 @@ require u-boot_r2.inc
DEFAULT_PREFERENCE = "-1"
DEFAULT_PREFERENCE_at91sam9g10ek = "2"
DEFAULT_PREFERENCE_at91sam9g20ek = "2"
+DEFAULT_PREFERENCE_at91sam9g20ek-2mmc = "2"
DEFAULT_PREFERENCE_at91sam9g45ek = "2"
DEFAULT_PREFERENCE_at91sam9m10ekes = "2"
DEFAULT_PREFERENCE_at91sam9m10g45ek = "2"
@@ -30,8 +31,15 @@ SRC_URI_append_at91 = "\
file://at91/0014-AT91-MCI-Add-support-for-SD-Card.patch \
file://at91/0015-sam9m10g45ek-Add-configuration-file.patch \
file://at91/0016-SupportEnv-load-from-SD-Card.patch \
- file://0017-SD-Card-boot-patch-for-SAM9M10-G45.patch \
- file://0018-ADD-AT91-Build-script.patch \
+ file://at91/0017-SD-Card-boot-patch-for-SAM9M10-G45.patch \
+ file://at91/0018-ADD-AT91-Build-script.patch \
+ file://at91/0019-Add-to-.gitignore.patch \
+ file://at91/0020-Update-build-script.patch \
+ file://at91/0021-Makefile-add-at91sam9g20ek_2mmc.patch \
+ file://at91/0022-sam920ek_2mmc-Add-support.patch \
+ file://at91/0023-sam9m10g45ek-sd-card-boot-environment.patch \
+ file://at91/0024-Minor-fixes-to-_2mmc-support.patch \
+ file://at91/0026-Revert-bad-sam9m10g45_devices.c-patch.patch \
"
SRC_URI_append_adb4000 = "\
@@ -65,6 +73,10 @@ TARGET_LDFLAGS = ""
inherit base
+do_configure () {
+ echo "No configuration"
+}
+
do_compile () {
if ! [ "x${UBOOT_MACHINES}" == "x" ] ; then
for board in ${UBOOT_MACHINES} ; do