diff options
author | Kevin Cernekee <cernekee@gmail.com> | 2015-04-09 22:05:17 +0200 |
---|---|---|
committer | Rob Herring <robh@kernel.org> | 2015-04-15 02:35:45 +0200 |
commit | c627f2ceb692e8a9358b64ac2d139314e7bb0d17 (patch) | |
tree | 948fa9e378ab5216d5115a68c18939cf4b4e46a1 /drivers/tty/serial/8250/8250_early.c | |
parent | of: Document {little,big,native}-endian bindings (diff) | |
download | linux-c627f2ceb692e8a9358b64ac2d139314e7bb0d17.tar.xz linux-c627f2ceb692e8a9358b64ac2d139314e7bb0d17.zip |
serial: 8250: Add support for big-endian MMIO accesses
Add cases for UPIO_MEM32BE wherever there are currently cases handling
UPIO_MEM32.
Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Reviewed-by: Peter Hurley <peter@hurleysoftware.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Rob Herring <robh@kernel.org>
Diffstat (limited to 'drivers/tty/serial/8250/8250_early.c')
-rw-r--r-- | drivers/tty/serial/8250/8250_early.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/tty/serial/8250/8250_early.c b/drivers/tty/serial/8250/8250_early.c index c31a22b4f845..84f6d11bbeed 100644 --- a/drivers/tty/serial/8250/8250_early.c +++ b/drivers/tty/serial/8250/8250_early.c @@ -45,6 +45,8 @@ unsigned int __weak __init serial8250_early_in(struct uart_port *port, int offse return readb(port->membase + offset); case UPIO_MEM32: return readl(port->membase + (offset << 2)); + case UPIO_MEM32BE: + return ioread32be(port->membase + (offset << 2)); case UPIO_PORT: return inb(port->iobase + offset); default: @@ -61,6 +63,9 @@ void __weak __init serial8250_early_out(struct uart_port *port, int offset, int case UPIO_MEM32: writel(value, port->membase + (offset << 2)); break; + case UPIO_MEM32BE: + iowrite32be(value, port->membase + (offset << 2)); + break; case UPIO_PORT: outb(value, port->iobase + offset); break; |