summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-zynqmp
diff options
context:
space:
mode:
authorMichael Tretter <m.tretter@pengutronix.de>2018-12-07 11:11:56 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2018-12-10 10:13:30 +0100
commit5ffc6f9210ffcffbd2fe494b5e8811eebad813a8 (patch)
tree792201183c7bdab3825f55f0b7c67a9f3b4e3e61 /arch/arm/mach-zynqmp
parentbe2ca38aaaac1739421588a71a6fc2c601bc7604 (diff)
downloadbarebox-5ffc6f9210ffcffbd2fe494b5e8811eebad813a8.tar.gz
barebox-5ffc6f9210ffcffbd2fe494b5e8811eebad813a8.tar.xz
ARM: zynqmp: add support for Xilinx ZCU104 board
Add support for the Xilinx Zynq Ultrascale+ MPSoC architecture (ZynqMP) and the Xilinx ZCU104 board. Barebox is booted as BL33 in EL-1 and expects that a BL2 (i.e. the FSBL) already took care of initializing the RAM. Also for debug_ll, the UART is expected to be already setup correctly. Thus, you have to add the Barebox binary to a boot image as described in "Chapter 11: Boot and Configuration" of "Zynq Ultrascale+ Device Technical Reference Manual". Signed-off-by: Michael Tretter <m.tretter@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-zynqmp')
-rw-r--r--arch/arm/mach-zynqmp/Kconfig10
-rw-r--r--arch/arm/mach-zynqmp/Makefile2
-rw-r--r--arch/arm/mach-zynqmp/include/mach/debug_ll.h31
3 files changed, 43 insertions, 0 deletions
diff --git a/arch/arm/mach-zynqmp/Kconfig b/arch/arm/mach-zynqmp/Kconfig
new file mode 100644
index 0000000000..c9dc71c9e7
--- /dev/null
+++ b/arch/arm/mach-zynqmp/Kconfig
@@ -0,0 +1,10 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+if ARCH_ZYNQMP
+
+config MACH_XILINX_ZCU104
+ bool "Xilinx Zynq UltraScale+ MPSoC ZCU104"
+ help
+ Say Y here if you are using the Xilinx Zynq UltraScale+ MPSoC ZCU104
+ evaluation board.
+
+endif
diff --git a/arch/arm/mach-zynqmp/Makefile b/arch/arm/mach-zynqmp/Makefile
new file mode 100644
index 0000000000..c601374f6c
--- /dev/null
+++ b/arch/arm/mach-zynqmp/Makefile
@@ -0,0 +1,2 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+obj- := __dummy__.o
diff --git a/arch/arm/mach-zynqmp/include/mach/debug_ll.h b/arch/arm/mach-zynqmp/include/mach/debug_ll.h
new file mode 100644
index 0000000000..67571fe2e1
--- /dev/null
+++ b/arch/arm/mach-zynqmp/include/mach/debug_ll.h
@@ -0,0 +1,31 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+#ifndef __MACH_DEBUG_LL_H__
+#define __MACH_DEBUG_LL_H__
+
+#include <io.h>
+
+#define ZYNQMP_UART0_BASE 0xFF000000
+#define ZYNQMP_UART1_BASE 0xFF010000
+#define ZYNQMP_UART_BASE ZYNQMP_UART0_BASE
+#define ZYNQMP_DEBUG_LL_UART_BASE ZYNQMP_UART_BASE
+
+#define ZYNQMP_UART_RXTXFIFO 0x30
+#define ZYNQMP_UART_CHANNEL_STS 0x2C
+
+#define ZYNQMP_UART_STS_TFUL (1 << 4)
+#define ZYNQMP_UART_TXDIS (1 << 5)
+
+static inline void PUTC_LL(int c)
+{
+ void __iomem *base = (void __iomem *)ZYNQMP_DEBUG_LL_UART_BASE;
+
+ if (readl(base) & ZYNQMP_UART_TXDIS)
+ return;
+
+ while ((readl(base + ZYNQMP_UART_CHANNEL_STS) & ZYNQMP_UART_STS_TFUL) != 0)
+ ;
+
+ writel(c, base + 0x30);
+}
+
+#endif