This patch adds support for memory-mapped 8250-like UARTs on PowerPC platforms. Signed-off-by: Laurent Pinchart <laurentp@xxxxxxxxxxxxxxxxx> --- drivers/serial/8250.c | 10 ++++++++++ include/linux/serial_core.h | 1 + 2 files changed, 11 insertions(+), 0 deletions(-) diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c index be95e55..5e0e382 100644 --- a/drivers/serial/8250.c +++ b/drivers/serial/8250.c @@ -380,6 +380,10 @@ static unsigned int serial_in(struct uart_8250_port *up, int offset) } else return readb(up->port.membase + offset); +#ifdef CONFIG_PPC + case UPIO_PPC_MMIO: + return in_8(up->port.membase + offset); +#endif default: return inb(up->port.iobase + offset); } @@ -429,6 +433,12 @@ serial_out(struct uart_8250_port *up, int offset, int value) value = serial_in(up, UART_IER); break; +#ifdef CONFIG_PPC + case UPIO_PPC_MMIO: + out_8(up->port.membase + offset, value); + break; +#endif + default: outb(value, up->port.iobase + offset); } diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h index d8f31de..1d8b940 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h @@ -261,6 +261,7 @@ struct uart_port { #define UPIO_TSI (5) /* Tsi108/109 type IO */ #define UPIO_DWAPB (6) /* DesignWare APB UART */ #define UPIO_RM9000 (7) /* RM9000 type IO */ +#define UPIO_PPC_MMIO (8) /* PowerPC-style MMIO */ unsigned int read_status_mask; /* driver specific */ unsigned int ignore_status_mask; /* driver specific */ -- 1.5.0 -- Laurent Pinchart CSE Semaphore Belgium Chaussee de Bruxelles, 732A B-1410 Waterloo Belgium T +32 (2) 387 42 59 F +32 (2) 387 42 75
Attachment:
signature.asc
Description: This is a digitally signed message part.