aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHaavard Skinnemoen <hskinnemoen@atmel.com>2006-10-04 10:02:09 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-04 13:25:06 -0400
commitacca9b83acfe89fbb7421d5412176dee2ad2959a (patch)
tree662434e93a8b67e2074d292a9cf68995982daf9c
parent75d35213777e2b278db57a420efbce2bdb61da93 (diff)
[PATCH] atmel_serial: Support AVR32
Make CONFIG_SERIAL_ATMEL selectable on AVR32 and #ifdef out some ARM- specific code in the driver. Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com> Acked-by: Andrew Victor <andrew@sanpeople.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--drivers/serial/Kconfig24
-rw-r--r--drivers/serial/atmel_serial.c4
2 files changed, 16 insertions, 12 deletions
diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig
index ba19ab571f98..b0d502622d94 100644
--- a/drivers/serial/Kconfig
+++ b/drivers/serial/Kconfig
@@ -301,31 +301,31 @@ config SERIAL_AMBA_PL011_CONSOLE
301 301
302config SERIAL_ATMEL 302config SERIAL_ATMEL
303 bool "AT91 / AT32 on-chip serial port support" 303 bool "AT91 / AT32 on-chip serial port support"
304 depends on ARM && (ARCH_AT91RM9200 || ARCH_AT91SAM9261) 304 depends on (ARM && ARCH_AT91) || AVR32
305 select SERIAL_CORE 305 select SERIAL_CORE
306 help 306 help
307 This enables the driver for the on-chip UARTs of the Atmel 307 This enables the driver for the on-chip UARTs of the Atmel
308 AT91RM9200 and AT91SAM926 processor. 308 AT91 and AT32 processors.
309 309
310config SERIAL_ATMEL_CONSOLE 310config SERIAL_ATMEL_CONSOLE
311 bool "Support for console on AT91 / AT32 serial port" 311 bool "Support for console on AT91 / AT32 serial port"
312 depends on SERIAL_ATMEL=y 312 depends on SERIAL_ATMEL=y
313 select SERIAL_CORE_CONSOLE 313 select SERIAL_CORE_CONSOLE
314 help 314 help
315 Say Y here if you wish to use a UART on the Atmel AT91RM9200 or 315 Say Y here if you wish to use an on-chip UART on a Atmel
316 AT91SAM9261 as the system console (the system console is the device 316 AT91 or AT32 processor as the system console (the system
317 which receives all kernel messages and warnings and which allows 317 console is the device which receives all kernel messages and
318 logins in single user mode). 318 warnings and which allows logins in single user mode).
319 319
320config SERIAL_ATMEL_TTYAT 320config SERIAL_ATMEL_TTYAT
321 bool "Install as device ttyAT0-4 instead of ttyS0-4" 321 bool "Install as device ttyATn instead of ttySn"
322 depends on SERIAL_ATMEL=y 322 depends on SERIAL_ATMEL=y
323 help 323 help
324 Say Y here if you wish to have the five internal AT91RM9200 UARTs 324 Say Y here if you wish to have the internal AT91 / AT32 UARTs
325 appear as /dev/ttyAT0-4 (major 204, minor 154-158) instead of the 325 appear as /dev/ttyATn (major 204, minor starting at 154)
326 normal /dev/ttyS0-4 (major 4, minor 64-68). This is necessary if 326 instead of the normal /dev/ttySn (major 4, minor starting at
327 you also want other UARTs, such as external 8250/16C550 compatible 327 64). This is necessary if you also want other UARTs, such as
328 UARTs. 328 external 8250/16C550 compatible UARTs.
329 The ttySn nodes are legally reserved for the 8250 serial driver 329 The ttySn nodes are legally reserved for the 8250 serial driver
330 but are often misused by other serial drivers. 330 but are often misused by other serial drivers.
331 331
diff --git a/drivers/serial/atmel_serial.c b/drivers/serial/atmel_serial.c
index 34212df39800..61db2166fbb5 100644
--- a/drivers/serial/atmel_serial.c
+++ b/drivers/serial/atmel_serial.c
@@ -39,8 +39,10 @@
39#include <asm/arch/at91rm9200_pdc.h> 39#include <asm/arch/at91rm9200_pdc.h>
40#include <asm/mach/serial_at91.h> 40#include <asm/mach/serial_at91.h>
41#include <asm/arch/board.h> 41#include <asm/arch/board.h>
42#ifdef CONFIG_ARM
42#include <asm/arch/system.h> 43#include <asm/arch/system.h>
43#include <asm/arch/gpio.h> 44#include <asm/arch/gpio.h>
45#endif
44 46
45#include "atmel_serial.h" 47#include "atmel_serial.h"
46 48
@@ -135,6 +137,7 @@ static void atmel_set_mctrl(struct uart_port *port, u_int mctrl)
135 unsigned int control = 0; 137 unsigned int control = 0;
136 unsigned int mode; 138 unsigned int mode;
137 139
140#ifdef CONFIG_ARM
138 if (arch_identify() == ARCH_ID_AT91RM9200) { 141 if (arch_identify() == ARCH_ID_AT91RM9200) {
139 /* 142 /*
140 * AT91RM9200 Errata #39: RTS0 is not internally connected to PA21. 143 * AT91RM9200 Errata #39: RTS0 is not internally connected to PA21.
@@ -147,6 +150,7 @@ static void atmel_set_mctrl(struct uart_port *port, u_int mctrl)
147 at91_set_gpio_value(AT91_PIN_PA21, 1); 150 at91_set_gpio_value(AT91_PIN_PA21, 1);
148 } 151 }
149 } 152 }
153#endif
150 154
151 if (mctrl & TIOCM_RTS) 155 if (mctrl & TIOCM_RTS)
152 control |= ATMEL_US_RTSEN; 156 control |= ATMEL_US_RTSEN;