summaryrefslogtreecommitdiff
path: root/drivers/tty/serial/earlycon.c
diff options
context:
space:
mode:
authorNoam Camus <noamc@ezchip.com>2015-05-25 06:54:28 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-06-01 00:55:12 +0300
commit6e63be3fee141cc6d122f648b524a66160dbe6aa (patch)
treed3210a5bd98d24de80fff5f44b7a9b071e2682ff /drivers/tty/serial/earlycon.c
parent0f17e3b478a77e00e873f6ca235644322843c81e (diff)
downloadlinux-6e63be3fee141cc6d122f648b524a66160dbe6aa.tar.xz
serial: earlycon: Add support for big-endian MMIO accesses
Support command line parameters of the form: earlycon=<name>,io|mmio|mmio32|mmio32be,<addr>,<options> This commit seem to be needed even after commit: serial: 8250: Add support for big-endian MMIO accesses c627f2ceb692e8a9358b64ac2d139314e7bb0d17 Signed-off-by: Noam Camus <noamc@ezchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/earlycon.c')
-rw-r--r--drivers/tty/serial/earlycon.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/tty/serial/earlycon.c b/drivers/tty/serial/earlycon.c
index 6dc471e30e79..f09636083426 100644
--- a/drivers/tty/serial/earlycon.c
+++ b/drivers/tty/serial/earlycon.c
@@ -72,6 +72,7 @@ static int __init parse_options(struct earlycon_device *device, char *options)
switch (port->iotype) {
case UPIO_MEM32:
+ case UPIO_MEM32BE:
port->regshift = 2; /* fall-through */
case UPIO_MEM:
port->mapbase = addr;
@@ -90,9 +91,11 @@ static int __init parse_options(struct earlycon_device *device, char *options)
strlcpy(device->options, options, length);
}
- if (port->iotype == UPIO_MEM || port->iotype == UPIO_MEM32)
+ if (port->iotype == UPIO_MEM || port->iotype == UPIO_MEM32 ||
+ port->iotype == UPIO_MEM32BE)
pr_info("Early serial console at MMIO%s 0x%llx (options '%s')\n",
- (port->iotype == UPIO_MEM32) ? "32" : "",
+ (port->iotype == UPIO_MEM) ? "" :
+ (port->iotype == UPIO_MEM32) ? "32" : "32be",
(unsigned long long)port->mapbase,
device->options);
else
@@ -133,7 +136,7 @@ static int __init register_earlycon(char *buf, const struct earlycon_id *match)
*
* Registers the earlycon console matching the earlycon specified
* in the param string @buf. Acceptable param strings are of the form
- * <name>,io|mmio|mmio32,<addr>,<options>
+ * <name>,io|mmio|mmio32|mmio32be,<addr>,<options>
* <name>,0x<addr>,<options>
* <name>,<options>
* <name>