diff options
Diffstat (limited to 'drivers/staging/cg2900/board-mop500-cg2900.c')
-rw-r--r-- | drivers/staging/cg2900/board-mop500-cg2900.c | 31 |
1 files 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; |