serial_core: support native endianness
PATCH 1/1 serial_core: support native endianness
Signed-off-by Max Filippov <[email protected]>
--- drivers/tty/serial/serial_core.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
drivers/tty/serial/serial_core.c +6 -2
@@ -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 ;
Signature · 1 line
1.8.1.4
On 09/22/2015, 01:34 PM, Max Filippov wrote:
NACK until you provide a useful commit log including description why this is needed.
Quoted 22 lines
Signed-off-by Max Filippov <[email protected]>--- drivers/tty/serial/serial_core.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)drivers/tty/serial/serial_core.c +2
-2@@ -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>
drivers/tty/serial/serial_core.c int uart_parse_earlycon(char *p, unsigned char *iotype, unsigned long *addr, · line 1857
Quoted 10 lines
drivers/tty/serial/serial_core.c +4
-0@@ -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,
Signature · 2 lines
js suse labs