Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1230089 > unrolled thread

[PATCH] serial_core: support native endianness

Started byMax Filippov <jcmvbkbc@gmail.com>
First post2015-09-22 13:40 +0200
Last post2015-09-22 13:50 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] serial_core: support native endianness Max Filippov <jcmvbkbc@gmail.com> - 2015-09-22 13:40 +0200
    Re: [PATCH] serial_core: support native endianness Jiri Slaby <jslaby@suse.cz> - 2015-09-22 13:50 +0200

#1230089 — [PATCH] serial_core: support native endianness

FromMax Filippov <jcmvbkbc@gmail.com>
Date2015-09-22 13:40 +0200
Subject[PATCH] serial_core: support native endianness
Message-ID<qbu5s-45y-7@gated-at.bofh.it>
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
---
 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 <options> field; NULL if not present (out)
  *
  *	Decodes earlycon kernel command line parameters of the form
- *	   earlycon=<name>,io|mmio|mmio32|mmio32be,<addr>,<options>
- *	   console=<name>,io|mmio|mmio32|mmio32be,<addr>,<options>
+ *	   earlycon=<name>,io|mmio|mmio32|mmio32be|mmio32native,<addr>,<options>
+ *	   console=<name>,io|mmio|mmio32|mmio32be|mmio32native,<addr>,<options>
  *
  *	The optional form
  *	   earlycon=<name>,0x<addr>,<options>
@@ -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

--
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/

[toc] | [next] | [standalone]


#1230096

FromJiri Slaby <jslaby@suse.cz>
Date2015-09-22 13:50 +0200
Message-ID<qbuf8-4hk-7@gated-at.bofh.it>
In reply to#1230089
On 09/22/2015, 01:34 PM, Max Filippov wrote:

NACK until you provide a useful commit log including description why
this is needed.

> Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
> ---
>  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 <options> field; NULL if not present (out)
>   *
>   *	Decodes earlycon kernel command line parameters of the form
> - *	   earlycon=<name>,io|mmio|mmio32|mmio32be,<addr>,<options>
> - *	   console=<name>,io|mmio|mmio32|mmio32be,<addr>,<options>
> + *	   earlycon=<name>,io|mmio|mmio32|mmio32be|mmio32native,<addr>,<options>
> + *	   console=<name>,io|mmio|mmio32|mmio32be|mmio32native,<addr>,<options>
>   *
>   *	The optional form
>   *	   earlycon=<name>,0x<addr>,<options>
> @@ -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;
> 

thanks,
-- 
js
suse labs
--
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/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web