[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 <andrew@sanpeople.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

authored by Andrew Victor and committed by Russell King 20e65276 ca78f6ba

+3 -2
+3 -2
drivers/serial/at91_serial.c
··· 41 41 #include <asm/mach/serial_at91.h> 42 42 #include <asm/arch/board.h> 43 43 #include <asm/arch/system.h> 44 + #include <asm/arch/gpio.h> 44 45 45 46 #if defined(CONFIG_SERIAL_AT91_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) 46 47 #define SUPPORT_SYSRQ ··· 141 140 */ 142 141 if (port->mapbase == AT91_BASE_US0) { 143 142 if (mctrl & TIOCM_RTS) 144 - at91_sys_write(AT91_PIOA + PIO_CODR, AT91_PA21_RTS0); 143 + at91_set_gpio_value(AT91_PIN_PA21, 0); 145 144 else 146 - at91_sys_write(AT91_PIOA + PIO_SODR, AT91_PA21_RTS0); 145 + at91_set_gpio_value(AT91_PIN_PA21, 1); 147 146 } 148 147 } 149 148