summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorRejane Durand <rejane.durand@stericsson.com>2011-10-18 13:37:05 +0200
committerJonas ABERG <jonas.aberg@stericsson.com>2011-10-25 13:11:18 +0200
commit5c2417191a367e33931e5c454e3de807de2c790d (patch)
treeee78389575319dd893de667c2bfa42237b88d833 /arch
parent7fbd14f639e61126e7067d656174858e4998e277 (diff)
[U9500] Correct the GPIO configuration for WLAN
There are two parts in this correction. Firstly, as there is much in common between a U9500 platform and a U8500 one, all the tests performed to identify a U9500 platform shall be done before the ones related to U8500. Otherwise, the platform will be considered as a U8500 one and the GPIOs will be badly configured. Secondly, the mapping of WLAN_IRQ has to be changed. On U8500, WLAN_IRQ is mapped onto GPIO04. On U9500, it is GPIO144 that shall be used. ST-Ericsson ID: 368270 ST-Ericsson Linux next: NA ST-Ericsson FOSS-OUT ID: Trivial Change-Id: I5880f617c65f7cf4ca9eeabf22a53f7a77c20133 Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/34320 Reviewed-by: Rejane DURAND <rejane.durand@stericsson.com> Tested-by: Rejane DURAND <rejane.durand@stericsson.com> Reviewed-by: QATOOLS Reviewed-by: Baptiste CHAULOUX <baptiste.chauloux@stericsson.com> Tested-by: Baptiste CHAULOUX <baptiste.chauloux@stericsson.com> Reviewed-by: Christophe GUIBOUT <christophe.guibout@stericsson.com> Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-ux500/board-mop500-wlan.c20
-rw-r--r--arch/arm/mach-ux500/board-u5500-pins.c6
2 files changed, 25 insertions, 1 deletions
diff --git a/arch/arm/mach-ux500/board-mop500-wlan.c b/arch/arm/mach-ux500/board-mop500-wlan.c
index e525d4fe8aa..1e5c24ba1ea 100644
--- a/arch/arm/mach-ux500/board-mop500-wlan.c
+++ b/arch/arm/mach-ux500/board-mop500-wlan.c
@@ -47,6 +47,21 @@ static struct resource cw1200_href60_resources[] = {
},
};
+static struct resource cw1200_u9500_resources[] = {
+ {
+ .start = 85,
+ .end = 85,
+ .flags = IORESOURCE_IO,
+ .name = "cw1200_reset",
+ },
+ {
+ .start = NOMADIK_GPIO_TO_IRQ(144),
+ .end = NOMADIK_GPIO_TO_IRQ(144),
+ .flags = IORESOURCE_IRQ,
+ .name = "cw1200_irq",
+ },
+};
+
static struct cw1200_platform_data cw1200_platform_data = { 0 };
static struct platform_device cw1200_device = {
@@ -96,7 +111,10 @@ int __init mop500_wlan_init(void)
{
int ret;
- if (machine_is_u8500() || machine_is_nomadik()) {
+ if (pins_for_u9500()) {
+ cw1200_device.num_resources = ARRAY_SIZE(cw1200_u9500_resources);
+ cw1200_device.resource = cw1200_u9500_resources;
+ } else if (machine_is_u8500() || machine_is_nomadik()) {
cw1200_device.num_resources = ARRAY_SIZE(cw1200_href_resources);
cw1200_device.resource = cw1200_href_resources;
} else if (machine_is_hrefv60()) {
diff --git a/arch/arm/mach-ux500/board-u5500-pins.c b/arch/arm/mach-ux500/board-u5500-pins.c
index 4635f240815..759240edf4a 100644
--- a/arch/arm/mach-ux500/board-u5500-pins.c
+++ b/arch/arm/mach-ux500/board-u5500-pins.c
@@ -191,3 +191,9 @@ void __init u5500_pins_init(void)
nmk_config_pins(u5500_pins_default, ARRAY_SIZE(u5500_pins_default));
ux500_pins_add(u5500_pins, ARRAY_SIZE(u5500_pins));
}
+
+/* Stub function to make board-ux500-cg2900.c compile within a U5500 configuration */
+int pins_for_u9500(void)
+{
+ return 0;
+}