diff options
author | Ibai Erkiaga <ibai.erkiaga-elorza@xilinx.com> | 2019-09-27 13:37:04 +0300 |
---|---|---|
committer | Michal Simek <michal.simek@xilinx.com> | 2019-10-08 10:55:11 +0300 |
commit | 325a22dc196a8738ba8389b8a4086345ff5e98db (patch) | |
tree | d52a442afba36a118c624157a4472b4f2b8a3d94 | |
parent | 283d81acba00828366bbb4a38f62b035ba36d003 (diff) | |
download | u-boot-325a22dc196a8738ba8389b8a4086345ff5e98db.tar.xz |
arm64: zynqmp: probe firmware driver
Probe ZynqMP firmware driver on the board initialization phase and
ensure that firmware is in place to continue execution. The probing is
done on board_init so it can be used for both SPL and U-Boot proper.
Signed-off-by: Ibai Erkiaga <ibai.erkiaga-elorza@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
-rw-r--r-- | arch/arm/Kconfig | 3 | ||||
-rw-r--r-- | board/xilinx/zynqmp/zynqmp.c | 18 |
2 files changed, 9 insertions, 12 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 0c41bc3e5b..90bcc8d644 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -1057,9 +1057,12 @@ config ARCH_ZYNQMP select DM_SPI if SPI select DM_SPI_FLASH if DM_SPI select DM_USB if USB + select FIRMWARE select OF_CONTROL select SPL_BOARD_INIT if SPL select SPL_CLK if SPL + select SPL_DM_MAILBOX if SPL + select SPL_FIRMWARE if SPL select SPL_SEPARATE_BSS if SPL select SUPPORT_SPL select ZYNQMP_IPI diff --git a/board/xilinx/zynqmp/zynqmp.c b/board/xilinx/zynqmp/zynqmp.c index 8a66d3e50a..b94936474d 100644 --- a/board/xilinx/zynqmp/zynqmp.c +++ b/board/xilinx/zynqmp/zynqmp.c @@ -318,18 +318,6 @@ static char *zynqmp_get_silicon_idcode_name(void) int board_early_init_f(void) { int ret = 0; -#if !defined(CONFIG_SPL_BUILD) && defined(CONFIG_CLK_ZYNQMP) - u32 pm_api_version; - - pm_api_version = zynqmp_firmware_version(); - printf("PMUFW:\tv%d.%d\n", - pm_api_version >> ZYNQMP_PM_VERSION_MAJOR_SHIFT, - pm_api_version & ZYNQMP_PM_VERSION_MINOR_MASK); - - if (pm_api_version < ZYNQMP_PM_VERSION) - panic("PMUFW version error. Expected: v%d.%d\n", - ZYNQMP_PM_VERSION_MAJOR, ZYNQMP_PM_VERSION_MINOR); -#endif #if defined(CONFIG_ZYNQMP_PSU_INIT_ENABLED) ret = psu_init(); @@ -340,6 +328,12 @@ int board_early_init_f(void) int board_init(void) { + struct udevice *dev; + + uclass_get_device_by_name(UCLASS_FIRMWARE, "zynqmp-power", &dev); + if (!dev) + panic("PMU Firmware device not found - Enable it"); + #if defined(CONFIG_SPL_BUILD) /* Check *at build time* if the filename is an non-empty string */ if (sizeof(CONFIG_ZYNQMP_SPL_PM_CFG_OBJ_FILE) > 1) |