aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-at91/at91rm9200_devices.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-at91/at91rm9200_devices.c')
-rw-r--r--arch/arm/mach-at91/at91rm9200_devices.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/arch/arm/mach-at91/at91rm9200_devices.c b/arch/arm/mach-at91/at91rm9200_devices.c
index f3f19f21352a..3f4bb58aea54 100644
--- a/arch/arm/mach-at91/at91rm9200_devices.c
+++ b/arch/arm/mach-at91/at91rm9200_devices.c
@@ -15,6 +15,7 @@
15 15
16#include <linux/dma-mapping.h> 16#include <linux/dma-mapping.h>
17#include <linux/gpio.h> 17#include <linux/gpio.h>
18#include <linux/gpio/driver.h>
18#include <linux/platform_device.h> 19#include <linux/platform_device.h>
19#include <linux/i2c-gpio.h> 20#include <linux/i2c-gpio.h>
20 21
@@ -25,6 +26,7 @@
25 26
26#include "board.h" 27#include "board.h"
27#include "generic.h" 28#include "generic.h"
29#include "gpio.h"
28 30
29 31
30/* -------------------------------------------------------------------- 32/* --------------------------------------------------------------------
@@ -923,7 +925,6 @@ static struct resource dbgu_resources[] = {
923static struct atmel_uart_data dbgu_data = { 925static struct atmel_uart_data dbgu_data = {
924 .use_dma_tx = 0, 926 .use_dma_tx = 0,
925 .use_dma_rx = 0, /* DBGU not capable of receive DMA */ 927 .use_dma_rx = 0, /* DBGU not capable of receive DMA */
926 .rts_gpio = -EINVAL,
927}; 928};
928 929
929static u64 dbgu_dmamask = DMA_BIT_MASK(32); 930static u64 dbgu_dmamask = DMA_BIT_MASK(32);
@@ -962,7 +963,14 @@ static struct resource uart0_resources[] = {
962static struct atmel_uart_data uart0_data = { 963static struct atmel_uart_data uart0_data = {
963 .use_dma_tx = 1, 964 .use_dma_tx = 1,
964 .use_dma_rx = 1, 965 .use_dma_rx = 1,
965 .rts_gpio = -EINVAL, 966};
967
968static struct gpiod_lookup_table uart0_gpios_table = {
969 .dev_id = "atmel_usart",
970 .table = {
971 GPIO_LOOKUP("pioA", 21, "rts", GPIO_ACTIVE_LOW),
972 { },
973 },
966}; 974};
967 975
968static u64 uart0_dmamask = DMA_BIT_MASK(32); 976static u64 uart0_dmamask = DMA_BIT_MASK(32);
@@ -993,7 +1001,7 @@ static inline void configure_usart0_pins(unsigned pins)
993 * We need to drive the pin manually. The serial driver will driver 1001 * We need to drive the pin manually. The serial driver will driver
994 * this to high when initializing. 1002 * this to high when initializing.
995 */ 1003 */
996 uart0_data.rts_gpio = AT91_PIN_PA21; 1004 gpiod_add_lookup_table(&uart0_gpios_table);
997 } 1005 }
998} 1006}
999 1007
@@ -1013,7 +1021,6 @@ static struct resource uart1_resources[] = {
1013static struct atmel_uart_data uart1_data = { 1021static struct atmel_uart_data uart1_data = {
1014 .use_dma_tx = 1, 1022 .use_dma_tx = 1,
1015 .use_dma_rx = 1, 1023 .use_dma_rx = 1,
1016 .rts_gpio = -EINVAL,
1017}; 1024};
1018 1025
1019static u64 uart1_dmamask = DMA_BIT_MASK(32); 1026static u64 uart1_dmamask = DMA_BIT_MASK(32);
@@ -1065,7 +1072,6 @@ static struct resource uart2_resources[] = {
1065static struct atmel_uart_data uart2_data = { 1072static struct atmel_uart_data uart2_data = {
1066 .use_dma_tx = 1, 1073 .use_dma_tx = 1,
1067 .use_dma_rx = 1, 1074 .use_dma_rx = 1,
1068 .rts_gpio = -EINVAL,
1069}; 1075};
1070 1076
1071static u64 uart2_dmamask = DMA_BIT_MASK(32); 1077static u64 uart2_dmamask = DMA_BIT_MASK(32);
@@ -1109,7 +1115,6 @@ static struct resource uart3_resources[] = {
1109static struct atmel_uart_data uart3_data = { 1115static struct atmel_uart_data uart3_data = {
1110 .use_dma_tx = 1, 1116 .use_dma_tx = 1,
1111 .use_dma_rx = 1, 1117 .use_dma_rx = 1,
1112 .rts_gpio = -EINVAL,
1113}; 1118};
1114 1119
1115static u64 uart3_dmamask = DMA_BIT_MASK(32); 1120static u64 uart3_dmamask = DMA_BIT_MASK(32);