From 5c2417191a367e33931e5c454e3de807de2c790d Mon Sep 17 00:00:00 2001 From: Rejane Durand Date: Tue, 18 Oct 2011 13:37:05 +0200 Subject: [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 Tested-by: Rejane DURAND Reviewed-by: QATOOLS Reviewed-by: Baptiste CHAULOUX Tested-by: Baptiste CHAULOUX Reviewed-by: Christophe GUIBOUT Reviewed-by: Jonas ABERG --- arch/arm/mach-ux500/board-mop500-wlan.c | 20 +++++++++++++++++++- arch/arm/mach-ux500/board-u5500-pins.c | 6 ++++++ 2 files changed, 25 insertions(+), 1 deletion(-) (limited to 'arch') 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; +} -- cgit v1.2.3