public inbox for linux-serial@vger.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurentp@cse-semaphore.com>
To: linux-serial@vger.kernel.org
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>, rmk@arm.linux.org.uk
Subject: [PATCH] 8250: Add PowerPC-style MMIO support to the 8250 driver
Date: Thu, 24 Jul 2008 14:11:15 +0200	[thread overview]
Message-ID: <200807241411.15735.laurentp@cse-semaphore.com> (raw)

[-- 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 --]

             reply	other threads:[~2008-07-24 12:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-24 12:11 Laurent Pinchart [this message]
2008-07-24 12:14 ` [PATCH] 8250: Add PowerPC-style MMIO support to the 8250 driver Russell King
2008-07-24 12:34   ` Laurent Pinchart

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200807241411.15735.laurentp@cse-semaphore.com \
    --to=laurentp@cse-semaphore.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-serial@vger.kernel.org \
    --cc=rmk@arm.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox