xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V2 1/2] xen:arm64: Add SCIF UART support for earlyprintk
@ 2017-07-27 14:50 Andrii Anisov
  2017-07-27 14:50 ` [PATCH V2 2/2] xen:arm: earlyprintk configuration for R-Car Gen3 boards Andrii Anisov
  2017-08-01 11:46 ` [PATCH V2 1/2] xen:arm64: Add SCIF UART support for earlyprintk Julien Grall
  0 siblings, 2 replies; 4+ messages in thread
From: Andrii Anisov @ 2017-07-27 14:50 UTC (permalink / raw)
  To: xen-devel
  Cc: Andrii Anisov, julien.grall, sstabellini, Iurii Mykhalskyi,
	Iurii Konovalenko

From: Iurii Konovalenko <iurii.konovalenko@globallogic.com>

Add support for a SCIF compatible UART found in Renesas R-Car Gen3 SoCs.

Signed-off-by: Iurii Konovalenko <iurii.konovalenko@globallogic.com>
Signed-off-by: Iurii Mykhalskyi <iurii.mykhalskyi@globallogic.com>
Signed-off-by: Andrii Anisov <andrii_anisov@epam.com>
---

Changes in v2:
    - fixed register names in comments and their coding style

---
 xen/arch/arm/arm64/debug-scif.inc | 53 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 53 insertions(+)
 create mode 100644 xen/arch/arm/arm64/debug-scif.inc

