2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-27 14:43:58 +08:00

tty/serial: atmel: Remove AVR32 bits from the driver

AVR32 is gone. Now it's time to clean up the driver by removing
leftovers that was used by AVR32 related code.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Richard Genoud <richard.genoud@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Andy Shevchenko 2017-06-07 18:19:31 +03:00 committed by Greg Kroah-Hartman
parent 1c65a879cc
commit 72ce5732ee
4 changed files with 11 additions and 29 deletions

View File

@ -8438,7 +8438,7 @@ T: git git://git.monstr.eu/linux-2.6-microblaze.git
S: Supported S: Supported
F: arch/microblaze/ F: arch/microblaze/
MICROCHIP / ATMEL AT91 / AT32 SERIAL DRIVER MICROCHIP / ATMEL AT91 SERIAL DRIVER
M: Richard Genoud <richard.genoud@gmail.com> M: Richard Genoud <richard.genoud@gmail.com>
S: Maintained S: Maintained
F: drivers/tty/serial/atmel_serial.c F: drivers/tty/serial/atmel_serial.c

View File

@ -114,32 +114,32 @@ config SERIAL_SB1250_DUART_CONSOLE
If unsure, say Y. If unsure, say Y.
config SERIAL_ATMEL config SERIAL_ATMEL
bool "AT91 / AT32 on-chip serial port support" bool "AT91 on-chip serial port support"
depends on HAS_DMA depends on HAS_DMA
depends on ARCH_AT91 || AVR32 || COMPILE_TEST depends on ARCH_AT91 || COMPILE_TEST
select SERIAL_CORE select SERIAL_CORE
select SERIAL_MCTRL_GPIO if GPIOLIB select SERIAL_MCTRL_GPIO if GPIOLIB
help help
This enables the driver for the on-chip UARTs of the Atmel This enables the driver for the on-chip UARTs of the Atmel
AT91 and AT32 processors. AT91 processors.
config SERIAL_ATMEL_CONSOLE config SERIAL_ATMEL_CONSOLE
bool "Support for console on AT91 / AT32 serial port" bool "Support for console on AT91 serial port"
depends on SERIAL_ATMEL=y depends on SERIAL_ATMEL=y
select SERIAL_CORE_CONSOLE select SERIAL_CORE_CONSOLE
help help
Say Y here if you wish to use an on-chip UART on a Atmel Say Y here if you wish to use an on-chip UART on a Atmel
AT91 or AT32 processor as the system console (the system AT91 processor as the system console (the system
console is the device which receives all kernel messages and console is the device which receives all kernel messages and
warnings and which allows logins in single user mode). warnings and which allows logins in single user mode).
config SERIAL_ATMEL_PDC config SERIAL_ATMEL_PDC
bool "Support DMA transfers on AT91 / AT32 serial port" bool "Support DMA transfers on AT91 serial port"
depends on SERIAL_ATMEL depends on SERIAL_ATMEL
default y default y
help help
Say Y here if you wish to use the PDC to do DMA transfers to Say Y here if you wish to use the PDC to do DMA transfers to
and from the Atmel AT91 / AT32 serial port. In order to and from the Atmel AT91 serial port. In order to
actually use DMA transfers, make sure that the use_dma_tx actually use DMA transfers, make sure that the use_dma_tx
and use_dma_rx members in the atmel_uart_data struct is set and use_dma_rx members in the atmel_uart_data struct is set
appropriately for each port. appropriately for each port.
@ -152,7 +152,7 @@ config SERIAL_ATMEL_TTYAT
bool "Install as device ttyATn instead of ttySn" bool "Install as device ttyATn instead of ttySn"
depends on SERIAL_ATMEL=y depends on SERIAL_ATMEL=y
help help
Say Y here if you wish to have the internal AT91 / AT32 UARTs Say Y here if you wish to have the internal AT91 UARTs
appear as /dev/ttyATn (major 204, minor starting at 154) appear as /dev/ttyATn (major 204, minor starting at 154)
instead of the normal /dev/ttySn (major 4, minor starting at instead of the normal /dev/ttySn (major 4, minor starting at
64). This is necessary if you also want other UARTs, such as 64). This is necessary if you also want other UARTs, such as

View File

@ -1,5 +1,5 @@
/* /*
* Driver for Atmel AT91 / AT32 Serial ports * Driver for Atmel AT91 Serial ports
* Copyright (C) 2003 Rick Bronson * Copyright (C) 2003 Rick Bronson
* *
* Based on drivers/char/serial_sa1100.c, by Deep Blue Solutions Ltd. * Based on drivers/char/serial_sa1100.c, by Deep Blue Solutions Ltd.
@ -119,7 +119,6 @@ struct atmel_uart_char {
/* /*
* at91: 6 USARTs and one DBGU port (SAM9260) * at91: 6 USARTs and one DBGU port (SAM9260)
* avr32: 4
* samx7: 3 USARTs and 5 UARTs * samx7: 3 USARTs and 5 UARTs
*/ */
#define ATMEL_MAX_UART 8 #define ATMEL_MAX_UART 8
@ -229,21 +228,6 @@ static inline void atmel_uart_writel(struct uart_port *port, u32 reg, u32 value)
__raw_writel(value, port->membase + reg); __raw_writel(value, port->membase + reg);
} }
#ifdef CONFIG_AVR32
/* AVR32 cannot handle 8 or 16bit I/O accesses but only 32bit I/O accesses */
static inline u8 atmel_uart_read_char(struct uart_port *port)
{
return __raw_readl(port->membase + ATMEL_US_RHR);
}
static inline void atmel_uart_write_char(struct uart_port *port, u8 value)
{
__raw_writel(value, port->membase + ATMEL_US_THR);
}
#else
static inline u8 atmel_uart_read_char(struct uart_port *port) static inline u8 atmel_uart_read_char(struct uart_port *port)
{ {
return __raw_readb(port->membase + ATMEL_US_RHR); return __raw_readb(port->membase + ATMEL_US_RHR);
@ -254,8 +238,6 @@ static inline void atmel_uart_write_char(struct uart_port *port, u8 value)
__raw_writeb(value, port->membase + ATMEL_US_THR); __raw_writeb(value, port->membase + ATMEL_US_THR);
} }
#endif
#ifdef CONFIG_SERIAL_ATMEL_PDC #ifdef CONFIG_SERIAL_ATMEL_PDC
static bool atmel_use_pdc_rx(struct uart_port *port) static bool atmel_use_pdc_rx(struct uart_port *port)
{ {

View File

@ -83,7 +83,7 @@
/* Parisc type numbers. */ /* Parisc type numbers. */
#define PORT_MUX 48 #define PORT_MUX 48
/* Atmel AT91 / AT32 SoC */ /* Atmel AT91 SoC */
#define PORT_ATMEL 49 #define PORT_ATMEL 49
/* Macintosh Zilog type numbers */ /* Macintosh Zilog type numbers */