On 26.9.2016 08:12, Mike Looijmans wrote: > On 22-09-16 11:25, Michal Simek wrote: >> From: Mike Looijmans <mike.looijm...@topic.nl> >> >> The Zynq/ZynqMP boot.bin file contains a region for register >> initialization >> data. Filling in proper values in this table can reduce boot time >> (e.g. about 50ms faster on QSPI boot) and also reduce the size of >> the SPL binary. >> >> The table is a simple text file with register+data on each line. Other >> lines are simply skipped. The file can be passed to mkimage using the >> "-R" parameter. >> >> It is recommended to add reg init file to board folder. >> For example: >> CONFIG_BOOT_INIT_FILE="board/xilinx/zynqmp/xilinx_zynqmp_zcu102/reg.int >> >> Signed-off-by: Mike Looijmans <mike.looijm...@topic.nl> >> Signed-off-by: Michal Simek <michal.si...@xilinx.com> >> --- >> >> arch/arm/cpu/armv8/zynqmp/Kconfig | 7 +++++++ >> arch/arm/mach-zynq/Kconfig | 7 +++++++ >> scripts/Makefile.spl | 4 ++-- >> tools/zynqimage.c | 28 ++++++++++++++++++++++++++++ >> tools/zynqmpimage.c | 28 ++++++++++++++++++++++++++++ >> 5 files changed, 72 insertions(+), 2 deletions(-) >> >> diff --git a/arch/arm/cpu/armv8/zynqmp/Kconfig >> b/arch/arm/cpu/armv8/zynqmp/Kconfig >> index 1eedb39aa5a8..a3baae4f740c 100644 >> --- a/arch/arm/cpu/armv8/zynqmp/Kconfig >> +++ b/arch/arm/cpu/armv8/zynqmp/Kconfig >> @@ -41,6 +41,13 @@ config SYS_CONFIG_NAME >> Based on this option >> include/configs/<CONFIG_SYS_CONFIG_NAME>.h header >> will be used for board configuration. >> >> +config BOOT_INIT_FILE >> + string "boot.bin init register filename" >> + default "" >> + help >> + Add register writes to boot.bin format (max 256 pairs). >> + Expect a table of register-value pairs, e.g. "0x12345678 0x4321" >> + >> config ZYNQMP_USB >> bool "Configure ZynqMP USB" >> >> diff --git a/arch/arm/mach-zynq/Kconfig b/arch/arm/mach-zynq/Kconfig >> index a1175eea6ebb..44e16af863d7 100644 >> --- a/arch/arm/mach-zynq/Kconfig >> +++ b/arch/arm/mach-zynq/Kconfig >> @@ -44,4 +44,11 @@ config SYS_CONFIG_NAME >> config SYS_MALLOC_F_LEN >> default 0x600 >> >> +config BOOT_INIT_FILE >> + string "boot.bin init register filename" >> + default "" >> + help >> + Add register writes to boot.bin format (max 256 pairs). >> + Expect a table of register-value pairs, e.g. "0x12345678 0x4321" >> + >> endif >> diff --git a/scripts/Makefile.spl b/scripts/Makefile.spl >> index 4994fa887ba3..b12b0c27dfe9 100644 >> --- a/scripts/Makefile.spl >> +++ b/scripts/Makefile.spl >> @@ -142,10 +142,10 @@ boot.bin: $(obj)/u-boot-spl.bin FORCE >> $(call if_changed,mkimage) >> else >> ifdef CONFIG_ARCH_ZYNQ >> -MKIMAGEFLAGS_boot.bin = -T zynqimage >> +MKIMAGEFLAGS_boot.bin = -T zynqimage -R $(CONFIG_BOOT_INIT_FILE) > > This should be: > > MKIMAGEFLAGS_boot.bin = -T zynqimage -R $(srctree)/$(CONFIG_BOOT_INIT_FILE) > > Without the "$(srctree)", out-of-tree builds will fail. > >> endif >> ifdef CONFIG_ARCH_ZYNQMP >> -MKIMAGEFLAGS_boot.bin = -T zynqmpimage >> +MKIMAGEFLAGS_boot.bin = -T zynqmpimage -R $(CONFIG_BOOT_INIT_FILE) > > Same here: > MKIMAGEFLAGS_boot.bin = -T zynqmpimage -R > $(srctree)/$(CONFIG_BOOT_INIT_FILE)
Good. Will be fixed in v2. Thanks, Michal _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot