From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933024AbbIVLfg (ORCPT ); Tue, 22 Sep 2015 07:35:36 -0400 Received: from mail-la0-f52.google.com ([209.85.215.52]:36742 "EHLO mail-la0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753007AbbIVLfc (ORCPT ); Tue, 22 Sep 2015 07:35:32 -0400 From: Max Filippov To: linux-serial@vger.kernel.org Cc: Greg Kroah-Hartman , Jiri Slaby , linux-kernel@vger.kernel.org, Max Filippov Subject: [PATCH] serial_core: support native endianness Date: Tue, 22 Sep 2015 14:34:53 +0300 Message-Id: <1442921693-1389-1-git-send-email-jcmvbkbc@gmail.com> X-Mailer: git-send-email 1.8.1.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Signed-off-by: Max Filippov --- drivers/tty/serial/serial_core.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c index f368520..84b5695 100644 --- a/drivers/tty/serial/serial_core.c +++ b/drivers/tty/serial/serial_core.c @@ -1826,8 +1826,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|mmio32be,, - * console=,io|mmio|mmio32|mmio32be,, + * earlycon=,io|mmio|mmio32|mmio32be|mmio32native,, + * console=,io|mmio|mmio32|mmio32be|mmio32native,, * * The optional form * earlycon=,0x, @@ -1848,6 +1848,10 @@ int uart_parse_earlycon(char *p, unsigned char *iotype, unsigned long *addr, } else if (strncmp(p, "mmio32be,", 9) == 0) { *iotype = UPIO_MEM32BE; p += 9; + } else if (strncmp(p, "mmio32native,", 13) == 0) { + *iotype = IS_ENABLED(CONFIG_CPU_BIG_ENDIAN) ? + UPIO_MEM32BE : UPIO_MEM32; + p += 13; } else if (strncmp(p, "io,", 3) == 0) { *iotype = UPIO_PORT; p += 3; -- 1.8.1.4