public inbox for linux-serial@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] 8250: Add PowerPC-style MMIO support to the 8250 driver
@ 2008-07-24 12:11 Laurent Pinchart
  2008-07-24 12:14 ` Russell King
  0 siblings, 1 reply; 3+ messages in thread
From: Laurent Pinchart @ 2008-07-24 12:11 UTC (permalink / raw)
  To: linux-serial; +Cc: Alan Cox, rmk

[-- Attachment #1: Type: text/plain, Size: 1758 bytes --]

This patch adds support for memory-mapped 8250-like UARTs on PowerPC platforms.

Signed-off-by: Laurent Pinchart <laurentp@cse-semaphore.com>
---
 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 #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-07-24 12:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-24 12:11 [PATCH] 8250: Add PowerPC-style MMIO support to the 8250 driver Laurent Pinchart
2008-07-24 12:14 ` Russell King
2008-07-24 12:34   ` Laurent Pinchart

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox