diff options
author | 2018-07-25 16:35:38 +0200 | |
---|---|---|
committer | 2018-07-28 19:27:38 +0200 | |
commit | 822c34c301986a91a24e6525df9a13aa8be1ba9c (patch) | |
tree | 16f31a62441ef022a3cc4ba8fe2fcc674eaf5072 /boot/uboot/uboot.mk | |
parent | 86eecc46066fe01cf6c072eb4b90a71526332d7c (diff) | |
download | buildroot-822c34c301986a91a24e6525df9a13aa8be1ba9c.tar.gz buildroot-822c34c301986a91a24e6525df9a13aa8be1ba9c.tar.bz2 |
uboot: zynqmp: allow to use custom psu_init files
U-Boot SPL configures pinmuxes, clocks and other low-level devices. On
the Xilinx ZynqMP SoCs the code to do this resides in a file called
psu_init_gpl.c which is initially generated by the Xilinx development
tools. Add an option to pass these files from the outside (e.g. in the
board files).
For this to work properly, a patch to U-Boot is needed. However this
patch must be applied by each defconfig using
BR2_TARGET_UBOOT_ZYNQMP_PSU_INIT_DIR. If it were in boot/uboot/ to be
applied unconditionally, it would break the build for configs using a
U-Boot version where the patch is already applied.
Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Cc: Joel Carlson <joelsoncarl@gmail.com>
Reviewed-by: Joel Carlson <JoelsonCarl@gmail.com>
Tested-by: Joel Carlson <JoelsonCarl@gmail.com>
[Thomas: add comment about U-Boot version requirements to use this
option.]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Diffstat (limited to 'boot/uboot/uboot.mk')
-rw-r--r-- | boot/uboot/uboot.mk | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/boot/uboot/uboot.mk b/boot/uboot/uboot.mk index d9c9b72e76..04c759be34 100644 --- a/boot/uboot/uboot.mk +++ b/boot/uboot/uboot.mk @@ -304,6 +304,16 @@ define UBOOT_ZYNQMP_KCONFIG_PMUFW $(@D)/.config) endef +UBOOT_ZYNQMP_PSU_INIT = $(call qstrip,$(BR2_TARGET_UBOOT_ZYNQMP_PSU_INIT_FILE)) +UBOOT_ZYNQMP_PSU_INIT_PATH = $(shell readlink -f $(UBOOT_ZYNQMP_PSU_INIT)) + +ifneq ($(UBOOT_ZYNQMP_PSU_INIT),) +define UBOOT_ZYNQMP_KCONFIG_PSU_INIT + $(call KCONFIG_SET_OPT,CONFIG_XILINX_PS_INIT_FILE,"$(UBOOT_ZYNQMP_PSU_INIT_PATH)", \ + $(@D)/.config) +endef +endif + endif # BR2_TARGET_UBOOT_ZYNQMP define UBOOT_INSTALL_OMAP_IFT_IMAGE @@ -357,6 +367,7 @@ endif define UBOOT_KCONFIG_FIXUP_CMDS $(UBOOT_ZYNQMP_KCONFIG_PMUFW) + $(UBOOT_ZYNQMP_KCONFIG_PSU_INIT) endef ifeq ($(BR2_TARGET_UBOOT_ENVIMAGE),y) |