From: Andrii Anisov <andrii.anisov@gmail.com>
To: xen-devel@lists.xen.org
Cc: Andrii Anisov <andrii_anisov@epam.com>,
Iurii Konovalenko <iurii.konovalenko@globallogic.com>,
Iurii Mykhalskyi <iurii.mykhalskyi@globallogic.com>
Subject: [PATCH 1/2] xen:arm64: Add SCIF UART support for earlyprintk
Date: Wed, 5 Jul 2017 19:29:18 +0300 [thread overview]
Message-ID: <1499272159-18390-2-git-send-email-andrii.anisov@gmail.com> (raw)
In-Reply-To: <1499272159-18390-1-git-send-email-andrii.anisov@gmail.com>
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>
---
xen/arch/arm/arm64/debug-scif.inc | 51 +++++++++++++++++++++++++++++++++++++++
1 file changed, 51 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..1f4d657
--- /dev/null
+++ b/xen/arch/arm/arm64/debug-scif.inc
@@ -0,0 +1,51 @@
+/*
+ * 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
+ * rb: register which contains the UART base address
+ * rc: 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
+ * rb: register which contains the UART base address
+ * rt: 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
next prev parent reply other threads:[~2017-07-05 16:29 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-05 16:29 Renesas R-Car Gen3 SoCs earlyprintk support Andrii Anisov
2017-07-05 16:29 ` Andrii Anisov [this message]
2017-07-26 15:25 ` [PATCH 1/2] xen:arm64: Add SCIF UART support for earlyprintk Andrii Anisov
2017-07-26 15:33 ` Julien Grall
2017-07-26 15:39 ` Andrii Anisov
2017-07-05 16:29 ` [PATCH 2/2] xen:arm: earlyprintk configuration for R-Car Gen3 boards Andrii Anisov
2017-07-26 15:25 ` Andrii Anisov
2017-07-26 15:34 ` Julien Grall
2017-07-05 16:34 ` Renesas R-Car Gen3 SoCs earlyprintk support Julien Grall
2017-07-05 16:41 ` Andrii Anisov
2017-07-05 16:50 ` Julien Grall
2017-07-05 17:00 ` Andrii Anisov
2017-07-05 17:18 ` Julien Grall
2017-07-06 11:31 ` Andrii Anisov
2017-07-06 11:43 ` Julien Grall
2017-07-06 12:24 ` Andrii Anisov
2017-07-06 12:35 ` Julien Grall
2017-07-07 10:47 ` Andrii Anisov
2017-07-07 10:55 ` Julien Grall
2017-07-07 12:11 ` Andrii Anisov
2017-07-14 17:00 ` Andrii Anisov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1499272159-18390-2-git-send-email-andrii.anisov@gmail.com \
--to=andrii.anisov@gmail.com \
--cc=andrii_anisov@epam.com \
--cc=iurii.konovalenko@globallogic.com \
--cc=iurii.mykhalskyi@globallogic.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).