From: Amit Singh Tomar <amittomer25@gmail.com>
To: xen-devel@lists.xenproject.org
Cc: andre.przywara@arm.com, julien.grall@arm.com,
sstabellini@kernel.org, Amit Singh Tomar <amittomer25@gmail.com>
Subject: [PATCH v1] xen/arm: Add Marvell ARMADA 3700 early printk support
Date: Sun, 18 Mar 2018 14:27:12 +0530 [thread overview]
Message-ID: <1521363432-12876-1-git-send-email-amittomer25@gmail.com> (raw)
Signed-off-by: Amit Singh Tomar <amittomer25@gmail.com>
---
docs/misc/arm/early-printk.txt | 1 +
xen/arch/arm/Rules.mk | 1 +
xen/arch/arm/arm64/debug-mvebu.inc | 48 ++++++++++++++++++++++++++++++++++++++
3 files changed, 50 insertions(+)
create mode 100644 xen/arch/arm/arm64/debug-mvebu.inc
diff --git a/docs/misc/arm/early-printk.txt b/docs/misc/arm/early-printk.txt
index 20a8af8..f765f59 100644
--- a/docs/misc/arm/early-printk.txt
+++ b/docs/misc/arm/early-printk.txt
@@ -41,6 +41,7 @@ the name of the machine:
- juno: printk with pl011 on Juno platform
- lager: printk with SCIF0 on Renesas R-Car H2 processors
- 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
- rcar3: printk with SCIF2 on Renesas R-Car Gen3 processors
- seattle: printk with pl011 for AMD Seattle processor
diff --git a/xen/arch/arm/Rules.mk b/xen/arch/arm/Rules.mk
index b66c19f..f264592 100644
--- a/xen/arch/arm/Rules.mk
+++ b/xen/arch/arm/Rules.mk
@@ -36,6 +36,7 @@ EARLY_PRINTK_hikey960 := pl011,0xfff32000
EARLY_PRINTK_juno := pl011,0x7ff80000
EARLY_PRINTK_lager := scif,0xe6e60000
EARLY_PRINTK_midway := pl011,0xfff36000
+EARLY_PRINTK_mvebu := mvebu,0xd0012000
EARLY_PRINTK_omap5432 := 8250,0x48020000,2
EARLY_PRINTK_rcar3 := scif,0xe6e88000
EARLY_PRINTK_seattle := pl011,0xe1010000
diff --git a/xen/arch/arm/arm64/debug-mvebu.inc b/xen/arch/arm/arm64/debug-mvebu.inc
new file mode 100644
index 0000000..67dc44d
--- /dev/null
+++ b/xen/arch/arm/arm64/debug-mvebu.inc
@@ -0,0 +1,48 @@
+/*
+ * xen/arch/arm/arm64/debug-mvebu.inc
+ *
+ * MVEBU specific debug code
+ *
+ * Amit Singh Tomar <amittomer25@gmail.com>
+ * Copyright (C) 2018.
+ *
+ * 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/mvebu-uart.h>
+
+/*
+ * MVEBU 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, #UART_STATUS_REG] /* <- status register */
+ tst w\c, #(1 << 13) /* <- Check TXFIFO EMP bit */
+ beq 1b /* <- Wait for the UART to be ready */
+.endm
+
+/*
+ * MVEBU 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, #UART_TX_REG]
+.endm
+
+/*
+ * Local variables:
+ * mode: ASM
+ * indent-tabs-mode: nil
+ * End:
+ */
--
1.9.1
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
reply other threads:[~2018-03-18 8:57 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1521363432-12876-1-git-send-email-amittomer25@gmail.com \
--to=amittomer25@gmail.com \
--cc=andre.przywara@arm.com \
--cc=julien.grall@arm.com \
--cc=sstabellini@kernel.org \
--cc=xen-devel@lists.xenproject.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).