aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-at91/at91sam9263_devices.c
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2013-11-07 04:25:55 -0500
committerUwe Kleine-König <u.kleine-koenig@pengutronix.de>2013-12-20 05:41:30 -0500
commit354e57f3a0a26120af3bcd6c92c355ad00a057c1 (patch)
tree6935c516167f34df47ebce43c579bbc8ce53f8d4 /arch/arm/mach-at91/at91sam9263_devices.c
parent6a79799d5654bb7800614e8b7a009252be7ff90e (diff)
ARM/serial: at91: switch atmel serial to use gpiolib
This passes the errata fix using a GPIO to control the RTS pin on one of the AT91 chips to use gpiolib instead of the AT91-specific interfaces. Also remove the reliance on compile-time #defines and the cpu_* check and rely on the platform passing down the proper GPIO pin through platform data. This is a prerequisite for getting rid of the local GPIO implementation in the AT91 platform and move toward multiplatform. The patch also adds device tree support for getting the RTS GPIO pin from the device tree on DT boot paths. Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-at91/at91sam9263_devices.c')
-rw-r--r--arch/arm/mach-at91/at91sam9263_devices.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/arm/mach-at91/at91sam9263_devices.c b/arch/arm/mach-at91/at91sam9263_devices.c
index 4aeadddbc181..97cc2a0d6f90 100644
--- a/arch/arm/mach-at91/at91sam9263_devices.c
+++ b/arch/arm/mach-at91/at91sam9263_devices.c
@@ -1324,6 +1324,7 @@ static struct resource dbgu_resources[] = {
1324static struct atmel_uart_data dbgu_data = { 1324static struct atmel_uart_data dbgu_data = {
1325 .use_dma_tx = 0, 1325 .use_dma_tx = 0,
1326 .use_dma_rx = 0, /* DBGU not capable of receive DMA */ 1326 .use_dma_rx = 0, /* DBGU not capable of receive DMA */
1327 .rts_gpio = -EINVAL,
1327}; 1328};
1328 1329
1329static u64 dbgu_dmamask = DMA_BIT_MASK(32); 1330static u64 dbgu_dmamask = DMA_BIT_MASK(32);
@@ -1362,6 +1363,7 @@ static struct resource uart0_resources[] = {
1362static struct atmel_uart_data uart0_data = { 1363static struct atmel_uart_data uart0_data = {
1363 .use_dma_tx = 1, 1364 .use_dma_tx = 1,
1364 .use_dma_rx = 1, 1365 .use_dma_rx = 1,
1366 .rts_gpio = -EINVAL,
1365}; 1367};
1366 1368
1367static u64 uart0_dmamask = DMA_BIT_MASK(32); 1369static u64 uart0_dmamask = DMA_BIT_MASK(32);
@@ -1405,6 +1407,7 @@ static struct resource uart1_resources[] = {
1405static struct atmel_uart_data uart1_data = { 1407static struct atmel_uart_data uart1_data = {
1406 .use_dma_tx = 1, 1408 .use_dma_tx = 1,
1407 .use_dma_rx = 1, 1409 .use_dma_rx = 1,
1410 .rts_gpio = -EINVAL,
1408}; 1411};
1409 1412
1410static u64 uart1_dmamask = DMA_BIT_MASK(32); 1413static u64 uart1_dmamask = DMA_BIT_MASK(32);
@@ -1448,6 +1451,7 @@ static struct resource uart2_resources[] = {
1448static struct atmel_uart_data uart2_data = { 1451static struct atmel_uart_data uart2_data = {
1449 .use_dma_tx = 1, 1452 .use_dma_tx = 1,
1450 .use_dma_rx = 1, 1453 .use_dma_rx = 1,
1454 .rts_gpio = -EINVAL,
1451}; 1455};
1452 1456
1453static u64 uart2_dmamask = DMA_BIT_MASK(32); 1457static u64 uart2_dmamask = DMA_BIT_MASK(32);