mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-09-30 14:01:57 -09:00
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>
This commit is contained in:
committed by
Thomas Petazzoni
parent
86eecc4606
commit
822c34c301
@@ -397,6 +397,33 @@ config BR2_TARGET_UBOOT_ZYNQMP_PMUFW
|
||||
|
||||
This feature requires U-Boot >= 2018.07.
|
||||
|
||||
config BR2_TARGET_UBOOT_ZYNQMP_PSU_INIT_FILE
|
||||
string "Custom psu_init_gpl file"
|
||||
depends on BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG
|
||||
help
|
||||
On ZynqMP the booloader is responsible for some basic
|
||||
initializations, such as enabling peripherals and
|
||||
configuring pinmuxes. The psu_init_gpl.c file (and,
|
||||
optionally, psu_init_gpl.h) contains the code for such
|
||||
initializations.
|
||||
|
||||
Although U-Boot contains psu_init_gpl.c files for some
|
||||
boards, 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.
|
||||
|
||||
Set this variable to the path to your psu_init_gpl.c file
|
||||
(e.g. "board/myboard/psu_init_gpl.c"). psu_init_gpl.h, if
|
||||
needed, should be in the same directory. U-Boot will build
|
||||
and link the user-provided file instead of the built-in one.
|
||||
|
||||
Leave empty to use the files provided by U-Boot.
|
||||
|
||||
This feature requires commit
|
||||
6da4f67ad09cd8b311d77b2b04e557b7ef65b56c from upstream
|
||||
U-Boot, available from versions after 2018.07.
|
||||
|
||||
endif
|
||||
|
||||
config BR2_TARGET_UBOOT_ALTERA_SOCFPGA_IMAGE_CRC
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user