From: Andrew Victor Date: Wed, 5 Jul 2006 13:31:13 +0000 (+0100) Subject: [ARM] 3710/1: AT91 Serial: Use GPIO API X-Git-Tag: v2.6.18-rc1~5^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=20e652761cbf6983fd067aef2f0242c262057737;p=platform%2Fupstream%2Fkernel-adaptation-pc.git [ARM] 3710/1: AT91 Serial: Use GPIO API Patch from Andrew Victor The AT91RM9200 errata work-around should be using the GPIO API and not accessing the PIO registers directly. Signed-off-by: Andrew Victor Signed-off-by: Russell King --- diff --git a/drivers/serial/at91_serial.c b/drivers/serial/at91_serial.c index a7d6643..54c6b2a 100644 --- a/drivers/serial/at91_serial.c +++ b/drivers/serial/at91_serial.c @@ -41,6 +41,7 @@ #include #include #include +#include #if defined(CONFIG_SERIAL_AT91_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) #define SUPPORT_SYSRQ @@ -140,9 +141,9 @@ static void at91_set_mctrl(struct uart_port *port, u_int mctrl) */ if (port->mapbase == AT91_BASE_US0) { if (mctrl & TIOCM_RTS) - at91_sys_write(AT91_PIOA + PIO_CODR, AT91_PA21_RTS0); + at91_set_gpio_value(AT91_PIN_PA21, 0); else - at91_sys_write(AT91_PIOA + PIO_SODR, AT91_PA21_RTS0); + at91_set_gpio_value(AT91_PIN_PA21, 1); } }