Message ID | 1554718489-11318-6-git-send-email-olekstysh@gmail.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | Renesas Stout board support (R-Car Gen2) | expand |
Hi Oleksandr, On 4/8/19 11:14 AM, Oleksandr Tyshchenko wrote: > From: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com> > > This patch makes possible to use existing early prink code > for Renesas "Stout" board based on R-Car H2 SoC (SCIFA). > > The "EARLY_PRINTK_VERSION" for that board should be 'A': > CONFIG_EARLY_PRINTK=scif,0xe6c40000,A > > Signed-off-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com> > CC: Julien Grall <julien.grall@arm.com> > > --- > Changes in v3: > - It was decided not to introduce new debug-scifa.inc > for handling SCIFA interface, but to extend existing > debug-scif.inc for handling both interfaces. > This patch is a result of splitting an initial patch > "xen/arm: Add SCIFA UART support for early printk" > and only adds a support. > --- > xen/arch/arm/arm32/debug-scif.inc | 9 ++++++--- > 1 file changed, 6 insertions(+), 3 deletions(-) > > diff --git a/xen/arch/arm/arm32/debug-scif.inc b/xen/arch/arm/arm32/debug-scif.inc > index a8d2eae..94a18ea 100644 > --- a/xen/arch/arm/arm32/debug-scif.inc > +++ b/xen/arch/arm/arm32/debug-scif.inc > @@ -1,7 +1,7 @@ > /* > * xen/arch/arm/arm32/debug-scif.inc > * > - * SCIF specific debug code > + * SCIF(A) specific debug code > * > * Oleksandr Tyshchenko <oleksandr.tyshchenko@globallogic.com> > * Copyright (C) 2014, Globallogic. > @@ -22,10 +22,13 @@ > #ifdef EARLY_PRINTK_VERSION_NONE > #define STATUS_REG SCIF_SCFSR > #define TX_FIFO_REG SCIF_SCFTDR > +#elif EARLY_PRINTK_VERSION_A > +#define STATUS_REG SCIFA_SCASSR > +#define TX_FIFO_REG SCIFA_SCAFTDR > #endif > > /* > - * SCIF UART wait UART to be ready to transmit > + * SCIF(A) UART wait UART to be ready to transmit When SCIFB will be introduced, we will have to modify this comment again. As we are only dealing with any version of SCIC in this file, could we just rework the comment to avoid mentioning the UART name? > * rb: register which contains the UART base address > * rc: scratch register > */ > @@ -37,7 +40,7 @@ > .endm > > /* > - * SCIF UART transmit character > + * SCIF(A) UART transmit character Same here. > * rb: register which contains the UART base address > * rt: register which contains the character to transmit > */ > Cheers,
On 14.04.19 20:56, Julien Grall wrote: > Hi Oleksandr, Hi Julien > > On 4/8/19 11:14 AM, Oleksandr Tyshchenko wrote: >> From: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com> >> >> This patch makes possible to use existing early prink code >> for Renesas "Stout" board based on R-Car H2 SoC (SCIFA). >> >> The "EARLY_PRINTK_VERSION" for that board should be 'A': >> CONFIG_EARLY_PRINTK=scif,0xe6c40000,A >> >> Signed-off-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com> >> CC: Julien Grall <julien.grall@arm.com> >> >> --- >> Changes in v3: >> - It was decided not to introduce new debug-scifa.inc >> for handling SCIFA interface, but to extend existing >> debug-scif.inc for handling both interfaces. >> This patch is a result of splitting an initial patch >> "xen/arm: Add SCIFA UART support for early printk" >> and only adds a support. >> --- >> xen/arch/arm/arm32/debug-scif.inc | 9 ++++++--- >> 1 file changed, 6 insertions(+), 3 deletions(-) >> >> diff --git a/xen/arch/arm/arm32/debug-scif.inc >> b/xen/arch/arm/arm32/debug-scif.inc >> index a8d2eae..94a18ea 100644 >> --- a/xen/arch/arm/arm32/debug-scif.inc >> +++ b/xen/arch/arm/arm32/debug-scif.inc >> @@ -1,7 +1,7 @@ >> /* >> * xen/arch/arm/arm32/debug-scif.inc >> * >> - * SCIF specific debug code >> + * SCIF(A) specific debug code >> * >> * Oleksandr Tyshchenko <oleksandr.tyshchenko@globallogic.com> >> * Copyright (C) 2014, Globallogic. >> @@ -22,10 +22,13 @@ >> #ifdef EARLY_PRINTK_VERSION_NONE >> #define STATUS_REG SCIF_SCFSR >> #define TX_FIFO_REG SCIF_SCFTDR >> +#elif EARLY_PRINTK_VERSION_A >> +#define STATUS_REG SCIFA_SCASSR >> +#define TX_FIFO_REG SCIFA_SCAFTDR >> #endif >> /* >> - * SCIF UART wait UART to be ready to transmit >> + * SCIF(A) UART wait UART to be ready to transmit > > When SCIFB will be introduced, we will have to modify this comment > again. As we are only dealing with any version of SCIC in this file, > could we just rework the comment to avoid mentioning the UART name? I think, yes. What about using SCIF(X)? Shall I update scif-uart.c/scif-uart.h which has SCIF(A) string? > >> * rb: register which contains the UART base address >> * rc: scratch register >> */ >> @@ -37,7 +40,7 @@ >> .endm >> /* >> - * SCIF UART transmit character >> + * SCIF(A) UART transmit character > > Same here. > >> * rb: register which contains the UART base address >> * rt: register which contains the character to transmit >> */ >> > > Cheers, >
Hi Oleksandr, On 4/15/19 12:43 PM, Oleksandr wrote: > > On 14.04.19 20:56, Julien Grall wrote: >> On 4/8/19 11:14 AM, Oleksandr Tyshchenko wrote: >>> From: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com> >>> >>> This patch makes possible to use existing early prink code >>> for Renesas "Stout" board based on R-Car H2 SoC (SCIFA). >>> >>> The "EARLY_PRINTK_VERSION" for that board should be 'A': >>> CONFIG_EARLY_PRINTK=scif,0xe6c40000,A >>> >>> Signed-off-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com> >>> CC: Julien Grall <julien.grall@arm.com> >>> >>> --- >>> Changes in v3: >>> - It was decided not to introduce new debug-scifa.inc >>> for handling SCIFA interface, but to extend existing >>> debug-scif.inc for handling both interfaces. >>> This patch is a result of splitting an initial patch >>> "xen/arm: Add SCIFA UART support for early printk" >>> and only adds a support. >>> --- >>> xen/arch/arm/arm32/debug-scif.inc | 9 ++++++--- >>> 1 file changed, 6 insertions(+), 3 deletions(-) >>> >>> diff --git a/xen/arch/arm/arm32/debug-scif.inc >>> b/xen/arch/arm/arm32/debug-scif.inc >>> index a8d2eae..94a18ea 100644 >>> --- a/xen/arch/arm/arm32/debug-scif.inc >>> +++ b/xen/arch/arm/arm32/debug-scif.inc >>> @@ -1,7 +1,7 @@ >>> /* >>> * xen/arch/arm/arm32/debug-scif.inc >>> * >>> - * SCIF specific debug code >>> + * SCIF(A) specific debug code >>> * >>> * Oleksandr Tyshchenko <oleksandr.tyshchenko@globallogic.com> >>> * Copyright (C) 2014, Globallogic. >>> @@ -22,10 +22,13 @@ >>> #ifdef EARLY_PRINTK_VERSION_NONE >>> #define STATUS_REG SCIF_SCFSR >>> #define TX_FIFO_REG SCIF_SCFTDR >>> +#elif EARLY_PRINTK_VERSION_A >>> +#define STATUS_REG SCIFA_SCASSR >>> +#define TX_FIFO_REG SCIFA_SCAFTDR >>> #endif >>> /* >>> - * SCIF UART wait UART to be ready to transmit >>> + * SCIF(A) UART wait UART to be ready to transmit >> >> When SCIFB will be introduced, we will have to modify this comment >> again. As we are only dealing with any version of SCIC in this file, >> could we just rework the comment to avoid mentioning the UART name? > > I think, yes. What about using SCIF(X)? Shall I update > scif-uart.c/scif-uart.h which has SCIF(A) string? In comments, I would just drop completely "SCIF(A)". For copyright header, we can either keep SCIF(A) or use SCIF(X). Which ever you prefer. Cheers,
diff --git a/xen/arch/arm/arm32/debug-scif.inc b/xen/arch/arm/arm32/debug-scif.inc index a8d2eae..94a18ea 100644 --- a/xen/arch/arm/arm32/debug-scif.inc +++ b/xen/arch/arm/arm32/debug-scif.inc @@ -1,7 +1,7 @@ /* * xen/arch/arm/arm32/debug-scif.inc * - * SCIF specific debug code + * SCIF(A) specific debug code * * Oleksandr Tyshchenko <oleksandr.tyshchenko@globallogic.com> * Copyright (C) 2014, Globallogic. @@ -22,10 +22,13 @@ #ifdef EARLY_PRINTK_VERSION_NONE #define STATUS_REG SCIF_SCFSR #define TX_FIFO_REG SCIF_SCFTDR +#elif EARLY_PRINTK_VERSION_A +#define STATUS_REG SCIFA_SCASSR +#define TX_FIFO_REG SCIFA_SCAFTDR #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 */ @@ -37,7 +40,7 @@ .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 */