Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753317AbbFEFbM (ORCPT ); Fri, 5 Jun 2015 01:31:12 -0400 Received: from smtprelay.synopsys.com ([198.182.47.9]:45432 "EHLO smtprelay.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751292AbbFEFbH (ORCPT ); Fri, 5 Jun 2015 01:31:07 -0400 Message-ID: <55713407.3010803@synopsys.com> Date: Fri, 5 Jun 2015 11:00:47 +0530 From: Vineet Gupta User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 Newsgroups: gmane.linux.documentation,gmane.linux.kernel,gmane.linux.serial To: Noam Camus , , , CC: , , , , , Subject: Re: [PATCH 1/1] serial: earlycon: Add support for big-endian MMIO accesses References: <1432526068-22820-1-git-send-email-noamc@ezchip.com> In-Reply-To: <1432526068-22820-1-git-send-email-noamc@ezchip.com> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.12.197.3] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 4705 Lines: 112 On Monday 25 May 2015 09:24 AM, Noam Camus wrote: > From: Noam Camus > > Support command line parameters of the form: > earlycon=,io|mmio|mmio32|mmio32be,, > > This commit seem to be needed even after commit: > serial: 8250: Add support for big-endian MMIO accesses > c627f2ceb692e8a9358b64ac2d139314e7bb0d17 > > Signed-off-by: Noam Camus > --- > Documentation/kernel-parameters.txt | 9 +++++---- > drivers/tty/serial/earlycon.c | 9 ++++++--- > drivers/tty/serial/serial_core.c | 7 +++++-- > 3 files changed, 16 insertions(+), 9 deletions(-) > > diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt > index 61ab162..55bb093 100644 > --- a/Documentation/kernel-parameters.txt > +++ b/Documentation/kernel-parameters.txt > @@ -959,14 +959,15 @@ bytes respectively. Such letter suffixes can also be entirely omitted. > uart[8250],io,[,options] > uart[8250],mmio,[,options] > uart[8250],mmio32,[,options] > + uart[8250],mmio32be,[,options] > uart[8250],0x[,options] > Start an early, polled-mode console on the 8250/16550 > UART at the specified I/O port or MMIO address. > MMIO inter-register address stride is either 8-bit > - (mmio) or 32-bit (mmio32). > - If none of [io|mmio|mmio32], is assumed to be > - equivalent to 'mmio'. 'options' are specified in the > - same format described for "console=ttyS"; if > + (mmio) or 32-bit (mmio32 or mmio32be). > + If none of [io|mmio|mmio32|mmio32be], is assumed > + to be equivalent to 'mmio'. 'options' are specified > + in the same format described for "console=ttyS"; if > unspecified, the h/w is not initialized. > > pl011, > diff --git a/drivers/tty/serial/earlycon.c b/drivers/tty/serial/earlycon.c > index 5fdc9f3..a840732 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 > - * ,io|mmio|mmio32,, > + * ,io|mmio|mmio32|mmio32be,, > * ,0x, > * , > * > diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c > index 0b7bb12..1124090 100644 > --- a/drivers/tty/serial/serial_core.c > +++ b/drivers/tty/serial/serial_core.c > @@ -1816,8 +1816,8 @@ uart_get_console(struct uart_port *ports, int nr, struct console *co) > * @options: ptr for field; NULL if not present (out) > * > * Decodes earlycon kernel command line parameters of the form > - * earlycon=,io|mmio|mmio32,, > - * console=,io|mmio|mmio32,, > + * earlycon=,io|mmio|mmio32|mmio32be,, > + * console=,io|mmio|mmio32|mmio32be,, > * > * The optional form > * earlycon=,0x, > @@ -1835,6 +1835,9 @@ int uart_parse_earlycon(char *p, unsigned char *iotype, unsigned long *addr, > } else if (strncmp(p, "mmio32,", 7) == 0) { > *iotype = UPIO_MEM32; > p += 7; > + } else if (strncmp(p, "mmio32be,", 9) == 0) { > + *iotype = UPIO_MEM32BE; > + p += 9; > } else if (strncmp(p, "io,", 3) == 0) { > *iotype = UPIO_PORT; > p += 3; > Ping ! Peter, Rob, Kevin - can u please take a look. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/