Renesas Stout board support (R-Car Gen2)
v2 cover Renesas Stout board support (R-Car Gen2)
From: Oleksandr Tyshchenko <[email protected]>
Hi, all.
The purpose of this patch series is to add required support to be able to run Xen on Renesas Stout board [1] which uses SCIFA compatible UART as a console interface.
Actually Xen already has support for SCIF compatible UARTs which are used on Renesas Lager (R-Car Gen2), Salvator-X, H3ULCB/M3ULCB (R-Car Gen3) and other development boards. So this patch series extends existing support to be able to handle both interfaces.
----------
Current patch series is based on the following commit 3389a8dc8c5753a3c84744923cd0193395e3f2a9 and tested on Stout (ARM32) and H3ULCB (ARM64) boards.
You can find current patch series here:
repo: https://github.com/otyshchenko1/xen.git branch: stout_upstream
You can find previous discussion here:
https://www.mail-archive.com/[email protected]/msg21058.html
Please note, that current patch series doesn’t have the following patches:
- xen/arm: drivers: scif: Remove unused #define-s (already upstreamed)
- xen/arm: Reuse R-Car Gen2 platform code for Stout board (was dropped) but has new one:
- xen/arm: Clarify usage of earlyprintk for Lager board
----------
In order to run Xen on Stout board you need "PSCI-enabled" U-Boot (not upsteamed yet). You can find corresponding patches for U-Boot here:
http://u-boot.10912.n7.nabble.com/PATCH-0-3-PSCI-support-for-r8a7790-SoC-Lager-Stout-boards-td357352.html
Have a plan to update Xen Wiki regarding this board.
[1] https://elinux.org/R-Car/Boards/Stout
----------
Oleksandr Tyshchenko (3):
xen/arm: drivers: scif: Add support for SCIFA compatible UARTs xen/arm: Clarify usage of earlyprintk for Lager board xen/arm: Add SCIFA UART support for early printk
docs/misc/arm/early-printk.txt | 2 +- xen/arch/arm/arm32/debug-scifa.inc | 51 ++++++++++++++ xen/drivers/char/scif-uart.c | 139 +++++++++++++++++++++++++++---------- xen/include/asm-arm/scif-uart.h | 44 ++++++++++-- 4 files changed, 194 insertions(+), 42 deletions(-) create mode 100644 xen/arch/arm/arm32/debug-scifa.inc
Signature · 7 lines
2.7.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
PATCH v2 1/3 xen/arm: drivers: scif: Add support for SCIFA compatible UARTs
From: Oleksandr Tyshchenko <[email protected]>
Extend existing driver to be able to handle SCIFA interface as well. SCIF and SCIFA have lot in common, though SCIFA has different offsets and bits for some registers.
The "data" field in struct dt_device_match is used for recognizing what interface is present on a target board.
---
Changes in v2:
- Name a enum for describing interfaces this driver supports
- Use local variable for "params" where appropriate
- Use "data" field in struct dt_device_match instead of calling dt_device_is_compatible()
- Don't check for "overrun_reg != status_reg" condition during initialization
--- xen/drivers/char/scif-uart.c | 139 ++++++++++++++++++++++++++++++---------- xen/include/asm-arm/scif-uart.h | 44 +++++++++++-- 2 files changed, 142 insertions(+), 41 deletions(-)
xen/drivers/char/scif-uart.c +104 -35
@@ -1,7 +1,7 @@/* * xen/drivers/char/scif-uart.c * -* Driver for SCIF (Serial communication interface with FIFO) +* Driver for SCIF(A) (Serial communication interface with FIFO (A)) * compatible UART. * * Oleksandr Tyshchenko <[email protected]>
@@ -40,16 +40,66 @@ static struct scif_uart {char __iomem *regs;struct irqaction irqaction;struct vuart_info vuart; +const struct port_params *params; } scif_com = {0}; +enum port_types +{ +SCIF_PORT , +SCIFA_PORT , +NR_PORTS , +}; + +struct port_params +{ +unsigned int status_reg; +unsigned int tx_fifo_reg; +unsigned int rx_fifo_reg; +unsigned int overrun_reg; +unsigned int overrun_mask; +unsigned int error_mask; +unsigned int irq_flags; +unsigned int fifo_size; +}; + +static const struct port_params port_params[NR_PORTS ] = +{ + [SCIF_PORT ] = + { + .status_reg =SCIF_SCFSR , + .tx_fifo_reg =SCIF_SCFTDR , + .rx_fifo_reg =SCIF_SCFRDR , + .overrun_reg =SCIF_SCLSR , + .overrun_mask =SCLSR_ORER , + .error_mask =SCFSR_PER |SCFSR_FER |SCFSR_BRK |SCFSR_ER , + .irq_flags =SCSCR_RIE |SCSCR_TIE |SCSCR_REIE , + .fifo_size =16 , + }, + + [SCIFA_PORT ] = + { + .status_reg =SCIFA_SCASSR , + .tx_fifo_reg =SCIFA_SCAFTDR , + .rx_fifo_reg =SCIFA_SCAFRDR , + .overrun_reg =SCIFA_SCASSR , + .overrun_mask =SCASSR_ORER , + .error_mask =SCASSR_PER |SCASSR_FER |SCASSR_BRK |SCASSR_ER | +SCASSR_ORER , + .irq_flags =SCASCR_RIE |SCASCR_TIE |SCASCR_DRIE |SCASCR_ERIE | +SCASCR_BRIE , + .fifo_size =64 , + }, +}; +static void scif_uart_interrupt (int irq,void *data,struct cpu_user_regs *regs) {struct serial_port *port = data;struct scif_uart *uart = port->uart; +const struct port_params *params = uart->params;uint16_t status, ctrl; ctrl =scif_readw (uart,SCIF_SCSCR ); - status =scif_readw (uart,SCIF_SCFSR ) & ~SCFSR_TEND ; + status =scif_readw (uart, params->status_reg) & ~SCFSR_TEND ;/* Ignore next flag if TX Interrupt is disabled */ if ( !(ctrl &SCSCR_TIE ) ) status &= ~SCFSR_TDFE ;
@@ -65,13 +115,16 @@ static void scif_uart_interrupt(int irq, void *data, struct cpu_user_regs *regs)serial_rx_interrupt (port, regs);/* Error Interrupt */ -if ( status &SCIF_ERRORS ) -scif_writew (uart,SCIF_SCFSR , ~SCIF_ERRORS ); -if (scif_readw (uart,SCIF_SCLSR ) &SCLSR_ORER ) -scif_writew (uart,SCIF_SCLSR ,0 ); +if ( status & params->error_mask ) +scif_writew (uart, params->status_reg, ~params->error_mask); +if ( params->overrun_reg != params->status_reg ) + { +if (scif_readw (uart, params->overrun_reg) & params->overrun_mask ) +scif_writew (uart, params->overrun_reg, ~params->overrun_mask); + } ctrl =scif_readw (uart,SCIF_SCSCR ); - status =scif_readw (uart,SCIF_SCFSR ) & ~SCFSR_TEND ; + status =scif_readw (uart, params->status_reg) & ~SCFSR_TEND ;/* Ignore next flag if TX Interrupt is disabled */ if ( !(ctrl &SCSCR_TIE ) ) status &= ~SCFSR_TDFE ;
@@ -81,12 +134,13 @@ static void scif_uart_interrupt(int irq, void *data, struct cpu_user_regs *regs)static void __init scif_uart_init_preirq (struct serial_port *port) {struct scif_uart *uart = port->uart; +const struct port_params *params = uart->params;/* * Wait until last bit has been transmitted. This is needed for a smooth * transition when we come from early printk */ -while ( !(scif_readw (uart,SCIF_SCFSR ) &SCFSR_TEND ) ); +while ( !(scif_readw (uart, params->status_reg) &SCFSR_TEND ) );/* Disable TX/RX parts and all interrupts */ scif_writew (uart,SCIF_SCSCR ,0 );
@@ -95,10 +149,10 @@ static void __init scif_uart_init_preirq(struct serial_port *port)scif_writew (uart,SCIF_SCFCR ,SCFCR_RFRST |SCFCR_TFRST );/* Clear all errors and flags */ -scif_readw (uart,SCIF_SCFSR ); -scif_writew (uart,SCIF_SCFSR ,0 ); -scif_readw (uart,SCIF_SCLSR ); -scif_writew (uart,SCIF_SCLSR ,0 ); +scif_readw (uart, params->status_reg); +scif_writew (uart, params->status_reg,0 ); +scif_readw (uart, params->overrun_reg); +scif_writew (uart, params->overrun_reg,0 );/* Setup trigger level for TX/RX FIFOs */ scif_writew (uart,SCIF_SCFCR ,SCFCR_RTRG11 |SCFCR_TTRG11 );
@@ -111,6 +165,7 @@ static void __init scif_uart_init_preirq(struct serial_port *port)static void __init scif_uart_init_postirq (struct serial_port *port) {struct scif_uart *uart = port->uart; +const struct port_params *params = uart->params;int rc; uart->irqaction.handler = scif_uart_interrupt;
@@ -122,14 +177,17 @@ static void __init scif_uart_init_postirq(struct serial_port *port) uart->irq);/* Clear all errors */ -if (scif_readw (uart,SCIF_SCFSR ) &SCIF_ERRORS ) -scif_writew (uart,SCIF_SCFSR , ~SCIF_ERRORS ); -if (scif_readw (uart,SCIF_SCLSR ) &SCLSR_ORER ) -scif_writew (uart,SCIF_SCLSR ,0 ); +if (scif_readw (uart, params->status_reg) & params->error_mask ) +scif_writew (uart, params->status_reg, ~params->error_mask); +if ( params->overrun_reg != params->status_reg ) + { +if (scif_readw (uart, params->overrun_reg) & params->overrun_mask ) +scif_writew (uart, params->overrun_reg, ~params->overrun_mask); + }/* Enable TX/RX and Error Interrupts */ scif_writew (uart,SCIF_SCSCR ,scif_readw (uart,SCIF_SCSCR ) | -SCSCR_TIE |SCSCR_RIE |SCSCR_REIE ); + params->irq_flags); }static void scif_uart_suspend (struct serial_port *port)
@@ -145,43 +203,47 @@ static void scif_uart_resume(struct serial_port *port)static int scif_uart_tx_ready (struct serial_port *port) {struct scif_uart *uart = port->uart; +const struct port_params *params = uart->params;uint16_t cnt;/* Check for empty space in TX FIFO */ -if ( !(scif_readw (uart,SCIF_SCFSR ) &SCFSR_TDFE ) ) +if ( !(scif_readw (uart, params->status_reg) &SCFSR_TDFE ) )return 0 ;/* Check number of data bytes stored in TX FIFO */ cnt =scif_readw (uart,SCIF_SCFDR ) >>8 ; -ASSERT ( cnt >=0 && cnt <=SCIF_FIFO_MAX_SIZE ); +ASSERT ( cnt >=0 && cnt <= params->fifo_size ); -return (SCIF_FIFO_MAX_SIZE - cnt); +return (params->fifo_size - cnt); }static void scif_uart_putc (struct serial_port *port,char c) {struct scif_uart *uart = port->uart; +const struct port_params *params = uart->params; -scif_writeb (uart,SCIF_SCFTDR , c); +scif_writeb (uart, params->tx_fifo_reg, c);/* Clear required TX flags */ -scif_writew (uart,SCIF_SCFSR ,scif_readw (uart,SCIF_SCFSR ) & - ~(SCFSR_TEND |SCFSR_TDFE )); +scif_writew (uart, params->status_reg, +scif_readw (uart, params->status_reg) & + ~(SCFSR_TEND |SCFSR_TDFE )); }static int scif_uart_getc (struct serial_port *port,char *pc) {struct scif_uart *uart = port->uart; +const struct port_params *params = uart->params;/* Check for available data bytes in RX FIFO */ -if ( !(scif_readw (uart,SCIF_SCFSR ) & (SCFSR_RDF |SCFSR_DR )) ) +if ( !(scif_readw (uart, params->status_reg) & (SCFSR_RDF |SCFSR_DR )) )return 0 ; - *pc =scif_readb (uart,SCIF_SCFRDR ); + *pc =scif_readb (uart, params->rx_fifo_reg);/* dummy read */ -scif_readw (uart,SCIF_SCFSR ); +scif_readw (uart, params->status_reg);/* Clear required RX flags */ -scif_writew (uart,SCIF_SCFSR , ~(SCFSR_RDF |SCFSR_DR )); +scif_writew (uart, params->status_reg, ~(SCFSR_RDF |SCFSR_DR ));return 1 ; }
@@ -229,13 +291,22 @@ static struct uart_driver __read_mostly scif_uart_driver = { .vuart_info = scif_vuart_info, }; +static const struct dt_device_match scif_uart_dt_match[]__initconst = +{ + { .compatible ="renesas,scif" , .data = (void *)SCIF_PORT }, + { .compatible ="renesas,scifa" , .data = (void *)SCIFA_PORT }, + {/* sentinel */ }, +}; +static int __init scif_uart_init (struct dt_device_node *dev,const void *data) { +const struct dt_device_match *match;const char *config = data;struct scif_uart *uart;int res;u64 addr, size; +enum port_types port_type;if (strcmp (config,"" ) )printk ("WARNING: UART configuration is not supported\n" );
@@ -265,10 +336,14 @@ static int __init scif_uart_init(struct dt_device_node *dev,return -ENOMEM ; } + match =dt_match_node (scif_uart_dt_match, dev); + port_type = (enum port_types )match->data; + uart->params = &port_params[port_type]; + uart->vuart.base_addr = addr; uart->vuart.size = size; - uart->vuart.data_off =SCIF_SCFTDR ; - uart->vuart.status_off =SCIF_SCFSR ; + uart->vuart.data_off = uart->params->tx_fifo_reg; + uart->vuart.status_off = uart->params->status_reg; uart->vuart.status =SCFSR_TDFE ;/* Register with generic serial driver */
@@ -279,12 +354,6 @@ static int __init scif_uart_init(struct dt_device_node *dev,return 0 ; } -static const struct dt_device_match scif_uart_dt_match[]__initconst = -{ -DT_MATCH_COMPATIBLE ("renesas,scif" ), - {/* sentinel */ }, -}; -DT_DEVICE_START (scif_uart,"SCIF UART" ,DEVICE_SERIAL ) .dt_match = scif_uart_dt_match, .init = scif_uart_init,
xen/include/asm-arm/scif-uart.h +38 -6
68 lines not on this page · raw message
Signature · 7 lines
2.7.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
Re: [PATCH V2 1/3] xen/arm: drivers: scif: Add support for SCIFA compatible UARTs
Hi,
Quoted 3 lines · Oleksandr Tyshchenko
From: Oleksandr Tyshchenko <[email protected]>
Extend existing driver to be able to handle SCIFA interface as well.
In general a patch should do only one thing. In this case, this should have been split in 2 patches: one to extend the driver, the second to add support for SCIFA.
Please split the patch accordingly.
Quoted 20 lines
SCIF and SCIFA have lot in common, though SCIFA has different offsets and bits for some registers.
The "data" field in struct
dt_device_matchis used for recognizing what interface is present on a target board.Signed-off-by Oleksandr Tyshchenko <[email protected]>---
Changes in v2:
- Name a enum for describing interfaces this driver supports
- Use local variable for "params" where appropriate
- Use "data" field in structdt_device_matchinstead of callingdt_device_is_compatible()
- Don't check for "overrun_reg!=status_reg" condition during initialization--- xen/drivers/char/scif-uart.c | 139 ++++++++++++++++++++++++++++++---------- xen/include/asm-arm/scif-uart.h | 44 +++++++++++-- 2 files changed, 142 insertions(+), 41 deletions(-)
xen/drivers/char/scif-uart.c static struct uart_driver __read_mostly scif_uart_driver = { · line 297
Quoted 4 lines
xen/drivers/char/scif-uart.c +4
-0+static const struct dt_device_match scif_uart_dt_match[]__initconst = +{ + { .compatible ="renesas,scif" , .data = (void *)SCIF_PORT }, + { .compatible ="renesas,scifa" , .data = (void *)SCIFA_PORT },
The port_type is pretty much only used in scif_uart_init. So how about passing a pointer to the structure directly?
Cheers,
Signature · 6 lines
Julien Grall _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
Re: [PATCH V2 1/3] xen/arm: drivers: scif: Add support for SCIFA compatible UARTs
Quoted 1 line · Julien Grall
Hi,
Hi
Quoted 9 lines · Oleksandr Tyshchenko
Quoted 3 lines
From: Oleksandr Tyshchenko <[email protected]>
Extend existing driver to be able to handle SCIFA interface as well.
In general a patch should do only one thing. In this case, this should have been split in 2 patches: one to extend the driver, the second to add support for SCIFA.
Please split the patch accordingly.
Not entirely clear to me how the current patch should be split...
- The first patch will be just a copy of the current patch, but without new compatible string (SCIFA).
- The second patch will add new compatible string.
Did I get your point correctly?
Quoted 20 lines
Quoted 20 lines
SCIF and SCIFA have lot in common, though SCIFA has different offsets and bits for some registers.
The "data" field in struct
dt_device_matchis used for recognizing what interface is present on a target board.Signed-off-by Oleksandr Tyshchenko <[email protected]>---
Changes in v2:
- Name a enum for describing interfaces this driver supports
- Use local variable for "params" where appropriate
- Use "data" field in structdt_device_matchinstead of callingdt_device_is_compatible()
- Don't check for "overrun_reg!=status_reg" condition during initialization
---
xen/drivers/char/scif-uart.c | 139
++++++++++++++++++++++++++++++----------
Quoted 8 lines
xen/drivers/char/scif-uart.c static struct uart_driver __read_mostly scif_uart_driver = { · line 297
Quoted 6 lines
xen/include/asm-arm/scif-uart.h| 44 +++++++++++--2 files changed, 142 insertions(+), 41 deletions(-)xen/drivers/char/scif-uart.c +4
-0+static const struct dt_device_match scif_uart_dt_match[]__initconst = +{ + { .compatible = "renesas,scif", .data = (void *)SCIF_PORT }, + { .compatible = "renesas,scifa", .data = (void *)SCIFA_PORT },The
port_typeis pretty much only used inscif_uart_init. So how about passing a pointer to the structure directly?
Agree. Will do.
Quoted 3 lines
Cheers,
Signature · 9 lines
Regards, Oleksandr Tyshchenko _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
Re: [PATCH V2 1/3] xen/arm: drivers: scif: Add support for SCIFA compatible UARTs
Hi Oleksandr,
Quoted 15 lines · Oleksandr
Quoted 1 line · Julien Grall
Hi,
Hi
Quoted 8 lines · Oleksandr Tyshchenko
Quoted 3 lines
From: Oleksandr Tyshchenko <[email protected]>
Extend existing driver to be able to handle SCIFA interface as well.
In general a patch should do only one thing. In this case, this should have been split in 2 patches: one to extend the driver, the second to add support for SCIFA.
Quoted 7 lines
Quoted 1 line
Please split the patch accordingly.
Not entirely clear to me how the current patch should be split...
- The first patch will be just a copy of the current patch, but without new compatible string (SCIFA).
Without anything related to SCIFA. This patch would only contain the rework of the code.
Quoted 2 lines
- The second patch will add new compatible string.
+ anything related to SCIFA (Macros and the SCIFA element in the array port_params.
Cheers,
Signature · 6 lines
Julien Grall _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
Re: [PATCH V2 1/3] xen/arm: drivers: scif: Add support for SCIFA compatible UARTs
Quoted 8 lines · Julien Grall
Hi Oleksandr,
Quoted 5 lines · Oleksandr
Quoted 1 line · Julien Grall
Hi,
Hi
Hi Julien
Quoted 18 lines
Quoted 10 lines
Quoted 10 lines · Oleksandr Tyshchenko
Quoted 3 lines
From: Oleksandr Tyshchenko <[email protected]>
Extend existing driver to be able to handle SCIFA interface as well.
In general a patch should do only one thing. In this case, this should have been split in 2 patches: one to extend the driver, the second to add support for SCIFA.
Quoted 7 lines
Quoted 1 line
Please split the patch accordingly.
Not entirely clear to me how the current patch should be split...
- The first patch will be just a copy of the current patch, but without new compatible string (SCIFA).
Quoted 7 lines
Without anything related to SCIFA. This patch would only contain the rework of the code.
Quoted 2 lines
- The second patch will add new compatible string.
+ anything related to SCIFA (Macros and the SCIFA element in the array
port_params.
It is clear now. Will do.
Quoted 3 lines
Cheers,
Signature · 9 lines
Regards, Oleksandr Tyshchenko _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
PATCH v2 2/3 xen/arm: Clarify usage of earlyprintk for Lager board
In reply to Oleksandr TyshchenkoFrom: Oleksandr Tyshchenko <[email protected]>
Current sentence is not entirely correct. Since SCIF0 interface is applicable for Lager board, but is not applicable for all R-Car H2 based boards. For example, Stout board uses SCIFA0 interface.
--- docs/misc/arm/early-printk.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
docs/misc/arm/early-printk.txt +1 -1
@@ -39,7 +39,7 @@ the name of the machine: - fastmodel: printk on ARM Fastmodel software emulators - hikey960: printk with pl011 with Hikey 960 - juno: printk with pl011 on Juno platform - - lager: printk with SCIF0 on Renesas R-Car H2 processors + - lager: printk with SCIF0 on Renesas Lager board (R-Car H2 processor) - midway: printk with the pl011 on Calxeda Midway processors - mvebu: printk with the MVEBU for Marvell Armada 3700 SoCs - omap5432: printk with UART3 on TI OMAP5432 processors
Signature · 7 lines
2.7.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
Re: [PATCH V2 2/3] xen/arm: Clarify usage of earlyprintk for Lager board
Hi,
Quoted 7 lines · Oleksandr Tyshchenko
From: Oleksandr Tyshchenko <[email protected]>
Current sentence is not entirely correct. Since SCIF0 interface is applicable for Lager board, but is not applicable for all R-Car H2 based boards. For example, Stout board uses SCIFA0 interface.
Signed-off-by Oleksandr Tyshchenko <[email protected]>
Quoted 18 lines
--- docs/misc/arm/early-printk.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)docs/misc/arm/early-printk.txt +1
-1@@ -39,7 +39,7 @@ the name of the machine: - fastmodel: printk on ARM Fastmodel software emulators - hikey960: printk with pl011 with Hikey 960 - juno: printk with pl011 on Juno platform - - lager: printk with SCIF0 on Renesas R-Car H2 processors + - lager: printk with SCIF0 on Renesas Lager board (R-Car H2 processor) - midway: printk with the pl011 on Calxeda Midway processors - mvebu: printk with the MVEBU for Marvell Armada 3700 SoCs - omap5432: printk with UART3 on TI OMAP5432 processors
Signature · 6 lines
Julien Grall _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
PATCH v2 3/3 xen/arm: Add SCIFA UART support for early printk
In reply to Oleksandr TyshchenkoFrom: Oleksandr Tyshchenko <[email protected]>
Add support for Renesas "Stout" development board based on R-Car H2 SoC which has SCIFA compatible UART.
Actually existing SCIF UART support (debug-scif.inc) and newly added SCIFA UART support (debug-scifa.inc) differ only in registers offsets.
---
Changes in v2:
- Move clarification regarding Lager board to separate patch
- Drop changes in early-printk.txt and Rules.mk, earlyprink usage for Stout board should be documented on a Xen wiki
--- xen/arch/arm/arm32/debug-scifa.inc | 51 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 xen/arch/arm/arm32/debug-scifa.inc
xen/arch/arm/arm32/debug-scifa.inc new file +51 -0
@@ -0,0 +1,51 @@ +/* + * xen/arch/arm/arm32/debug-scifa.inc + * + * SCIFA specific debug code + * + * Oleksandr Tyshchenko <[email protected]> + * Copyright (C) 2018 EPAM Systems Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include <asm/scif-uart.h> + +/* + * SCIFA UART wait UART to be ready to transmit + * rb: register which contains the UART base address + * rc: scratch register + */ +.macro early_uart_ready rb rc +1: + ldrh \rc, [\rb, #SCIFA_SCASSR] /* <- SCASSR (status register) */ + tst \rc, #SCASSR_TDFE /* Check TDFE bit */ + beq 1b /* Wait for the UART to be ready */ +.endm + +/* + * SCIFA UART transmit character + * rb: register which contains the UART base address + * rt: register which contains the character to transmit + */ +.macro early_uart_transmit rb rt + strb \rt, [\rb, #SCIFA_SCAFTDR] /* -> SCAFTDR (data register) */ + ldrh \rt, [\rb, #SCIFA_SCASSR] /* <- SCASSR (status register) */ + and \rt, \rt, #(~(SCASSR_TEND | SCASSR_TDFE)) /* Clear TEND and TDFE bits */ + strh \rt, [\rb, #SCIFA_SCASSR] /* -> SCASSR (status register) */ +.endm + +/* + * Local variables: + * mode: ASM + * indent-tabs-mode: nil + * End: + */
Signature · 7 lines
2.7.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
Re: [PATCH V2 3/3] xen/arm: Add SCIFA UART support for early printk
Hi,
Quoted 8 lines · Oleksandr Tyshchenko
From: Oleksandr Tyshchenko <[email protected]>
Add support for Renesas "Stout" development board based on R-Car H2 SoC which has SCIFA compatible UART.
Actually existing SCIF UART support (debug-scif.inc) and newly added SCIFA UART support (debug-scifa.inc) differ only in registers offsets.
Can we try to merge the two then? One solution is to provide another options similar to how we deal with REG_SHIFT on the 8250.
Cheers,
Signature · 6 lines
Julien Grall _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
Re: [PATCH V2 3/3] xen/arm: Add SCIFA UART support for early printk
Quoted 1 line · Julien Grall
Hi,
Hi
Quoted 12 lines · Oleksandr Tyshchenko
Quoted 8 lines
From: Oleksandr Tyshchenko <[email protected]>
Add support for Renesas "Stout" development board based on R-Car H2 SoC which has SCIFA compatible UART.
Actually existing SCIF UART support (debug-scif.inc) and newly added SCIFA UART support (debug-scifa.inc) differ only in registers offsets.
Can we try to merge the two then? One solution is to provide another options similar to how we deal with
REG_SHIFTon the 8250.
Actually, the main difference for the "early printk" support is in two reg offsets:
+#define SCIFA_SCASSR 0x14 /* Serial status register */ +#define SCIFA_SCAFTDR 0x20 /* Transmit FIFO data register */
+#define SCIF_SCFSR 0x10 /* Serial status register */ +#define SCIF_SCFTDR 0x0c /* Transmit FIFO data register */
I am not mistaken, we will have to introduce two options to cover this case, as the offsets are not correlated with each other, no?
Quoted 3 lines
Cheers,
Signature · 9 lines
Regards, Oleksandr Tyshchenko _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
Re: [PATCH V2 3/3] xen/arm: Add SCIFA UART support for early printk
Quoted 31 lines · Oleksandr
Quoted 1 line · Julien Grall
Hi,
Hi
Quoted 12 lines · Oleksandr Tyshchenko
Quoted 8 lines
From: Oleksandr Tyshchenko <[email protected]>
Add support for Renesas "Stout" development board based on R-Car H2 SoC which has SCIFA compatible UART.
Actually existing SCIF UART support (debug-scif.inc) and newly added SCIFA UART support (debug-scifa.inc) differ only in registers offsets.
Can we try to merge the two then? One solution is to provide another options similar to how we deal with
REG_SHIFTon the 8250.Actually, the main difference for the "early printk" support is in two reg offsets:
(quoted diff) +4
-0+#define SCIFA_SCASSR 0x14 /* Serial status register */ +#define SCIFA_SCAFTDR 0x20 /* Transmit FIFO data register */ +#define SCIF_SCFSR 0x10 /* Serial status register */ +#define SCIF_SCFTDR 0x0c /* Transmit FIFO data register */
Quoted 1 line
I am not mistaken, we will have to introduce two options to cover this case, as the offsets are not correlated with each other, no?
Sorry, it should read as:
*If* I am not mistaken ...
Quoted 5 lines
Quoted 5 lines
Cheers,
Signature · 9 lines
Regards, Oleksandr Tyshchenko _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
Re: [PATCH V2 3/3] xen/arm: Add SCIFA UART support for early printk
Hi Oleksandr,
Quoted 26 lines · Oleksandr
Quoted 24 lines · Oleksandr
Quoted 1 line · Julien Grall
Hi,
Hi
Quoted 12 lines · Oleksandr Tyshchenko
Quoted 8 lines
From: Oleksandr Tyshchenko <[email protected]>
Add support for Renesas "Stout" development board based on R-Car H2 SoC which has SCIFA compatible UART.
Actually existing SCIF UART support (debug-scif.inc) and newly added SCIFA UART support (debug-scifa.inc) differ only in registers offsets.
Can we try to merge the two then? One solution is to provide another options similar to how we deal with
REG_SHIFTon the 8250.Actually, the main difference for the "early printk" support is in two reg offsets:
Quoted 8 lines
Quoted 8 lines
(quoted diff) +4
-0+#define SCIFA_SCASSR 0x14 /* Serial status register */ +#define SCIFA_SCAFTDR 0x20 /* Transmit FIFO data register */ +#define SCIF_SCFSR 0x10 /* Serial status register */ +#define SCIF_SCFTDR 0x0c /* Transmit FIFO data register */I am not mistaken, we will have to introduce two options to cover this case, as the offsets are not correlated with each other, no?
You don't need two options. For instance, you can only introduce an option SCIF_VERSION that would be 0 for SCIF and 61 (ascii 'a') for SCIFA.
Then in the code, you can use SCIF_VERSION to decides which sets of macros you are using.
Cheers,
Signature · 6 lines
Julien Grall _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
Re: [PATCH V2 3/3] xen/arm: Add SCIFA UART support for early printk
Quoted 1 line · Julien Grall
Hi Oleksandr,
Hi Julien
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Actually, the main difference for the "early printk" support is in two reg offsets:
(quoted diff) +4
-0+#define SCIFA_SCASSR 0x14 /* Serial status register */ +#define SCIFA_SCAFTDR 0x20 /* Transmit FIFO data register */ +#define SCIF_SCFSR 0x10 /* Serial status register */ +#define SCIF_SCFTDR 0x0c /* Transmit FIFO dataregister */
Quoted 5 lines
Quoted 1 line
Quoted 1 line
I am not mistaken, we will have to introduce two options to cover this case, as the offsets are not correlated with each other, no?
You don't need two options. For instance, you can only introduce an option
SCIF_VERSIONthat would be 0 for SCIF and 61 (ascii 'a') for SCIFA.Then in the code, you can use
SCIF_VERSIONto decides which sets of macros you are using.
I think I understand the idea. Will try.
Signature · 9 lines
Regards, Oleksandr Tyshchenko _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
Re: [PATCH V2 3/3] xen/arm: Add SCIFA UART support for early printk
Hi Julien
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Actually, the main difference for the "early printk" support is in two reg offsets:
(quoted diff) +4
-0+#define SCIFA_SCASSR 0x14 /* Serial status register */ +#define SCIFA_SCAFTDR 0x20 /* Transmit FIFO data register */ +#define SCIF_SCFSR 0x10 /* Serial status register */ +#define SCIF_SCFTDR 0x0c /* Transmit FIFO dataregister */
Quoted 7 lines
Quoted 5 lines
Quoted 1 line
Quoted 1 line
I am not mistaken, we will have to introduce two options to cover this case, as the offsets are not correlated with each other, no?
You don't need two options. For instance, you can only introduce an option
SCIF_VERSIONthat would be 0 for SCIF and 61 (ascii 'a') for SCIFA.Then in the code, you can use
SCIF_VERSIONto decides which sets of macros you are using.I think I understand the idea. Will try.
Is it something you would like to see?
[Sorry for formatting]
---
xen/arch/arm/Rules.mk | 7 +++++++ xen/arch/arm/arm32/debug-scif.inc | 22 +++++++++++++++-------
2 files changed, 22 insertions(+), 7 deletions(-)
xen/arch/arm/Rules.mk +0 -0
@@ -69,6 +69,12 @@ EARLY_PRINTK_BAUD := $(word 3,$(EARLY_PRINTK_CFG))
endif
endif
+# For the debug-scif.inc to recognize which UART offsets to apply
+ifeq ($(EARLY_PRINTK_INC),scifa)
+EARLY_PRINTK_SCIFA_OPTION := y
+EARLY_PRINTK_INC := scif
+endif
+
ifneq ($(EARLY_PRINTK_INC),)
EARLY_PRINTK := y
endif
@@ -79,6 +85,7 @@ CFLAGS-$(EARLY_PRINTK) += -DEARLY_PRINTK_INC=\"debug-$(EARLY_PRINTK_INC).inc\" CFLAGS-$(EARLY_PRINTK) += -DEARLY_PRINTK_BAUD=$(EARLY_PRINTK_BAUD) CFLAGS-$(EARLY_PRINTK) += -DEARLY_UART_BASE_ADDRESS=$(EARLY_UART_BASE_ADDRESS) CFLAGS-$(EARLY_PRINTK) += -DEARLY_UART_REG_SHIFT=$(EARLY_UART_REG_SHIFT) +CFLAGS-$(EARLY_PRINTK_SCIFA_OPTION) += -DEARLY_PRINTK_SCIFA_OPTION
else # !CONFIG_DEBUG
xen/arch/arm/arm32/debug-scif.inc +0 -0
@@ -1,7 +1,7 @@
/*
* xen/arch/arm/arm32/debug-scif.inc
*
- * SCIF specific debug code
+ * SCIF(A) specific debug code
*
* Oleksandr Tyshchenko <[email protected]>
* Copyright (C) 2014, Globallogic.
@@ -19,28 +19,36 @@
#include <asm/scif-uart.h>
+#ifdef EARLY_PRINTK_SCIFA_OPTION
+#define STATUS_REG SCIFA_SCASSR
+#define TX_FIFO_REG SCIFA_SCAFTDR
+#else
+#define STATUS_REG SCIF_SCFSR
+#define TX_FIFO_REG SCIF_SCFTDR
+#endif
+
/*
- * SCIF UART wait UART to be ready to transmit
+ * SCIF(A) UART wait UART to be ready to transmit
* rb: register which contains the UART base address
* rc: scratch register
*/
.macro early_uart_ready rb rc
1:
- ldrh \rc, [\rb, #SCIF_SCFSR] /* <- SCFSR (status register) */ + ldrh \rc, [\rb, #STATUS_REG] /* Read status register */ tst \rc, #SCFSR_TDFE /* Check TDFE bit */ beq 1b /* Wait for the UART to be ready */ .endm
/*
- * SCIF UART transmit character
+ * SCIF(A) UART transmit character
* rb: register which contains the UART base address
* rt: register which contains the character to transmit
*/
.macro early_uart_transmit rb rt
- strb \rt, [\rb, #SCIF_SCFTDR] /* -> SCFTDR (data register) */ - ldrh \rt, [\rb, #SCIF_SCFSR] /* <- SCFSR (status register) */ + strb \rt, [\rb, #TX_FIFO_REG] /* Write data register */ + ldrh \rt, [\rb, #STATUS_REG] /* Read status register */ and \rt, \rt, #(~(SCFSR_TEND | SCFSR_TDFE)) /* Clear TEND and TDFE bits */ - strh \rt, [\rb, #SCIF_SCFSR] /* -> SCFSR (status register) */ + strh \rt, [\rb, #STATUS_REG] /* Write status register */ .endm
/*
Signature · 1 line
2.7.4
Quoted 2 lines
Signature · 9 lines
Regards, Oleksandr Tyshchenko _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
Re: [PATCH V2 3/3] xen/arm: Add SCIFA UART support for early printk
Hi Oleksandr,
On 2/21/19 6:22 PM, Oleksandr wrote:
=>>>>> Actually, the main difference for the "early printk" support is in
Quoted 14 lines
Quoted 14 lines
Quoted 14 lines
Quoted 11 lines
Quoted 11 lines
two reg offsets:
(quoted diff) +4
-0+#define SCIFA_SCASSR 0x14 /* Serial status register */ +#define SCIFA_SCAFTDR 0x20 /* Transmit FIFO data register */ +#define SCIF_SCFSR 0x10 /* Serial status register */ +#define SCIF_SCFTDR 0x0c /* Transmit FIFO dataregister */
I am not mistaken, we will have to introduce two options to cover this case, as the offsets are not correlated with each other, no?
You don't need two options. For instance, you can only introduce an option
SCIF_VERSIONthat would be 0 for SCIF and 61 (ascii 'a') for SCIFA.
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
Then in the code, you can use
SCIF_VERSIONto decides which sets of macros you are using.I think I understand the idea. Will try.
Is it something you would like to see?
Your solution below require to overwrite EARLY_PRINTK_INC and not very easy to extend of other version (e.g scifb). As I suggested earlier, we can introduce an option the same way REG_SHIFT exist for 8250. The definition of CONFIG_EARLY_PRINTK is:
CONFIG_EARLY_PRINTK=<INC>,<BASE_ADDRESS>,<OTHER_OPTIONS>
<OTHER_OPTIONS> would be the version. Nothing for SCIF and A for SCFIA.
Then in Rules.mk, you would have something like:
ifneq ($(word 3,$(EARLY_PRINTK_CFG)),)
CFLAGS-y += -DCONFIG_EARLY_PRINTK_VERSION_$(word 3, $(EARLY_PRINTK_CFG) else
CFLAGS-y += -DCONFIG_EARLY_PRINTK_VERSION_NONE
endif
debug-scif.inc would then contain:
#ifdef CONFIG_EARLY_PRINTK_VERSION_A
#define foo
#define bar
#elifdef CONFIG_EARLY_PRINTK_VERSION_NONE
#define foo
#define bar
#endif
The CONFIG_EARLY_PRINTK_VERSION_NONE is here to help catching new addition. If someone if using a different version, it would not compile. Also, the code in Rules.mk is generic enough to extend for other version (e.g scifb).
Does it make sense?
Cheers,
Signature · 6 lines
Julien Grall _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
Re: [PATCH V2 3/3] xen/arm: Add SCIFA UART support for early printk
Quoted 1 line · Julien Grall
Hi Oleksandr,
Hi Julien
Quoted 48 lines · Oleksandr
=>>>>> Actually, the main difference for the "early printk" support is in
Quoted 14 lines
Quoted 14 lines
Quoted 14 lines
Quoted 11 lines
Quoted 11 lines
two reg offsets:
(quoted diff) +4
-0+#define SCIFA_SCASSR 0x14 /* Serial status register */ +#define SCIFA_SCAFTDR 0x20 /* Transmit FIFO data register */ +#define SCIF_SCFSR 0x10 /* Serial status register */ +#define SCIF_SCFTDR 0x0c /* Transmit FIFO dataregister */
I am not mistaken, we will have to introduce two options to cover this case, as the offsets are not correlated with each other, no?
You don't need two options. For instance, you can only introduce an option
SCIF_VERSIONthat would be 0 for SCIF and 61 (ascii 'a') for SCIFA.Quoted 6 lines
Quoted 3 lines
Quoted 1 line
Then in the code, you can use
SCIF_VERSIONto decides which sets of macros you are using.I think I understand the idea. Will try.
Is it something you would like to see?
Your solution below require to overwrite
EARLY_PRINTK_INCand not very easy to extend of other version (e.g scifb). As I suggested earlier, we can introduce an option the same wayREG_SHIFTexist for 8250. The definition ofCONFIG_EARLY_PRINTKis:
CONFIG_EARLY_PRINTK=<INC>,<BASE_ADDRESS>,<OTHER_OPTIONS><
OTHER_OPTIONS> would be the version. Nothing for SCIF and A for SCFIA.Then in Rules.mk, you would have something like:
ifneq ($(word 3,$(EARLY_PRINTK_CFG)),)
CFLAGS-y += -DCONFIG_EARLY_PRINTK_VERSION_$(word 3, $(EARLY_PRINTK_CFG) else
CFLAGS-y += -DCONFIG_EARLY_PRINTK_VERSION_NONE
endifdebug-scif.inc would then contain:
#ifdef
CONFIG_EARLY_PRINTK_VERSION_A
#define foo
#define bar
#elifdefCONFIG_EARLY_PRINTK_VERSION_NONE
#define foo
#define bar
#endif
Quoted 4 lines
The
CONFIG_EARLY_PRINTK_VERSION_NONEis here to help catching new addition. If someone if using a different version, it would not compile. Also, the code in Rules.mk is generic enough to extend for other version (e.g scifb).Does it make sense?
Absolutely. Thank you
Quoted 3 lines
Cheers,
Signature · 9 lines
Regards, Oleksandr Tyshchenko _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
Re: [PATCH V2 3/3] xen/arm: Add SCIFA UART support for early printk
Hi, Julien
Quoted 24 lines
Quoted 24 lines
Your solution below require to overwrite
EARLY_PRINTK_INCand not very easy to extend of other version (e.g scifb). As I suggested earlier, we can introduce an option the same wayREG_SHIFTexist for 8250. The definition ofCONFIG_EARLY_PRINTKis:
CONFIG_EARLY_PRINTK=<INC>,<BASE_ADDRESS>,<OTHER_OPTIONS><
OTHER_OPTIONS> would be the version. Nothing for SCIF and A for SCFIA.Then in Rules.mk, you would have something like:
ifneq ($(word 3,$(EARLY_PRINTK_CFG)),)
CFLAGS-y += -DCONFIG_EARLY_PRINTK_VERSION_$(word 3, $(EARLY_PRINTK_CFG) else
CFLAGS-y += -DCONFIG_EARLY_PRINTK_VERSION_NONE
endifdebug-scif.inc would then contain:
#ifdef
CONFIG_EARLY_PRINTK_VERSION_A
#define foo
#define bar
#elifdefCONFIG_EARLY_PRINTK_VERSION_NONE
#define foo
#define bar
#endif
Quoted 6 lines
Quoted 4 lines
The
CONFIG_EARLY_PRINTK_VERSION_NONEis here to help catching new addition. If someone if using a different version, it would not compile. Also, the code in Rules.mk is generic enough to extend for other version (e.g scifb).Does it make sense?
Absolutely. Thank you
Idea works as expected.
Just a quick question.
Shall I do this by a single patch or this should be spitted in two patches: "reworking current code" followed by "adding SCIFA"?
Quoted 5 lines
Quoted 5 lines
Cheers,
Signature · 9 lines
Regards, Oleksandr Tyshchenko _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
Re: [PATCH V2 3/3] xen/arm: Add SCIFA UART support for early printk
Quoted 2 lines · Oleksandr
Hi, Julien
Hi Oleksandr,
Quoted 33 lines
Quoted 25 lines
Quoted 25 lines
Your solution below require to overwrite
EARLY_PRINTK_INCand not very easy to extend of other version (e.g scifb). As I suggested earlier, we can introduce an option the same wayREG_SHIFTexist for 8250. The definition ofCONFIG_EARLY_PRINTKis:
CONFIG_EARLY_PRINTK=<INC>,<BASE_ADDRESS>,<OTHER_OPTIONS><
OTHER_OPTIONS> would be the version. Nothing for SCIF and A for SCFIA.Then in Rules.mk, you would have something like:
ifneq ($(word 3,$(EARLY_PRINTK_CFG)),)
CFLAGS-y += -DCONFIG_EARLY_PRINTK_VERSION_$(word 3, $(EARLY_PRINTK_CFG) else
CFLAGS-y += -DCONFIG_EARLY_PRINTK_VERSION_NONE
endifdebug-scif.inc would then contain:
#ifdef
CONFIG_EARLY_PRINTK_VERSION_A
#define foo
#define bar
#elifdefCONFIG_EARLY_PRINTK_VERSION_NONE
#define foo
#define bar
#endifQuoted 6 lines
Quoted 4 lines
The
CONFIG_EARLY_PRINTK_VERSION_NONEis here to help catching new addition. If someone if using a different version, it would not compile. Also, the code in Rules.mk is generic enough to extend for other version (e.g scifb).Does it make sense?
Absolutely. Thank you
Quoted 6 lines
Idea works as expected.
Just a quick question.
Shall I do this by a single patch or this should be spitted in two patches: "reworking current code" followed by "adding SCIFA"?
Separate patch if possible. Thank you!
Cheers,
Signature · 6 lines
Julien Grall _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 3 lines · Oleksandr Tyshchenko
From: Oleksandr Tyshchenko <[email protected]>
Hi, all.
Hi, all
gentle reminder...
Quoted 51 lines
The purpose of this patch series is to add required support to be able to run Xen on Renesas Stout board [1] which uses SCIFA compatible UART as a console interface.
Actually Xen already has support for SCIF compatible UARTs which are used on Renesas Lager (R-Car Gen2), Salvator-X, H3ULCB/M3ULCB (R-Car Gen3) and other development boards. So this patch series extends existing support to be able to handle both interfaces.
----------
Current patch series is based on the following commit
3389a8dc8c5753a3c84744923cd0193395e3f2a9and tested on Stout (ARM32) and H3ULCB (ARM64) boards.You can find current patch series here:
repo: https://github.com/otyshchenko1/xen.git branch:stout_upstreamYou can find previous discussion here:
https://www.mail-archive.com/[email protected]/msg21058.htmlPlease note, that current patch series doesn’t have the following patches:
- xen/arm: drivers: scif: Remove unused #define-s (already upstreamed)
- xen/arm: Reuse R-Car Gen2 platform code for Stout board (was dropped) but has new one:
- xen/arm: Clarify usage of earlyprintk for Lager board----------
In order to run Xen on Stout board you need "PSCI-enabled" U-Boot (not upsteamed yet). You can find corresponding patches for U-Boot here:
http://u-boot.10912.n7.nabble.com/PATCH-0-3-PSCI-support-for-r8a7790-SoC-Lager-Stout-boards-td357352.htmlHave a plan to update Xen Wiki regarding this board.
[1] https://elinux.org/R-Car/Boards/Stout
----------
Oleksandr Tyshchenko (3):
xen/arm: drivers: scif: Add support for SCIFA compatible UARTs xen/arm: Clarify usage of earlyprintk for Lager board xen/arm: Add SCIFA UART support for early printkdocs/misc/arm/early-printk.txt | 2 +- xen/arch/arm/arm32/debug-scifa.inc | 51 ++++++++++++++ xen/drivers/char/scif-uart.c | 139 +++++++++++++++++++++++++++---------- xen/include/asm-arm/scif-uart.h | 44 ++++++++++-- 4 files changed, 194 insertions(+), 42 deletions(-)create mode 100644 xen/arch/arm/arm32/debug-scifa.inc
Signature · 9 lines
Regards, Oleksandr Tyshchenko _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 11 lines · On Fri, 15 Feb 2019, 14:25 Oleksandr, <[email protected]> wrote:
Quoted 3 lines · Oleksandr Tyshchenko
From: Oleksandr Tyshchenko <[email protected]>
Hi, all.
Hi, all
gentle reminder...
This is in my queue of patches to review. Also, as we are in freeze, I tend to prioritize patches for 4.12.
I will try to have a look next week.
Cheers,
Quoted 66 lines
Quoted 3 lines
The purpose of this patch series is to add required support to be able
to run
Quoted 1 line
Xen on Renesas Stout board [1] which uses SCIFA compatible UART as a
console
Quoted 3 lines
interface.
Actually Xen already has support for SCIF compatible UARTs which are
used on
Quoted 1 line
Renesas Lager (R-Car Gen2), Salvator-X, H3ULCB/M3ULCB (R-Car Gen3) and
other
Quoted 1 line
development boards. So this patch series extends existing support to be
able
Quoted 5 lines
to handle both interfaces.
----------
Current patch series is based on the following commit
3389a8dc8c5753a3c84744923cd0193395e3f2a9Quoted 7 lines
and tested on Stout (ARM32) and H3ULCB (ARM64) boards.
You can find current patch series here:
repo: https://github.com/otyshchenko1/xen.git branch:stout_upstreamYou can find previous discussion here:
https://www.mail-archive.com/[email protected]/msg21058.html
Quoted 2 lines
Please note, that current patch series doesn’t have the following
patches:
Quoted 8 lines
- xen/arm: drivers: scif: Remove unused #define-s (already upstreamed)
- xen/arm: Reuse R-Car Gen2 platform code for Stout board (was dropped) but has new one:
- xen/arm: Clarify usage of earlyprintk for Lager board----------
In order to run Xen on Stout board you need "PSCI-enabled" U-Boot (not
upsteamed yet).
Quoted 2 lines
You can find corresponding patches for U-Boot here:
Quoted 7 lines
Have a plan to update Xen Wiki regarding this board.
[1] https://elinux.org/R-Car/Boards/Stout
----------
Quoted 8 lines
Oleksandr Tyshchenko (3):
xen/arm: drivers: scif: Add support for SCIFA compatible UARTs xen/arm: Clarify usage of earlyprintk for Lager board xen/arm: Add SCIFA UART support for early printkdocs/misc/arm/early-printk.txt | 2 +- xen/arch/arm/arm32/debug-scifa.inc | 51 ++++++++++++++ xen/drivers/char/scif-uart.c | 139+++++++++++++++++++++++++++----------
Quoted 4 lines
xen/include/asm-arm/scif-uart.h | 44 ++++++++++-- 4 files changed, 194 insertions(+), 42 deletions(-)create mode 100644 xen/arch/arm/arm32/debug-scifa.inc
--
Regards,
Quoted 7 lines
Oleksandr Tyshchenko
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
On 15.02.19 15:30, Julien Grall wrote:
Hi, Julien
Quoted 17 lines · On Fri, 15 Feb 2019, 14:25 Oleksandr, <[email protected]…
On 01.02.19 14:37, Oleksandr Tyshchenko wrote:
> From: Oleksandr Tyshchenko <[email protected]
<mailto:[email protected]>>
>
> Hi, all.
Hi, all
gentle reminder...Quoted 3 lines
This is in my queue of patches to review. Also, as we are in freeze, I tend to prioritize patches for 4.12.
I will try to have a look next week.
I understand. Thank you.
Quoted 80 lines
Cheers,
Quoted 2 lines
The purpose of this patch series is to add required support to
be able to run
> Xen on Renesas Stout board [1] which uses SCIFA compatible UART as a console
> interface.
>
> Actually Xen already has support for SCIF compatible UARTs which are used on
> Renesas Lager (R-Car Gen2), Salvator-X, H3ULCB/M3ULCB (R-Car Gen3) and other
> development boards. So this patch series extends existing support to be able
> to handle both interfaces.
>
> ----------
>
> Current patch series is based on the following commit3389a8dc8c5753a3c84744923cd0193395e3f2a9
> and tested on Stout (ARM32) and H3ULCB (ARM64) boards.
>
> You can find current patch series here:
> repo: https://github.com/otyshchenko1/xen.git branch:stout_upstream>
> You can find previous discussion here:
>
https://www.mail-archive.com/[email protected]/msg21058.html
>
> Please note, that current patch series doesn’t have the following patches:
> - xen/arm: drivers: scif: Remove unused #define-s (already upstreamed)
> - xen/arm: Reuse R-Car Gen2 platform code for Stout board (was dropped)
> but has new one:
> - xen/arm: Clarify usage of earlyprintk for Lager board >
> ----------
>
> In order to run Xen on Stout board you need "PSCI-enabled" U-Boot (not upsteamed yet).
> You can find corresponding patches for U-Boot here:
>
http://u-boot.10912.n7.nabble.com/PATCH-0-3-PSCI-support-for-r8a7790-SoC-Lager-Stout-boards-td357352.html
>
> Have a plan to update Xen Wiki regarding this board.
>
> [1] https://elinux.org/R-Car/Boards/Stout
>
> ----------
>
> Oleksandr Tyshchenko (3):
> xen/arm: drivers: scif: Add support for SCIFA compatible UARTs > xen/arm: Clarify usage of earlyprintk for Lager board > xen/arm: Add SCIFA UART support for early printk
>
> docs/misc/arm/early-printk.txt | 2 +-
> xen/arch/arm/arm32/debug-scifa.inc | 51 ++++++++++++++ > xen/drivers/char/scif-uart.c | 139
+++++++++++++++++++++++++++----------
> xen/include/asm-arm/scif-uart.h | 44 ++++++++++-- > 4 files changed, 194 insertions(+), 42 deletions(-)
> create mode 100644 xen/arch/arm/arm32/debug-scifa.inc >
--
Regards,Oleksandr Tyshchenko
_______________________________________________
Xen-devel mailing list
[email protected] <mailto:[email protected]>
https://lists.xenproject.org/mailman/listinfo/xen-devel
Signature · 3 lines
Regards, Oleksandr Tyshchenko
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel