Skip to content

Commit

Permalink
[ARM] 3710/1: AT91 Serial: Use GPIO API
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Andrew Victor authored and Russell King committed Jul 5, 2006
1 parent ca78f6b commit 20e6527
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/serial/at91_serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
#include <asm/mach/serial_at91.h>
#include <asm/arch/board.h>
#include <asm/arch/system.h>
#include <asm/arch/gpio.h>

#if defined(CONFIG_SERIAL_AT91_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ)
#define SUPPORT_SYSRQ
Expand Down Expand Up @@ -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);
}
}

Expand Down

0 comments on commit 20e6527

Please sign in to comment.