summaryrefslogtreecommitdiffstats
path: root/arch/arm/boards/at91sam9m10g45ek
diff options
context:
space:
mode:
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2011-01-22 16:45:34 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2011-01-24 08:56:06 +0100
commit488fbba21f89e517089a99f5cea20aa3ad4bce62 (patch)
treefd28f82a5e64f1a055b08c1cde7b103ca0a2185a /arch/arm/boards/at91sam9m10g45ek
parent442231fe65876a2ca4cb3aba73fb94799983a006 (diff)
downloadbarebox-488fbba21f89e517089a99f5cea20aa3ad4bce62.tar.gz
barebox-488fbba21f89e517089a99f5cea20aa3ad4bce62.tar.xz
at91sam9m10g45ek: add board revision support
we use the board revision to specify to the linux kernel the type of lcd we use. So we can have only one machine for those 3 boards: - sam9m10-ekes (LG) - sam9g45-ekes (LG) - sam9m10g45-ek (Truly) today we support 2 lcds model: - LG philips LB043WQ1 - Truly TFT1N4633-E by default we select the Truly as the sam9m10g45-ek is the most common board 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/at91sam9m10g45ek')
-rw-r--r--arch/arm/boards/at91sam9m10g45ek/init.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/arch/arm/boards/at91sam9m10g45ek/init.c b/arch/arm/boards/at91sam9m10g45ek/init.c
index bb8b7bada6..77d51b7d99 100644
--- a/arch/arm/boards/at91sam9m10g45ek/init.c
+++ b/arch/arm/boards/at91sam9m10g45ek/init.c
@@ -40,6 +40,26 @@
#include <mach/at91sam9_smc.h>
#include <mach/sam9_smc.h>
+/*
+ * board revision encoding
+ * bit 0-3: lcd type
+ * 0 => truly TFT1N4633-E (sam9m10g45-ek)
+ * 1 => LG philips LB043WQ1 (sam9m10-ekes and sam9g45-ekes)
+ */
+#define HAVE_LCD_TRULY_TFT1N4633E (0 << 0)
+#define HAVE_LCD_LG_LB043WQ1 (1 << 0)
+static void ek_set_board_revision(void)
+{
+ u32 rev;
+
+#ifdef CONFIG_LCD_LG_LB043WQ1
+ rev = HAVE_LCD_LG_LB043WQ1;
+#else
+ rev = HAVE_LCD_TRULY_TFT1N4633E;
+#endif
+ armlinux_set_revision(rev);
+}
+
static struct atmel_nand_data nand_pdata = {
.ale = 21,
.cle = 22,
@@ -103,6 +123,7 @@ static int at91sam9m10g45ek_devices_init(void)
armlinux_set_bootparams((void *)(AT91_CHIPSELECT_6 + 0x100));
armlinux_set_architecture(MACH_TYPE_AT91SAM9M10G45EK);
+ ek_set_board_revision();
return 0;
}