diff --git a/xen/arch/arm/arm64/debug-scif.inc b/xen/arch/arm/arm64/debug-scif.inc
new file mode 100644
index 0000000..c351c07
--- /dev/null
+++ b/xen/arch/arm/arm64/debug-scif.inc
@@ -0,0 +1,53 @@
+/*
+ * xen/arch/arm/arm64/debug-scif.inc
+ *
+ * SCIF specific debug code
+ *
+ * Oleksandr Tyshchenko <oleksandr.tyshchenko@globallogic.com>
+ * Iurii Konovalenko <iurii.konovalenko@globallogic.com>
+ * Iurii Mykhalskyi <iurii.mykhalskyi@globallogic.com>
+ * Copyright (C) 2014-2016, Globallogic.
+ *
+ * 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>
+
+/*
+ * SCIF UART wait UART to be ready to transmit
+ * xb: register which contains the UART base address
+ * c: scratch register
+ */
+.macro early_uart_ready xb c
+1:
+        ldrh   w\c, [\xb, #SCIF_SCFSR]   /* <- SCFSR (status register) */
+        tst    w\c, #SCFSR_TDFE          /* Check TDFE bit */
+        beq    1b                        /* Wait for the UART to be ready */
+.endm
+
+/*
+ * SCIF UART transmit character
+ * xb: register which contains the UART base address
+ * wt: register which contains the character to transmit
+ */
+.macro early_uart_transmit xb wt
+        strb   \wt, [\xb, #SCIF_SCFTDR]                  /* -> SCFTDR (data register) */
+        ldrh   \wt, [\xb, #SCIF_SCFSR]                   /* <- SCFSR (status register) */
+        and    \wt, \wt, #(~(SCFSR_TEND | SCFSR_TDFE))   /* Clear TEND and TDFE bits */
+        strh   \wt, [\xb, #SCIF_SCFSR]                   /* -> SCFSR (status register) */
+.endm
+
+/*
+ * Local variables:
+ * mode: ASM
+ * indent-tabs-mode: nil
+ * End:
+ */
-- 
2.7.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH V2 2/2] xen:arm: earlyprintk configuration for R-Car Gen3 boards
  2017-07-27 14:50 [PATCH V2 1/2] xen:arm64: Add SCIF UART support for earlyprintk Andrii Anisov
@ 2017-07-27 14:50 ` Andrii Anisov
  2017-08-01 11:47   ` Julien Grall
  2017-08-01 11:46 ` [PATCH V2 1/2] xen:arm64: Add SCIF UART support for earlyprintk Julien Grall
  1 sibling, 1 reply; 4+ messages in thread
From: Andrii Anisov @ 2017-07-27 14:50 UTC (permalink / raw)
  To: xen-devel
  Cc: Iurii Mykhalskyi, julien.grall, sstabellini, Andrii Anisov,
	Iurii Konovalenko

From: Andrii Anisov <andrii_anisov@epam.com>

Introduce an earlyprintk configuration for R-Car Gen3 SoC based development
boards, like:
 - Salvator-X [http://elinux.org/R-Car/Boards/Salvator-X]
 - M3ULCB [http://elinux.org/R-Car/Boards/M3SK]
 - H3ULCB [http://elinux.org/R-Car/Boards/H3SK]

Signed-off-by: Iurii Konovalenko <iurii.konovalenko@globallogic.com>
Signed-off-by: Iurii Mykhalskyi <iurii.mykhalskyi@globallogic.com>
Signed-off-by: Andrii Anisov <andrii_anisov@epam.com>
---

Changes in v2:
    - s/H3/Gen3
    - place a configuration symbol in an alpahabetical order

---
 docs/misc/arm/early-printk.txt | 1 +
 xen/arch/arm/Rules.mk          | 1 +
 2 files changed, 2 insertions(+)

diff --git a/docs/misc/arm/early-printk.txt b/docs/misc/arm/early-printk.txt
index 41b528b..eb08821 100644
--- a/docs/misc/arm/early-printk.txt
+++ b/docs/misc/arm/early-printk.txt
@@ -41,6 +41,7 @@ the name of the machine:
   - lager: printk with SCIF0 on Renesas R-Car H2 processors
   - midway: printk with the pl011 on Calxeda Midway processors
   - omap5432: printk with UART3 on TI OMAP5432 processors
+  - rcar3: printk with SCIF2 on Renesas R-Car Gen3 processors
   - seattle: printk with pl011 for AMD Seattle processor
   - sun6i: printk with 8250 on Allwinner A31 processors
   - sun7i: printk with 8250 on Allwinner A20 processors
diff --git a/xen/arch/arm/Rules.mk b/xen/arch/arm/Rules.mk
index 569a0ba..2ae7451 100644
--- a/xen/arch/arm/Rules.mk
+++ b/xen/arch/arm/Rules.mk
@@ -36,6 +36,7 @@ EARLY_PRINTK_juno           := pl011,0x7ff80000
 EARLY_PRINTK_lager          := scif,0xe6e60000
 EARLY_PRINTK_midway         := pl011,0xfff36000
 EARLY_PRINTK_omap5432       := 8250,0x48020000,2
+EARLY_PRINTK_rcar3          := scif,0xe6e88000
 EARLY_PRINTK_seattle        := pl011,0xe1010000
 EARLY_PRINTK_sun6i          := 8250,0x01c28000,2
 EARLY_PRINTK_sun7i          := 8250,0x01c28000,2
-- 
2.7.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH V2 1/2] xen:arm64: Add SCIF UART support for earlyprintk
  2017-07-27 14:50 [PATCH V2 1/2] xen:arm64: Add SCIF UART support for earlyprintk Andrii Anisov
  2017-07-27 14:50 ` [PATCH V2 2/2] xen:arm: earlyprintk configuration for R-Car Gen3 boards Andrii Anisov
@ 2017-08-01 11:46 ` Julien Grall
  1 sibling, 0 replies; 4+ messages in thread
From: Julien Grall @ 2017-08-01 11:46 UTC (permalink / raw)
  To: Andrii Anisov, xen-devel
  Cc: Andrii Anisov, Iurii Konovalenko, sstabellini, Iurii Mykhalskyi

Hi Andrii,

On 27/07/17 15:50, Andrii Anisov wrote:
> From: Iurii Konovalenko <iurii.konovalenko@globallogic.com>
>
> Add support for a SCIF compatible UART found in Renesas R-Car Gen3 SoCs.
>
> Signed-off-by: Iurii Konovalenko <iurii.konovalenko@globallogic.com>
> Signed-off-by: Iurii Mykhalskyi <iurii.mykhalskyi@globallogic.com>
> Signed-off-by: Andrii Anisov <andrii_anisov@epam.com>

Acked-by: Julien Grall <julien.grall@arm.com>

Cheers,

-- 
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH V2 2/2] xen:arm: earlyprintk configuration for R-Car Gen3 boards
  2017-07-27 14:50 ` [PATCH V2 2/2] xen:arm: earlyprintk configuration for R-Car Gen3 boards Andrii Anisov
@ 2017-08-01 11:47   ` Julien Grall
  0 siblings, 0 replies; 4+ messages in thread
From: Julien Grall @ 2017-08-01 11:47 UTC (permalink / raw)
  To: Andrii Anisov, xen-devel
  Cc: Iurii Mykhalskyi, Iurii Konovalenko, sstabellini, Andrii Anisov

Hi Andrii,

On 27/07/17 15:50, Andrii Anisov wrote:
> From: Andrii Anisov <andrii_anisov@epam.com>
>
> Introduce an earlyprintk configuration for R-Car Gen3 SoC based development
> boards, like:
>  - Salvator-X [http://elinux.org/R-Car/Boards/Salvator-X]
>  - M3ULCB [http://elinux.org/R-Car/Boards/M3SK]
>  - H3ULCB [http://elinux.org/R-Car/Boards/H3SK]
>
> Signed-off-by: Iurii Konovalenko <iurii.konovalenko@globallogic.com>
> Signed-off-by: Iurii Mykhalskyi <iurii.mykhalskyi@globallogic.com>
> Signed-off-by: Andrii Anisov <andrii_anisov@epam.com>

Acked-by: Julien Grall <julien.grall@arm.com>

Cheers,

-- 
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-08-01 11:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-27 14:50 [PATCH V2 1/2] xen:arm64: Add SCIF UART support for earlyprintk Andrii Anisov
2017-07-27 14:50 ` [PATCH V2 2/2] xen:arm: earlyprintk configuration for R-Car Gen3 boards Andrii Anisov
2017-08-01 11:47   ` Julien Grall
2017-08-01 11:46 ` [PATCH V2 1/2] xen:arm64: Add SCIF UART support for earlyprintk Julien Grall

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).