summaryrefslogtreecommitdiffstats
path: root/arch/arm/boards/at91sam9260ek
diff options
context:
space:
mode:
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2010-09-18 04:26:14 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2010-09-20 08:58:53 +0200
commitd8f3ee103a9f4bd6f82a5830cfe38174864cfb86 (patch)
tree3464efc84ae2195211dcec8ffcc0264266fb27a0 /arch/arm/boards/at91sam9260ek
parentd8f747bb995b79b35b0b1c6e8cf95358440018d4 (diff)
downloadbarebox-d8f3ee103a9f4bd6f82a5830cfe38174864cfb86.tar.gz
barebox-d8f3ee103a9f4bd6f82a5830cfe38174864cfb86.tar.xz
Support for the at91sam9g20 : Atmel 400Mhz ARM 926ej-s SOC.
AT91sam9g20 is an evolution of the at91sam9260 with a faster clock speed. We created a new board for this device but based the chip support directly on 9260 files with little updates. Here is the chip page on Atmel wabsite: http://atmel.com/dyn/products/product_card.asp?part_id=4337 Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Cc: Nicolas Ferre <nicolas.ferre@atmel.com> Cc: Patrice Vilchez <patrice.vilchez@atmel.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/boards/at91sam9260ek')
-rw-r--r--arch/arm/boards/at91sam9260ek/init.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/arch/arm/boards/at91sam9260ek/init.c b/arch/arm/boards/at91sam9260ek/init.c
index 7bb3c453d5..966dd2fd30 100644
--- a/arch/arm/boards/at91sam9260ek/init.c
+++ b/arch/arm/boards/at91sam9260ek/init.c
@@ -40,6 +40,25 @@
#include <mach/at91_pmc.h>
#include <mach/at91_rstc.h>
+/*
+ * board revision encoding
+ * bit 0:
+ * 0 => 1 mmc
+ * 1 => 2 mmcs (board from revision C)
+ */
+#define HAVE_2MMC (1 << 0)
+static void ek_set_board_type(void)
+{
+ if (machine_is_at91sam9g20ek()) {
+ armlinux_set_architecture(MACH_TYPE_AT91SAM9G20EK);
+#ifdef CONFIG_AT91_HAVE_2MMC
+ armlinux_set_revision(HAVE_2MMC);
+#endif
+ } else {
+ armlinux_set_architecture(MACH_TYPE_AT91SAM9260EK);
+ }
+}
+
static struct atmel_nand_data nand_pdata = {
.ale = 21,
.cle = 22,
@@ -130,7 +149,7 @@ static int at91sam9260ek_devices_init(void)
at91_add_device_sdram(64 * 1024 * 1024);
armlinux_set_bootparams((void *)(AT91_CHIPSELECT_1 + 0x100));
- armlinux_set_architecture(MACH_TYPE_AT91SAM9260EK);
+ ek_set_board_type();
devfs_add_partition("nand0", 0x00000, 0x80000, PARTITION_FIXED, "self_raw");
dev_add_bb_dev("self_raw", "self0");