diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-06-03 12:01:02 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-06-03 12:01:02 -0400 |
commit | 49eb7b0750d9483c74e9c14ae6ea1e9d62481c3c (patch) | |
tree | 68f76b18328d070a4b5182f9ed82c2134cae16d2 /arch/arm/mach-at91 | |
parent | 5142c33ed86acbcef5c63a63d2b7384b9210d39f (diff) | |
parent | 9ce4f8f3f45443922c98e25133b8c9790fc7949a (diff) |
Merge tag 'tty-3.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty into next
Pull tty/serial driver updates from Greg KH:
"Here is the big tty / serial driver pull request for 3.16-rc1.
A variety of different serial driver fixes and updates and additions,
nothing huge, and no real major core tty changes at all.
All have been in linux-next for a while"
* tag 'tty-3.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (84 commits)
Revert "serial: imx: remove the DMA wait queue"
serial: kgdb_nmi: Improve console integration with KDB I/O
serial: kgdb_nmi: Switch from tasklets to real timers
serial: kgdb_nmi: Use container_of() to locate private data
serial: cpm_uart: No LF conversion in put_poll_char()
serial: sirf: Fix compilation failure
console: Remove superfluous readonly check
console: Use explicit pointer type for vc_uni_pagedir* fields
vgacon: Fix & cleanup refcounting
ARM: tty: Move HVC DCC assembly to arch/arm
tty/hvc/hvc_console: Fix wakeup of HVC thread on hvc_kick()
drivers/tty/n_hdlc.c: replace kmalloc/memset by kzalloc
vt: emulate 8- and 24-bit colour codes.
printk/of_serial: fix serial console cessation part way through boot.
serial: 8250_dma: check the result of TX buffer mapping
serial: uart: add hw flow control support configuration
tty/serial: at91: add interrupts for modem control lines
tty/serial: at91: use mctrl_gpio helpers
tty/serial: Add GPIOLIB helpers for controlling modem lines
ARM: at91: gpio: implement get_direction
...
Diffstat (limited to 'arch/arm/mach-at91')
-rw-r--r-- | arch/arm/mach-at91/at91rm9200_devices.c | 16 | ||||
-rw-r--r-- | arch/arm/mach-at91/at91sam9260_devices.c | 7 | ||||
-rw-r--r-- | arch/arm/mach-at91/at91sam9261_devices.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-at91/at91sam9263_devices.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-at91/at91sam9g45_devices.c | 5 | ||||
-rw-r--r-- | arch/arm/mach-at91/at91sam9rl_devices.c | 5 | ||||
-rw-r--r-- | arch/arm/mach-at91/gpio.c | 13 |
7 files changed, 23 insertions, 31 deletions
diff --git a/arch/arm/mach-at91/at91rm9200_devices.c b/arch/arm/mach-at91/at91rm9200_devices.c index 4860918b411e..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 | ||
@@ -924,7 +925,6 @@ static struct resource dbgu_resources[] = { | |||
924 | static struct atmel_uart_data dbgu_data = { | 925 | static struct atmel_uart_data dbgu_data = { |
925 | .use_dma_tx = 0, | 926 | .use_dma_tx = 0, |
926 | .use_dma_rx = 0, /* DBGU not capable of receive DMA */ | 927 | .use_dma_rx = 0, /* DBGU not capable of receive DMA */ |
927 | .rts_gpio = -EINVAL, | ||
928 | }; | 928 | }; |
929 | 929 | ||
930 | static u64 dbgu_dmamask = DMA_BIT_MASK(32); | 930 | static u64 dbgu_dmamask = DMA_BIT_MASK(32); |
@@ -963,7 +963,14 @@ static struct resource uart0_resources[] = { | |||
963 | static struct atmel_uart_data uart0_data = { | 963 | static struct atmel_uart_data uart0_data = { |
964 | .use_dma_tx = 1, | 964 | .use_dma_tx = 1, |
965 | .use_dma_rx = 1, | 965 | .use_dma_rx = 1, |
966 | .rts_gpio = -EINVAL, | 966 | }; |
967 | |||
968 | static 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 | }, | ||
967 | }; | 974 | }; |
968 | 975 | ||
969 | static u64 uart0_dmamask = DMA_BIT_MASK(32); | 976 | static u64 uart0_dmamask = DMA_BIT_MASK(32); |
@@ -994,7 +1001,7 @@ static inline void configure_usart0_pins(unsigned pins) | |||
994 | * 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 |
995 | * this to high when initializing. | 1002 | * this to high when initializing. |
996 | */ | 1003 | */ |
997 | uart0_data.rts_gpio = AT91_PIN_PA21; | 1004 | gpiod_add_lookup_table(&uart0_gpios_table); |
998 | } | 1005 | } |
999 | } | 1006 | } |
1000 | 1007 | ||
@@ -1014,7 +1021,6 @@ static struct resource uart1_resources[] = { | |||
1014 | static struct atmel_uart_data uart1_data = { | 1021 | static struct atmel_uart_data uart1_data = { |
1015 | .use_dma_tx = 1, | 1022 | .use_dma_tx = 1, |
1016 | .use_dma_rx = 1, | 1023 | .use_dma_rx = 1, |
1017 | .rts_gpio = -EINVAL, | ||
1018 | }; | 1024 | }; |
1019 | 1025 | ||
1020 | static u64 uart1_dmamask = DMA_BIT_MASK(32); | 1026 | static u64 uart1_dmamask = DMA_BIT_MASK(32); |
@@ -1066,7 +1072,6 @@ static struct resource uart2_resources[] = { | |||
1066 | static struct atmel_uart_data uart2_data = { | 1072 | static struct atmel_uart_data uart2_data = { |
1067 | .use_dma_tx = 1, | 1073 | .use_dma_tx = 1, |
1068 | .use_dma_rx = 1, | 1074 | .use_dma_rx = 1, |
1069 | .rts_gpio = -EINVAL, | ||
1070 | }; | 1075 | }; |
1071 | 1076 | ||
1072 | static u64 uart2_dmamask = DMA_BIT_MASK(32); | 1077 | static u64 uart2_dmamask = DMA_BIT_MASK(32); |
@@ -1110,7 +1115,6 @@ static struct resource uart3_resources[] = { | |||
1110 | static struct atmel_uart_data uart3_data = { | 1115 | static struct atmel_uart_data uart3_data = { |
1111 | .use_dma_tx = 1, | 1116 | .use_dma_tx = 1, |
1112 | .use_dma_rx = 1, | 1117 | .use_dma_rx = 1, |
1113 | .rts_gpio = -EINVAL, | ||
1114 | }; | 1118 | }; |
1115 | 1119 | ||
1116 | static u64 uart3_dmamask = DMA_BIT_MASK(32); | 1120 | static u64 uart3_dmamask = DMA_BIT_MASK(32); |
diff --git a/arch/arm/mach-at91/at91sam9260_devices.c b/arch/arm/mach-at91/at91sam9260_devices.c index adcfb88a5d7d..ef88e0fe4e80 100644 --- a/arch/arm/mach-at91/at91sam9260_devices.c +++ b/arch/arm/mach-at91/at91sam9260_devices.c | |||
@@ -819,7 +819,6 @@ static struct resource dbgu_resources[] = { | |||
819 | static struct atmel_uart_data dbgu_data = { | 819 | static struct atmel_uart_data dbgu_data = { |
820 | .use_dma_tx = 0, | 820 | .use_dma_tx = 0, |
821 | .use_dma_rx = 0, /* DBGU not capable of receive DMA */ | 821 | .use_dma_rx = 0, /* DBGU not capable of receive DMA */ |
822 | .rts_gpio = -EINVAL, | ||
823 | }; | 822 | }; |
824 | 823 | ||
825 | static u64 dbgu_dmamask = DMA_BIT_MASK(32); | 824 | static u64 dbgu_dmamask = DMA_BIT_MASK(32); |
@@ -858,7 +857,6 @@ static struct resource uart0_resources[] = { | |||
858 | static struct atmel_uart_data uart0_data = { | 857 | static struct atmel_uart_data uart0_data = { |
859 | .use_dma_tx = 1, | 858 | .use_dma_tx = 1, |
860 | .use_dma_rx = 1, | 859 | .use_dma_rx = 1, |
861 | .rts_gpio = -EINVAL, | ||
862 | }; | 860 | }; |
863 | 861 | ||
864 | static u64 uart0_dmamask = DMA_BIT_MASK(32); | 862 | static u64 uart0_dmamask = DMA_BIT_MASK(32); |
@@ -910,7 +908,6 @@ static struct resource uart1_resources[] = { | |||
910 | static struct atmel_uart_data uart1_data = { | 908 | static struct atmel_uart_data uart1_data = { |
911 | .use_dma_tx = 1, | 909 | .use_dma_tx = 1, |
912 | .use_dma_rx = 1, | 910 | .use_dma_rx = 1, |
913 | .rts_gpio = -EINVAL, | ||
914 | }; | 911 | }; |
915 | 912 | ||
916 | static u64 uart1_dmamask = DMA_BIT_MASK(32); | 913 | static u64 uart1_dmamask = DMA_BIT_MASK(32); |
@@ -954,7 +951,6 @@ static struct resource uart2_resources[] = { | |||
954 | static struct atmel_uart_data uart2_data = { | 951 | static struct atmel_uart_data uart2_data = { |
955 | .use_dma_tx = 1, | 952 | .use_dma_tx = 1, |
956 | .use_dma_rx = 1, | 953 | .use_dma_rx = 1, |
957 | .rts_gpio = -EINVAL, | ||
958 | }; | 954 | }; |
959 | 955 | ||
960 | static u64 uart2_dmamask = DMA_BIT_MASK(32); | 956 | static u64 uart2_dmamask = DMA_BIT_MASK(32); |
@@ -998,7 +994,6 @@ static struct resource uart3_resources[] = { | |||
998 | static struct atmel_uart_data uart3_data = { | 994 | static struct atmel_uart_data uart3_data = { |
999 | .use_dma_tx = 1, | 995 | .use_dma_tx = 1, |
1000 | .use_dma_rx = 1, | 996 | .use_dma_rx = 1, |
1001 | .rts_gpio = -EINVAL, | ||
1002 | }; | 997 | }; |
1003 | 998 | ||
1004 | static u64 uart3_dmamask = DMA_BIT_MASK(32); | 999 | static u64 uart3_dmamask = DMA_BIT_MASK(32); |
@@ -1042,7 +1037,6 @@ static struct resource uart4_resources[] = { | |||
1042 | static struct atmel_uart_data uart4_data = { | 1037 | static struct atmel_uart_data uart4_data = { |
1043 | .use_dma_tx = 1, | 1038 | .use_dma_tx = 1, |
1044 | .use_dma_rx = 1, | 1039 | .use_dma_rx = 1, |
1045 | .rts_gpio = -EINVAL, | ||
1046 | }; | 1040 | }; |
1047 | 1041 | ||
1048 | static u64 uart4_dmamask = DMA_BIT_MASK(32); | 1042 | static u64 uart4_dmamask = DMA_BIT_MASK(32); |
@@ -1081,7 +1075,6 @@ static struct resource uart5_resources[] = { | |||
1081 | static struct atmel_uart_data uart5_data = { | 1075 | static struct atmel_uart_data uart5_data = { |
1082 | .use_dma_tx = 1, | 1076 | .use_dma_tx = 1, |
1083 | .use_dma_rx = 1, | 1077 | .use_dma_rx = 1, |
1084 | .rts_gpio = -EINVAL, | ||
1085 | }; | 1078 | }; |
1086 | 1079 | ||
1087 | static u64 uart5_dmamask = DMA_BIT_MASK(32); | 1080 | static u64 uart5_dmamask = DMA_BIT_MASK(32); |
diff --git a/arch/arm/mach-at91/at91sam9261_devices.c b/arch/arm/mach-at91/at91sam9261_devices.c index 43b21f456f6e..29baacb5c359 100644 --- a/arch/arm/mach-at91/at91sam9261_devices.c +++ b/arch/arm/mach-at91/at91sam9261_devices.c | |||
@@ -881,7 +881,6 @@ static struct resource dbgu_resources[] = { | |||
881 | static struct atmel_uart_data dbgu_data = { | 881 | static struct atmel_uart_data dbgu_data = { |
882 | .use_dma_tx = 0, | 882 | .use_dma_tx = 0, |
883 | .use_dma_rx = 0, /* DBGU not capable of receive DMA */ | 883 | .use_dma_rx = 0, /* DBGU not capable of receive DMA */ |
884 | .rts_gpio = -EINVAL, | ||
885 | }; | 884 | }; |
886 | 885 | ||
887 | static u64 dbgu_dmamask = DMA_BIT_MASK(32); | 886 | static u64 dbgu_dmamask = DMA_BIT_MASK(32); |
@@ -920,7 +919,6 @@ static struct resource uart0_resources[] = { | |||
920 | static struct atmel_uart_data uart0_data = { | 919 | static struct atmel_uart_data uart0_data = { |
921 | .use_dma_tx = 1, | 920 | .use_dma_tx = 1, |
922 | .use_dma_rx = 1, | 921 | .use_dma_rx = 1, |
923 | .rts_gpio = -EINVAL, | ||
924 | }; | 922 | }; |
925 | 923 | ||
926 | static u64 uart0_dmamask = DMA_BIT_MASK(32); | 924 | static u64 uart0_dmamask = DMA_BIT_MASK(32); |
@@ -964,7 +962,6 @@ static struct resource uart1_resources[] = { | |||
964 | static struct atmel_uart_data uart1_data = { | 962 | static struct atmel_uart_data uart1_data = { |
965 | .use_dma_tx = 1, | 963 | .use_dma_tx = 1, |
966 | .use_dma_rx = 1, | 964 | .use_dma_rx = 1, |
967 | .rts_gpio = -EINVAL, | ||
968 | }; | 965 | }; |
969 | 966 | ||
970 | static u64 uart1_dmamask = DMA_BIT_MASK(32); | 967 | static u64 uart1_dmamask = DMA_BIT_MASK(32); |
@@ -1008,7 +1005,6 @@ static struct resource uart2_resources[] = { | |||
1008 | static struct atmel_uart_data uart2_data = { | 1005 | static struct atmel_uart_data uart2_data = { |
1009 | .use_dma_tx = 1, | 1006 | .use_dma_tx = 1, |
1010 | .use_dma_rx = 1, | 1007 | .use_dma_rx = 1, |
1011 | .rts_gpio = -EINVAL, | ||
1012 | }; | 1008 | }; |
1013 | 1009 | ||
1014 | static u64 uart2_dmamask = DMA_BIT_MASK(32); | 1010 | static u64 uart2_dmamask = DMA_BIT_MASK(32); |
diff --git a/arch/arm/mach-at91/at91sam9263_devices.c b/arch/arm/mach-at91/at91sam9263_devices.c index 953616e5dbcb..309390d8e2f8 100644 --- a/arch/arm/mach-at91/at91sam9263_devices.c +++ b/arch/arm/mach-at91/at91sam9263_devices.c | |||
@@ -1326,7 +1326,6 @@ static struct resource dbgu_resources[] = { | |||
1326 | static struct atmel_uart_data dbgu_data = { | 1326 | static struct atmel_uart_data dbgu_data = { |
1327 | .use_dma_tx = 0, | 1327 | .use_dma_tx = 0, |
1328 | .use_dma_rx = 0, /* DBGU not capable of receive DMA */ | 1328 | .use_dma_rx = 0, /* DBGU not capable of receive DMA */ |
1329 | .rts_gpio = -EINVAL, | ||
1330 | }; | 1329 | }; |
1331 | 1330 | ||
1332 | static u64 dbgu_dmamask = DMA_BIT_MASK(32); | 1331 | static u64 dbgu_dmamask = DMA_BIT_MASK(32); |
@@ -1365,7 +1364,6 @@ static struct resource uart0_resources[] = { | |||
1365 | static struct atmel_uart_data uart0_data = { | 1364 | static struct atmel_uart_data uart0_data = { |
1366 | .use_dma_tx = 1, | 1365 | .use_dma_tx = 1, |
1367 | .use_dma_rx = 1, | 1366 | .use_dma_rx = 1, |
1368 | .rts_gpio = -EINVAL, | ||
1369 | }; | 1367 | }; |
1370 | 1368 | ||
1371 | static u64 uart0_dmamask = DMA_BIT_MASK(32); | 1369 | static u64 uart0_dmamask = DMA_BIT_MASK(32); |
@@ -1409,7 +1407,6 @@ static struct resource uart1_resources[] = { | |||
1409 | static struct atmel_uart_data uart1_data = { | 1407 | static struct atmel_uart_data uart1_data = { |
1410 | .use_dma_tx = 1, | 1408 | .use_dma_tx = 1, |
1411 | .use_dma_rx = 1, | 1409 | .use_dma_rx = 1, |
1412 | .rts_gpio = -EINVAL, | ||
1413 | }; | 1410 | }; |
1414 | 1411 | ||
1415 | static u64 uart1_dmamask = DMA_BIT_MASK(32); | 1412 | static u64 uart1_dmamask = DMA_BIT_MASK(32); |
@@ -1453,7 +1450,6 @@ static struct resource uart2_resources[] = { | |||
1453 | static struct atmel_uart_data uart2_data = { | 1450 | static struct atmel_uart_data uart2_data = { |
1454 | .use_dma_tx = 1, | 1451 | .use_dma_tx = 1, |
1455 | .use_dma_rx = 1, | 1452 | .use_dma_rx = 1, |
1456 | .rts_gpio = -EINVAL, | ||
1457 | }; | 1453 | }; |
1458 | 1454 | ||
1459 | static u64 uart2_dmamask = DMA_BIT_MASK(32); | 1455 | static u64 uart2_dmamask = DMA_BIT_MASK(32); |
diff --git a/arch/arm/mach-at91/at91sam9g45_devices.c b/arch/arm/mach-at91/at91sam9g45_devices.c index d943363c1845..391ab6bb536a 100644 --- a/arch/arm/mach-at91/at91sam9g45_devices.c +++ b/arch/arm/mach-at91/at91sam9g45_devices.c | |||
@@ -1528,7 +1528,6 @@ static struct resource dbgu_resources[] = { | |||
1528 | static struct atmel_uart_data dbgu_data = { | 1528 | static struct atmel_uart_data dbgu_data = { |
1529 | .use_dma_tx = 0, | 1529 | .use_dma_tx = 0, |
1530 | .use_dma_rx = 0, | 1530 | .use_dma_rx = 0, |
1531 | .rts_gpio = -EINVAL, | ||
1532 | }; | 1531 | }; |
1533 | 1532 | ||
1534 | static u64 dbgu_dmamask = DMA_BIT_MASK(32); | 1533 | static u64 dbgu_dmamask = DMA_BIT_MASK(32); |
@@ -1567,7 +1566,6 @@ static struct resource uart0_resources[] = { | |||
1567 | static struct atmel_uart_data uart0_data = { | 1566 | static struct atmel_uart_data uart0_data = { |
1568 | .use_dma_tx = 1, | 1567 | .use_dma_tx = 1, |
1569 | .use_dma_rx = 1, | 1568 | .use_dma_rx = 1, |
1570 | .rts_gpio = -EINVAL, | ||
1571 | }; | 1569 | }; |
1572 | 1570 | ||
1573 | static u64 uart0_dmamask = DMA_BIT_MASK(32); | 1571 | static u64 uart0_dmamask = DMA_BIT_MASK(32); |
@@ -1611,7 +1609,6 @@ static struct resource uart1_resources[] = { | |||
1611 | static struct atmel_uart_data uart1_data = { | 1609 | static struct atmel_uart_data uart1_data = { |
1612 | .use_dma_tx = 1, | 1610 | .use_dma_tx = 1, |
1613 | .use_dma_rx = 1, | 1611 | .use_dma_rx = 1, |
1614 | .rts_gpio = -EINVAL, | ||
1615 | }; | 1612 | }; |
1616 | 1613 | ||
1617 | static u64 uart1_dmamask = DMA_BIT_MASK(32); | 1614 | static u64 uart1_dmamask = DMA_BIT_MASK(32); |
@@ -1655,7 +1652,6 @@ static struct resource uart2_resources[] = { | |||
1655 | static struct atmel_uart_data uart2_data = { | 1652 | static struct atmel_uart_data uart2_data = { |
1656 | .use_dma_tx = 1, | 1653 | .use_dma_tx = 1, |
1657 | .use_dma_rx = 1, | 1654 | .use_dma_rx = 1, |
1658 | .rts_gpio = -EINVAL, | ||
1659 | }; | 1655 | }; |
1660 | 1656 | ||
1661 | static u64 uart2_dmamask = DMA_BIT_MASK(32); | 1657 | static u64 uart2_dmamask = DMA_BIT_MASK(32); |
@@ -1699,7 +1695,6 @@ static struct resource uart3_resources[] = { | |||
1699 | static struct atmel_uart_data uart3_data = { | 1695 | static struct atmel_uart_data uart3_data = { |
1700 | .use_dma_tx = 1, | 1696 | .use_dma_tx = 1, |
1701 | .use_dma_rx = 1, | 1697 | .use_dma_rx = 1, |
1702 | .rts_gpio = -EINVAL, | ||
1703 | }; | 1698 | }; |
1704 | 1699 | ||
1705 | static u64 uart3_dmamask = DMA_BIT_MASK(32); | 1700 | static u64 uart3_dmamask = DMA_BIT_MASK(32); |
diff --git a/arch/arm/mach-at91/at91sam9rl_devices.c b/arch/arm/mach-at91/at91sam9rl_devices.c index 044ad8bc6963..0b1d71a7d9bf 100644 --- a/arch/arm/mach-at91/at91sam9rl_devices.c +++ b/arch/arm/mach-at91/at91sam9rl_devices.c | |||
@@ -993,7 +993,6 @@ static struct resource dbgu_resources[] = { | |||
993 | static struct atmel_uart_data dbgu_data = { | 993 | static struct atmel_uart_data dbgu_data = { |
994 | .use_dma_tx = 0, | 994 | .use_dma_tx = 0, |
995 | .use_dma_rx = 0, /* DBGU not capable of receive DMA */ | 995 | .use_dma_rx = 0, /* DBGU not capable of receive DMA */ |
996 | .rts_gpio = -EINVAL, | ||
997 | }; | 996 | }; |
998 | 997 | ||
999 | static u64 dbgu_dmamask = DMA_BIT_MASK(32); | 998 | static u64 dbgu_dmamask = DMA_BIT_MASK(32); |
@@ -1032,7 +1031,6 @@ static struct resource uart0_resources[] = { | |||
1032 | static struct atmel_uart_data uart0_data = { | 1031 | static struct atmel_uart_data uart0_data = { |
1033 | .use_dma_tx = 1, | 1032 | .use_dma_tx = 1, |
1034 | .use_dma_rx = 1, | 1033 | .use_dma_rx = 1, |
1035 | .rts_gpio = -EINVAL, | ||
1036 | }; | 1034 | }; |
1037 | 1035 | ||
1038 | static u64 uart0_dmamask = DMA_BIT_MASK(32); | 1036 | static u64 uart0_dmamask = DMA_BIT_MASK(32); |
@@ -1084,7 +1082,6 @@ static struct resource uart1_resources[] = { | |||
1084 | static struct atmel_uart_data uart1_data = { | 1082 | static struct atmel_uart_data uart1_data = { |
1085 | .use_dma_tx = 1, | 1083 | .use_dma_tx = 1, |
1086 | .use_dma_rx = 1, | 1084 | .use_dma_rx = 1, |
1087 | .rts_gpio = -EINVAL, | ||
1088 | }; | 1085 | }; |
1089 | 1086 | ||
1090 | static u64 uart1_dmamask = DMA_BIT_MASK(32); | 1087 | static u64 uart1_dmamask = DMA_BIT_MASK(32); |
@@ -1128,7 +1125,6 @@ static struct resource uart2_resources[] = { | |||
1128 | static struct atmel_uart_data uart2_data = { | 1125 | static struct atmel_uart_data uart2_data = { |
1129 | .use_dma_tx = 1, | 1126 | .use_dma_tx = 1, |
1130 | .use_dma_rx = 1, | 1127 | .use_dma_rx = 1, |
1131 | .rts_gpio = -EINVAL, | ||
1132 | }; | 1128 | }; |
1133 | 1129 | ||
1134 | static u64 uart2_dmamask = DMA_BIT_MASK(32); | 1130 | static u64 uart2_dmamask = DMA_BIT_MASK(32); |
@@ -1172,7 +1168,6 @@ static struct resource uart3_resources[] = { | |||
1172 | static struct atmel_uart_data uart3_data = { | 1168 | static struct atmel_uart_data uart3_data = { |
1173 | .use_dma_tx = 1, | 1169 | .use_dma_tx = 1, |
1174 | .use_dma_rx = 1, | 1170 | .use_dma_rx = 1, |
1175 | .rts_gpio = -EINVAL, | ||
1176 | }; | 1171 | }; |
1177 | 1172 | ||
1178 | static u64 uart3_dmamask = DMA_BIT_MASK(32); | 1173 | static u64 uart3_dmamask = DMA_BIT_MASK(32); |
diff --git a/arch/arm/mach-at91/gpio.c b/arch/arm/mach-at91/gpio.c index 12ed05bbdc5c..d3f05aaad8ba 100644 --- a/arch/arm/mach-at91/gpio.c +++ b/arch/arm/mach-at91/gpio.c | |||
@@ -50,6 +50,7 @@ static int at91_gpiolib_request(struct gpio_chip *chip, unsigned offset); | |||
50 | static void at91_gpiolib_dbg_show(struct seq_file *s, struct gpio_chip *chip); | 50 | static void at91_gpiolib_dbg_show(struct seq_file *s, struct gpio_chip *chip); |
51 | static void at91_gpiolib_set(struct gpio_chip *chip, unsigned offset, int val); | 51 | static void at91_gpiolib_set(struct gpio_chip *chip, unsigned offset, int val); |
52 | static int at91_gpiolib_get(struct gpio_chip *chip, unsigned offset); | 52 | static int at91_gpiolib_get(struct gpio_chip *chip, unsigned offset); |
53 | static int at91_gpiolib_get_direction(struct gpio_chip *chip, unsigned offset); | ||
53 | static int at91_gpiolib_direction_output(struct gpio_chip *chip, | 54 | static int at91_gpiolib_direction_output(struct gpio_chip *chip, |
54 | unsigned offset, int val); | 55 | unsigned offset, int val); |
55 | static int at91_gpiolib_direction_input(struct gpio_chip *chip, | 56 | static int at91_gpiolib_direction_input(struct gpio_chip *chip, |
@@ -61,6 +62,7 @@ static int at91_gpiolib_to_irq(struct gpio_chip *chip, unsigned offset); | |||
61 | .chip = { \ | 62 | .chip = { \ |
62 | .label = name, \ | 63 | .label = name, \ |
63 | .request = at91_gpiolib_request, \ | 64 | .request = at91_gpiolib_request, \ |
65 | .get_direction = at91_gpiolib_get_direction, \ | ||
64 | .direction_input = at91_gpiolib_direction_input, \ | 66 | .direction_input = at91_gpiolib_direction_input, \ |
65 | .direction_output = at91_gpiolib_direction_output, \ | 67 | .direction_output = at91_gpiolib_direction_output, \ |
66 | .get = at91_gpiolib_get, \ | 68 | .get = at91_gpiolib_get, \ |
@@ -800,6 +802,17 @@ static int at91_gpiolib_request(struct gpio_chip *chip, unsigned offset) | |||
800 | return 0; | 802 | return 0; |
801 | } | 803 | } |
802 | 804 | ||
805 | static int at91_gpiolib_get_direction(struct gpio_chip *chip, unsigned offset) | ||
806 | { | ||
807 | struct at91_gpio_chip *at91_gpio = to_at91_gpio_chip(chip); | ||
808 | void __iomem *pio = at91_gpio->regbase; | ||
809 | unsigned mask = 1 << offset; | ||
810 | u32 osr; | ||
811 | |||
812 | osr = __raw_readl(pio + PIO_OSR); | ||
813 | return !(osr & mask); | ||
814 | } | ||
815 | |||
803 | static int at91_gpiolib_direction_input(struct gpio_chip *chip, | 816 | static int at91_gpiolib_direction_input(struct gpio_chip *chip, |
804 | unsigned offset) | 817 | unsigned offset) |
805 | { | 818 | { |