summaryrefslogtreecommitdiffstats
path: root/board
diff options
context:
space:
mode:
authorMichal Simek <michal.simek@xilinx.com>2015-01-15 10:01:51 +0100
committerMichal Simek <michal.simek@xilinx.com>2015-03-02 18:41:54 +0100
commit84c7204bd18a0051a353c7a6f65a5666e1af9501 (patch)
treef69f35c2a593be6a696cfbbdd38f537b12f65a9c /board
parent1606b34aa50804227806971dbb6b82ea0bf81f55 (diff)
downloadu-boot-84c7204bd18a0051a353c7a6f65a5666e1af9501.tar.gz
u-boot-84c7204bd18a0051a353c7a6f65a5666e1af9501.tar.xz
u-boot-84c7204bd18a0051a353c7a6f65a5666e1af9501.zip
arm64: Add Xilinx ZynqMP support
Add basic Xilinx ZynqMP arm64 support. Serial and SD is supported. It supports emulation platfrom ep108 and QEMU. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'board')
-rw-r--r--board/xilinx/zynqmp/Kconfig15
-rw-r--r--board/xilinx/zynqmp/MAINTAINERS6
-rw-r--r--board/xilinx/zynqmp/Makefile8
-rw-r--r--board/xilinx/zynqmp/zynqmp.c90
4 files changed, 119 insertions, 0 deletions
diff --git a/board/xilinx/zynqmp/Kconfig b/board/xilinx/zynqmp/Kconfig
new file mode 100644
index 0000000000..b07932e805
--- /dev/null
+++ b/board/xilinx/zynqmp/Kconfig
@@ -0,0 +1,15 @@
+if TARGET_XILINX_ZYNQMP
+
+config SYS_BOARD
+ default "zynqmp"
+
+config SYS_VENDOR
+ default "xilinx"
+
+config SYS_SOC
+ default "zynqmp"
+
+config SYS_CONFIG_NAME
+ default "xilinx_zynqmp"
+
+endif
diff --git a/board/xilinx/zynqmp/MAINTAINERS b/board/xilinx/zynqmp/MAINTAINERS
new file mode 100644
index 0000000000..da33340459
--- /dev/null
+++ b/board/xilinx/zynqmp/MAINTAINERS
@@ -0,0 +1,6 @@
+XILINX_ZYNQMP BOARD
+M: Michal Simek <michal.simek@xilinx.com>
+S: Maintained
+F: board/xilinx/zynqmp/
+F: include/configs/xilinx_zynqmp.h
+F: configs/xilinx_zynqmp_defconfig
diff --git a/board/xilinx/zynqmp/Makefile b/board/xilinx/zynqmp/Makefile
new file mode 100644
index 0000000000..2ab3f190ac
--- /dev/null
+++ b/board/xilinx/zynqmp/Makefile
@@ -0,0 +1,8 @@
+#
+# (C) Copyright 2014 - 2015 Xilinx, Inc.
+# Michal Simek <michal.simek@xilinx.com>
+#
+# SPDX-License-Identifier: GPL-2.0+
+#
+
+obj-y := zynqmp.o
diff --git a/board/xilinx/zynqmp/zynqmp.c b/board/xilinx/zynqmp/zynqmp.c
new file mode 100644
index 0000000000..1325bca5e5
--- /dev/null
+++ b/board/xilinx/zynqmp/zynqmp.c
@@ -0,0 +1,90 @@
+/*
+ * (C) Copyright 2014 - 2015 Xilinx, Inc.
+ * Michal Simek <michal.simek@xilinx.com>
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+#include <common.h>
+#include <netdev.h>
+#include <asm/arch/hardware.h>
+#include <asm/arch/sys_proto.h>
+#include <asm/io.h>
+
+DECLARE_GLOBAL_DATA_PTR;
+
+int board_init(void)
+{
+ return 0;
+}
+
+int board_early_init_r(void)
+{
+ u32 val;
+
+ val = readl(&crlapb_base->timestamp_ref_ctrl);
+ val |= ZYNQMP_CRL_APB_TIMESTAMP_REF_CTRL_CLKACT;
+ writel(val, &crlapb_base->timestamp_ref_ctrl);
+
+ /* Program freq register in System counter and enable system counter */
+ writel(gd->cpu_clk, &iou_scntr->base_frequency_id_register);
+ writel(ZYNQMP_IOU_SCNTR_COUNTER_CONTROL_REGISTER_HDBG |
+ ZYNQMP_IOU_SCNTR_COUNTER_CONTROL_REGISTER_EN,
+ &iou_scntr->counter_control_register);
+
+ return 0;
+}
+
+int dram_init(void)
+{
+ gd->ram_size = CONFIG_SYS_SDRAM_SIZE;
+
+ return 0;
+}
+
+int timer_init(void)
+{
+ return 0;
+}
+
+void reset_cpu(ulong addr)
+{
+}
+
+#ifdef CONFIG_CMD_MMC
+int board_mmc_init(bd_t *bd)
+{
+ int ret = 0;
+
+#if defined(CONFIG_ZYNQ_SDHCI)
+# if defined(CONFIG_ZYNQ_SDHCI0)
+ ret = zynq_sdhci_init(ZYNQ_SDHCI_BASEADDR0);
+# endif
+# if defined(CONFIG_ZYNQ_SDHCI1)
+ ret |= zynq_sdhci_init(ZYNQ_SDHCI_BASEADDR1);
+# endif
+#endif
+
+ return ret;
+}
+#endif
+
+int board_late_init(void)
+{
+ u32 reg = 0;
+ u8 bootmode;
+
+ reg = readl(&crlapb_base->boot_mode);
+ bootmode = reg & BOOT_MODES_MASK;
+
+ switch (bootmode) {
+ case SD_MODE:
+ setenv("modeboot", "sdboot");
+ break;
+ default:
+ printf("Invalid Boot Mode:0x%x\n", bootmode);
+ break;
+ }
+
+ return 0;
+}