summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arch/arm/Kconfig1
-rw-r--r--board/xilinx/Kconfig41
-rw-r--r--board/xilinx/zynq/Makefile10
-rw-r--r--board/xilinx/zynqmp/Makefile10
4 files changed, 60 insertions, 2 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 5b3746c80b..3086e5cb47 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -1474,6 +1474,7 @@ source "board/toradex/colibri_pxa270/Kconfig"
source "board/vscom/baltos/Kconfig"
source "board/woodburn/Kconfig"
source "board/work-microwave/work_92105/Kconfig"
+source "board/xilinx/Kconfig"
source "board/xilinx/zynqmp/Kconfig"
source "board/zipitz2/Kconfig"
diff --git a/board/xilinx/Kconfig b/board/xilinx/Kconfig
new file mode 100644
index 0000000000..37bec5fae2
--- /dev/null
+++ b/board/xilinx/Kconfig
@@ -0,0 +1,41 @@
+# SPDX-License-Identifier: GPL-2.0
+#
+# Copyright (c) 2018, Luca Ceresoli <luca@lucaceresoli.net>
+
+if ARCH_ZYNQ || ARCH_ZYNQMP
+
+config XILINX_PS_INIT_FILE
+ string "Zynq/ZynqMP PS init file(s) location"
+ help
+ On Zynq and ZynqMP U-Boot SPL (or U-Boot proper if
+ ZYNQMP_PSU_INIT_ENABLED is set) is responsible for some
+ basic initializations, such as enabling peripherals and
+ configuring pinmuxes. The PS init file (called
+ psu_init_gpl.c on ZynqMP, ps7_init_gpl.c for Zynq-7000)
+ contains the code for such initializations.
+
+ U-Boot contains PS init files for some boards, but each of
+ them describes only one specific configuration. Users of a
+ different board, or needing a different configuration, can
+ generate custom files using the Xilinx development tools.
+
+ There are three ways to give a PS init file to U-Boot:
+
+ 1. Set this variable to the path, either relative to the
+ source tree or absolute, where the psu_init_gpl.c or
+ ps7_init_gpl.c file is located. U-Boot will build this
+ file.
+
+ 2. If you leave an empty string here, U-Boot will use
+ board/xilinx/zynq/$(CONFIG_DEFAULT_DEVICE_TREE)/ps7_init_gpl.c
+ for Zynq-7000, or
+ board/xilinx/zynqmp/$(CONFIG_DEFAULT_DEVICE_TREE)/psu_init_gpl.c
+ for ZynqMP.
+
+ 3. If the above file does not exist, U-Boot will use
+ board/xilinx/zynq/ps7_init_gpl.c for Zynq-7000, or
+ board/xilinx/zynqmp/psu_init_gpl.c for ZynqMP. This file
+ is not provided by U-Boot, you have to copy it there
+ before the build.
+
+endif
diff --git a/board/xilinx/zynq/Makefile b/board/xilinx/zynq/Makefile
index 5a76a26720..03ad5f0532 100644
--- a/board/xilinx/zynq/Makefile
+++ b/board/xilinx/zynq/Makefile
@@ -5,10 +5,18 @@
obj-y := board.o
-hw-platform-y :=$(shell echo $(CONFIG_DEFAULT_DEVICE_TREE))
+ifneq ($(CONFIG_XILINX_PS_INIT_FILE),"")
+PS_INIT_FILE := $(shell cd $(srctree); readlink -f $(CONFIG_XILINX_PS_INIT_FILE))
+init-objs := ps_init_gpl.o
+spl/board/xilinx/zynq/ps_init_gpl.o board/xilinx/zynq/ps_init_gpl.o: $(PS_INIT_FILE)
+ $(CC) $(c_flags) -I $(srctree)/$(src) -c -o $@ $^
+endif
+ifeq ($(init-objs),)
+hw-platform-y :=$(shell echo $(CONFIG_DEFAULT_DEVICE_TREE))
init-objs := $(if $(wildcard $(srctree)/$(src)/$(hw-platform-y)/ps7_init_gpl.c),\
$(hw-platform-y)/ps7_init_gpl.o)
+endif
ifeq ($(init-objs),)
ifneq ($(wildcard $(srctree)/$(src)/ps7_init_gpl.c),)
diff --git a/board/xilinx/zynqmp/Makefile b/board/xilinx/zynqmp/Makefile
index 05ccd25dce..960b81fc58 100644
--- a/board/xilinx/zynqmp/Makefile
+++ b/board/xilinx/zynqmp/Makefile
@@ -5,10 +5,18 @@
obj-y := zynqmp.o
-hw-platform-y :=$(shell echo $(CONFIG_DEFAULT_DEVICE_TREE))
+ifneq ($(CONFIG_XILINX_PS_INIT_FILE),"")
+PS_INIT_FILE := $(shell cd $(srctree); readlink -f $(CONFIG_XILINX_PS_INIT_FILE))
+init-objs := ps_init_gpl.o
+spl/board/xilinx/zynqmp/ps_init_gpl.o board/xilinx/zynqmp/ps_init_gpl.o: $(PS_INIT_FILE)
+ $(CC) $(c_flags) -I $(srctree)/$(src) -c -o $@ $^
+endif
+ifeq ($(init-objs),)
+hw-platform-y :=$(shell echo $(CONFIG_DEFAULT_DEVICE_TREE))
init-objs := $(if $(wildcard $(srctree)/$(src)/$(hw-platform-y)/psu_init_gpl.c),\
$(hw-platform-y)/psu_init_gpl.o)
+endif
ifeq ($(init-objs),)
ifneq ($(wildcard $(srctree)/$(src)/psu_init_gpl.c),)