summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2012-12-07 16:43:16 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2012-12-07 16:43:16 +0100
commit759946809a350b0a8158842924ab139e93eeef13 (patch)
tree4c594306b29c4ca5b0b5830661bdce27a84b6f2d
parentdf1d2a725755dbe78b2a9c8ab924a9ff238e9a04 (diff)
parentd90be4efeb9f592d30a412c4a7e72d818fc23e85 (diff)
downloadbarebox-759946809a350b0a8158842924ab139e93eeef13.tar.gz
barebox-759946809a350b0a8158842924ab139e93eeef13.tar.xz
Merge branch 'for-next/omap'
-rw-r--r--arch/arm/mach-omap/include/mach/omap4-mux.h2
-rw-r--r--arch/arm/mach-omap/include/mach/omap4-silicon.h15
-rw-r--r--arch/arm/mach-omap/omap3_generic.c12
-rw-r--r--arch/arm/mach-omap/omap4_generic.c12
4 files changed, 28 insertions, 13 deletions
diff --git a/arch/arm/mach-omap/include/mach/omap4-mux.h b/arch/arm/mach-omap/include/mach/omap4-mux.h
index 9088631cb1..db92a61bcc 100644
--- a/arch/arm/mach-omap/include/mach/omap4-mux.h
+++ b/arch/arm/mach-omap/include/mach/omap4-mux.h
@@ -30,7 +30,7 @@ struct pad_conf_entry {
u16 val;
-} __attribute__ ((packed));
+};
#define WAKEUP_EN (1 << 14)
#ifdef CONFIG_OFF_PADCONF
diff --git a/arch/arm/mach-omap/include/mach/omap4-silicon.h b/arch/arm/mach-omap/include/mach/omap4-silicon.h
index 71ffe39d76..008eafb949 100644
--- a/arch/arm/mach-omap/include/mach/omap4-silicon.h
+++ b/arch/arm/mach-omap/include/mach/omap4-silicon.h
@@ -101,6 +101,21 @@
#define OMAP44XX_MMC4_BASE (OMAP44XX_L4_PER_BASE + 0x0D1100)
#define OMAP44XX_MMC5_BASE (OMAP44XX_L4_PER_BASE + 0x0D5100)
+/* GPIO
+ *
+ * Note that, while the GPIO controller is the same as on an OMAP3,
+ * the base address has an additional offset of 0x100, which you can
+ * see being added here so that the OMAP_GPIO_* macros you see in
+ * mach-omap/gpio.c don't need to be adjusted based on the platform.
+ */
+
+#define OMAP44XX_GPIO1_BASE (OMAP44XX_L4_WKUP_BASE + 0x10100)
+#define OMAP44XX_GPIO2_BASE (OMAP44XX_L4_PER_BASE + 0x55100)
+#define OMAP44XX_GPIO3_BASE (OMAP44XX_L4_PER_BASE + 0x57100)
+#define OMAP44XX_GPIO4_BASE (OMAP44XX_L4_PER_BASE + 0x59100)
+#define OMAP44XX_GPIO5_BASE (OMAP44XX_L4_PER_BASE + 0x5B100)
+#define OMAP44XX_GPIO6_BASE (OMAP44XX_L4_PER_BASE + 0x5D100)
+
/* GPMC */
#define OMAP_GPMC_BASE 0x50000000
diff --git a/arch/arm/mach-omap/omap3_generic.c b/arch/arm/mach-omap/omap3_generic.c
index 68d73e32d1..7cfb3e4eb1 100644
--- a/arch/arm/mach-omap/omap3_generic.c
+++ b/arch/arm/mach-omap/omap3_generic.c
@@ -512,17 +512,17 @@ const struct gpmc_config omap3_nand_cfg = {
#ifndef __PBL__
static int omap3_gpio_init(void)
{
- add_generic_device("omap-gpio", 0, NULL, 0x48310000,
+ add_generic_device("omap-gpio", 0, NULL, OMAP_GPIO1_BASE,
0xf00, IORESOURCE_MEM, NULL);
- add_generic_device("omap-gpio", 1, NULL, 0x49050000,
+ add_generic_device("omap-gpio", 1, NULL, OMAP_GPIO2_BASE,
0xf00, IORESOURCE_MEM, NULL);
- add_generic_device("omap-gpio", 2, NULL, 0x49052000,
+ add_generic_device("omap-gpio", 2, NULL, OMAP_GPIO3_BASE,
0xf00, IORESOURCE_MEM, NULL);
- add_generic_device("omap-gpio", 3, NULL, 0x49054000,
+ add_generic_device("omap-gpio", 3, NULL, OMAP_GPIO4_BASE,
0xf00, IORESOURCE_MEM, NULL);
- add_generic_device("omap-gpio", 4, NULL, 0x49056000,
+ add_generic_device("omap-gpio", 4, NULL, OMAP_GPIO5_BASE,
0xf00, IORESOURCE_MEM, NULL);
- add_generic_device("omap-gpio", 5, NULL, 0x49058000,
+ add_generic_device("omap-gpio", 5, NULL, OMAP_GPIO6_BASE,
0xf00, IORESOURCE_MEM, NULL);
return 0;
diff --git a/arch/arm/mach-omap/omap4_generic.c b/arch/arm/mach-omap/omap4_generic.c
index c75666483b..dc1dbae214 100644
--- a/arch/arm/mach-omap/omap4_generic.c
+++ b/arch/arm/mach-omap/omap4_generic.c
@@ -611,17 +611,17 @@ const struct gpmc_config omap4_nand_cfg = {
static int omap4_gpio_init(void)
{
- add_generic_device("omap-gpio", 0, NULL, 0x4a310100,
+ add_generic_device("omap-gpio", 0, NULL, OMAP44XX_GPIO1_BASE,
0xf00, IORESOURCE_MEM, NULL);
- add_generic_device("omap-gpio", 1, NULL, 0x48055100,
+ add_generic_device("omap-gpio", 1, NULL, OMAP44XX_GPIO2_BASE,
0xf00, IORESOURCE_MEM, NULL);
- add_generic_device("omap-gpio", 2, NULL, 0x48057100,
+ add_generic_device("omap-gpio", 2, NULL, OMAP44XX_GPIO3_BASE,
0xf00, IORESOURCE_MEM, NULL);
- add_generic_device("omap-gpio", 3, NULL, 0x48059100,
+ add_generic_device("omap-gpio", 3, NULL, OMAP44XX_GPIO4_BASE,
0xf00, IORESOURCE_MEM, NULL);
- add_generic_device("omap-gpio", 4, NULL, 0x4805b100,
+ add_generic_device("omap-gpio", 4, NULL, OMAP44XX_GPIO5_BASE,
0xf00, IORESOURCE_MEM, NULL);
- add_generic_device("omap-gpio", 5, NULL, 0x4805d100,
+ add_generic_device("omap-gpio", 5, NULL, OMAP44XX_GPIO6_BASE,
0xf00, IORESOURCE_MEM, NULL);
return 0;