summaryrefslogtreecommitdiff
path: root/board/xilinx
diff options
context:
space:
mode:
authorStefano Babic <sbabic@denx.de>2015-03-05 16:05:10 +0100
committerStefano Babic <sbabic@denx.de>2015-03-05 16:05:10 +0100
commit9b5b60a05cb8bba2d135439419b2030764e359bd (patch)
tree15e249ac39e9c547668327218e63a0faf54a3283 /board/xilinx
parent32df39c741788e8637cffe6633d73594b26d70fb (diff)
parent7ae8350f67eea861280a4cbd2d067777a0e87153 (diff)
downloadu-boot-imx-9b5b60a05cb8bba2d135439419b2030764e359bd.zip
u-boot-imx-9b5b60a05cb8bba2d135439419b2030764e359bd.tar.gz
u-boot-imx-9b5b60a05cb8bba2d135439419b2030764e359bd.tar.bz2
Merge branch 'master' of git://git.denx.de/u-boot
Diffstat (limited to 'board/xilinx')
-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 0000000..b07932e
--- /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 0000000..da33340
--- /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 0000000..2ab3f19
--- /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 0000000..1325bca
--- /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;
+}