From e4da35140c42ec8606b7e4aa1b7b7bfd3aaebe11 Mon Sep 17 00:00:00 2001 From: Lukasz Rymanowski Date: Fri, 2 Sep 2011 15:25:34 +0530 Subject: cg2900: Fix for not working BT on hrefp V71 GPIO 170 is no longer used by BT. Remove it from cg2900_uart_resources. ST-Ericsson Linux next: Not tested, ER282957 ST-Ericsson ID: 328481 ST-Ericsson FOSS-OUT ID: Trivial Change-Id: Icec5ecc284806553bac2bd41bf555b70d1abadb8 Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/30037 Reviewed-by: Virupax SADASHIVPETIMATH Tested-by: Virupax SADASHIVPETIMATH --- drivers/staging/cg2900/board-mop500-cg2900.c | 31 +++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/drivers/staging/cg2900/board-mop500-cg2900.c b/drivers/staging/cg2900/board-mop500-cg2900.c index cfef96f6472..7347d116a5b 100644 --- a/drivers/staging/cg2900/board-mop500-cg2900.c +++ b/drivers/staging/cg2900/board-mop500-cg2900.c @@ -85,7 +85,7 @@ static struct platform_device ux500_cg2900_test_device = { }, }; -static struct resource cg2900_uart_resources[] = { +static struct resource cg2900_uart_resources_pre_v60[] = { { .start = CG2900_GBF_ENA_RESET_GPIO, .end = CG2900_GBF_ENA_RESET_GPIO, @@ -112,6 +112,21 @@ static struct resource cg2900_uart_resources[] = { }, }; +static struct resource cg2900_uart_resources[] = { + { + .start = CG2900_GBF_ENA_RESET_GPIO, + .end = CG2900_GBF_ENA_RESET_GPIO, + .flags = IORESOURCE_IO, + .name = "gbf_ena_reset", + }, + { + .start = NOMADIK_GPIO_TO_IRQ(CG2900_BT_CTS_GPIO), + .end = NOMADIK_GPIO_TO_IRQ(CG2900_BT_CTS_GPIO), + .flags = IORESOURCE_IRQ, + .name = "cts_irq", + }, +}; + static pin_cfg_t cg2900_uart_enabled[] = { GPIO0_U0_CTSn | PIN_INPUT_PULLUP, GPIO1_U0_RTSn | PIN_OUTPUT_HIGH, @@ -143,8 +158,6 @@ static struct platform_device ux500_cg2900_uart_device = { .platform_data = &cg2900_uart_platform_data, .parent = &ux500_cg2900_device.dev, }, - .num_resources = ARRAY_SIZE(cg2900_uart_resources), - .resource = cg2900_uart_resources, }; static bool mach_supported(void) @@ -169,6 +182,18 @@ static int __init board_cg2900_init(void) dcg2900_init_platdata(&cg2900_test_platform_data); dcg2900_init_platdata(&cg2900_uart_platform_data); + if (machine_is_hrefv60()) { + ux500_cg2900_uart_device.num_resources = + ARRAY_SIZE(cg2900_uart_resources); + ux500_cg2900_uart_device.resource = + cg2900_uart_resources; + } else { + ux500_cg2900_uart_device.num_resources = + ARRAY_SIZE(cg2900_uart_resources_pre_v60); + ux500_cg2900_uart_device.resource = + cg2900_uart_resources_pre_v60; + } + err = platform_device_register(&ux500_cg2900_device); if (err) return err; -- cgit v1.2.3