summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-zynqmp
diff options
context:
space:
mode:
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