ARM: zynq: include ps7_init_gpl.c/h of Zed, MicroZed, ZC702, ZC706
Subsystems (3)
v3 cover ARM: zynq: include ps7_init_gpl.c/h of Zed, MicroZed, ZC702, ZC706
Masahiro Yamada (2):
ARM: zynq: add separate configuration for ZC702 and ZC706
ARM: zynq: add default ps7_init_gpl.c/h for Zed, MicroZed, ZC70x
arch/arm/mach-zynq/Kconfig | 25 +- arch/arm/mach-zynq/spl.c | 2 +- board/xilinx/zynq/.gitignore | 2 +- board/xilinx/zynq/Makefile | 39 +- .../zynq/MicroZed_hw_platform/ps7_init_gpl.c | 12978 ++++++++++++++++++ .../zynq/MicroZed_hw_platform/ps7_init_gpl.h | 130 + board/xilinx/zynq/ZC702_hw_platform/ps7_init_gpl.c | 13311 +++++++++++++++++++ board/xilinx/zynq/ZC702_hw_platform/ps7_init_gpl.h | 130 + board/xilinx/zynq/ZC706_hw_platform/ps7_init_gpl.c | 13218 ++++++++++++++++++ board/xilinx/zynq/ZC706_hw_platform/ps7_init_gpl.h | 130 + board/xilinx/zynq/custom_hw_platform/.gitignore | 1 + board/xilinx/zynq/zed_hw_platform/ps7_init_gpl.c | 12876 ++++++++++++++++++ board/xilinx/zynq/zed_hw_platform/ps7_init_gpl.h | 130 + configs/zynq_zc702_defconfig | 10 + configs/zynq_zc706_defconfig | 10 + doc/README.zynq | 15 +- 16 files changed, 52989 insertions(+), 18 deletions(-) create mode 100644 board/xilinx/zynq/MicroZed_hw_platform/ps7_init_gpl.c create mode 100644 board/xilinx/zynq/MicroZed_hw_platform/ps7_init_gpl.h create mode 100644 board/xilinx/zynq/ZC702_hw_platform/ps7_init_gpl.c create mode 100644 board/xilinx/zynq/ZC702_hw_platform/ps7_init_gpl.h create mode 100644 board/xilinx/zynq/ZC706_hw_platform/ps7_init_gpl.c create mode 100644 board/xilinx/zynq/ZC706_hw_platform/ps7_init_gpl.h create mode 100644 board/xilinx/zynq/custom_hw_platform/.gitignore create mode 100644 board/xilinx/zynq/zed_hw_platform/ps7_init_gpl.c create mode 100644 board/xilinx/zynq/zed_hw_platform/ps7_init_gpl.h create mode 100644 configs/zynq_zc702_defconfig create mode 100644 configs/zynq_zc706_defconfig
Signature · 1 line
1.9.1
PATCH v3 1/2 ARM: zynq: add separate configuration for ZC702 and ZC706
Prior to this commit, ZC702 and ZC706 shared the same configuration and were built as follows:
ZC702: make zynq_zc70x_defconfig && make
ZC706: make zynq_zc70x_defconfig && make DEVICE_TREE=zynq-zc706
This commit introduces separate configuration for them, which makes the next commit much easier.
Going forward, the recommended build commands are:
ZC702: make zynq_zc702_defconfig && make
ZC706: make zynq_zc706_defconfig && make
Although the old work flow is still supported, CONFIG_TARGET_ZC70X has been marked as deprecated. If used, the warning message is shown to prompt users to switch to the new scheme.
---
Changes in v3:
- Keep the current workflow (configs/zynq_zc70x_defconfig and CONFIG_TARGET_ZYNQ_ZC70X can be used as they are.)
Changes in v2:
- Newly added
arch/arm/mach-zynq/Kconfig | 14 ++++++++++++-- board/xilinx/zynq/Makefile | 10 ++++++++++ configs/zynq_zc702_defconfig | 10 ++++++++++ configs/zynq_zc706_defconfig | 10 ++++++++++ doc/README.zynq | 15 ++++----------- 5 files changed, 46 insertions(+), 13 deletions(-) create mode 100644 configs/zynq_zc702_defconfig create mode 100644 configs/zynq_zc706_defconfig
arch/arm/mach-zynq/Kconfig +12 -2
@@ -14,7 +14,16 @@ config TARGET_ZYNQ_PICOZED bool "Zynq PicoZed" config TARGET_ZYNQ_ZC70X - bool "Zynq ZC702/ZC706 Board" + bool "Zynq ZC702/ZC706 Board (deprecated)" + help + This option is deprecated. Use TARGET_ZYNQ_ZC702 + or TARGET_ZYNQ_706. + +config TARGET_ZYNQ_ZC702 + bool "Zynq ZC702 Board" + +config TARGET_ZYNQ_ZC706 + bool "Zynq ZC706 Board" config TARGET_ZYNQ_ZC770 bool "Zynq ZC770 Board"
@@ -37,7 +46,8 @@ config SYS_CONFIG_NAME default "zynq_zed" if TARGET_ZYNQ_ZED default "zynq_microzed" if TARGET_ZYNQ_MICROZED default "zynq_picozed" if TARGET_ZYNQ_PICOZED - default "zynq_zc70x" if TARGET_ZYNQ_ZC70X + default "zynq_zc70x" if TARGET_ZYNQ_ZC702 || TARGET_ZYNQ_ZC706 \ + || TARGET_ZYNQ_ZC70X default "zynq_zc770" if TARGET_ZYNQ_ZC770 default "zynq_zybo" if TARGET_ZYNQ_ZYBO
board/xilinx/zynq/Makefile +10 -0
@@ -13,3 +13,13 @@ obj-$(CONFIG_SPL_BUILD) += \ # Suppress "warning: function declaration isn't a prototype" CFLAGS_REMOVE_ps7_init_gpl.o := -Wstrict-prototypes + +# Warn if CONFIG_TARGET_ZYNQ_ZC70X is enabled +ifeq ($(CONFIG_TARGET_ZYNQ_ZC70X),y) +ifeq ($(CONFIG_SPL_BUILD),y) +$(warning CONFIG_TARGET_ZYNQ_ZC70X is deprecated.) +$(warning Enable CONFIG_TARGET_ZYNQ_ZC702 or CONFIG_TARGET_ZYNQ_706 instead.) +$(warning "make zynq_zc70x_defconfig" is also deprecated.) +$(warning Use "make zynq_zc702_defconfig" or "make zynq_zc706_defconfig".) +endif +endif
configs/zynq_zc702_defconfig new file +10 -0
@@ -0,0 +1,10 @@ +CONFIG_ARM=y +CONFIG_ARCH_ZYNQ=y +CONFIG_TARGET_ZYNQ_ZC702=y +CONFIG_DEFAULT_DEVICE_TREE="zynq-zc702" +# CONFIG_SYS_MALLOC_F is not set +CONFIG_SPL=y +CONFIG_FIT=y +CONFIG_FIT_VERBOSE=y +CONFIG_FIT_SIGNATURE=y +CONFIG_OF_CONTROL=y
configs/zynq_zc706_defconfig new file +10 -0
@@ -0,0 +1,10 @@ +CONFIG_ARM=y +CONFIG_ARCH_ZYNQ=y +CONFIG_TARGET_ZYNQ_ZC706=y +CONFIG_DEFAULT_DEVICE_TREE="zynq-zc706" +# CONFIG_SYS_MALLOC_F is not set +CONFIG_SPL=y +CONFIG_FIT=y +CONFIG_FIT_VERBOSE=y +CONFIG_FIT_SIGNATURE=y +CONFIG_OF_CONTROL=y
doc/README.zynq +4 -11
@@ -17,9 +17,8 @@ Xilinx Zynq-7000 All Programmable SoCs enable extensive system level differentiation, integration, and flexibility through hardware, software, and I/O programmability. -* zc70x - - zc702 (single qspi, gem0, mmc) [1] - - zc706 (dual parallel qspi, gem0, mmc) [2] +* zc702 (single qspi, gem0, mmc) [1] +* zc706 (dual parallel qspi, gem0, mmc) [2] * zed (single qspi, gem0, mmc) [3] * microzed (single qspi, gem0, mmc) [4] * zc770
@@ -30,16 +29,10 @@ and I/O programmability. 3. Building - # Configure for zc70x board - $ make zynq_zc70x_config - Configuring for zynq_zc70x board... - - # Building default dts for zc702 board + ex. configure and build for zc702 board + $ make zynq_zc702_config $ make - # Building specified dts for zc706 board - $ make DEVICE_TREE=zynq-zc706 - 4. Bootmode Zynq has a facility to read the bootmode from the slcr bootmode register
Signature · 1 line
1.9.1
PATCH v3 1/2 ARM: zynq: add separate configuration for ZC702 and ZC706
Hi Masahiro-san,
Quoted 14 lines · Masahiro Yamada
Prior to this commit, ZC702 and ZC706 shared the same configuration and were built as follows:
ZC702: make
zynq_zc70x_defconfig&& make
ZC706: makezynq_zc70x_defconfig&& make DEVICE_TREE=zynq-zc706This commit introduces separate configuration for them, which makes the next commit much easier.
Going forward, the recommended build commands are:
ZC702: make
zynq_zc702_defconfig&& make
ZC706: makezynq_zc706_defconfig&& make
Quoted 6 lines
Although the old work flow is still supported,
CONFIG_TARGET_ZC70Xhas been marked as deprecated. If used, the warning message is shown to prompt users to switch to the new scheme.Signed-off-by Masahiro Yamada <[email protected]>---
PATCH v3 2/2 ARM: zynq: add default ps7_init_gpl.c/h for Zed, MicroZed, ZC70x
In reply to Masahiro YamadaDue to licensing issues, the files ps7_init.c/h are not able to be distributed with U-Boot source code. Recent Xilinx tools also provide the GPL variants (ps7_init_gpl.c/h), compatible with U-Boot license.
Prior to this commit, we had to copy ps7_init files into board/xilinx/zynq/ before the compile.
To be more user-friendly, let's include ps7_init_gpl.c/h for Zedboard, MicroZed, ZC702, ZC706.
These init code have been taken from the hwplatform_templates directory of Xilinx SDK 2014.4.
You can still use customized ps7_init_gpl.c/h by enabling CONFIG_ZYNQ_CUSTOM_INIT. The recommended directory for storing them is now board/xilinx/zynq/custom_hw_platform, but board/xilinx/zynq is still supported for backward compatibility. The latter emits a warning message to prompt users to gradually switch to the new directory.
---
Changes in v3:
- Continue supporting board/xilinx/zynq for backward compatibility.
- Warn if ps7_init_gpl.[ch] are added to the old directory.
Changes in v2:
- Drop legacy ps7_init.c/h support
arch/arm/mach-zynq/Kconfig | 11 + arch/arm/mach-zynq/spl.c | 2 +- board/xilinx/zynq/.gitignore | 2 +- board/xilinx/zynq/Makefile | 29 +- .../zynq/MicroZed_hw_platform/ps7_init_gpl.c | 12978 ++++++++++++++++++ .../zynq/MicroZed_hw_platform/ps7_init_gpl.h | 130 + board/xilinx/zynq/ZC702_hw_platform/ps7_init_gpl.c | 13311 +++++++++++++++++++ board/xilinx/zynq/ZC702_hw_platform/ps7_init_gpl.h | 130 + board/xilinx/zynq/ZC706_hw_platform/ps7_init_gpl.c | 13218 ++++++++++++++++++ board/xilinx/zynq/ZC706_hw_platform/ps7_init_gpl.h | 130 + board/xilinx/zynq/custom_hw_platform/.gitignore | 1 + board/xilinx/zynq/zed_hw_platform/ps7_init_gpl.c | 12876 ++++++++++++++++++ board/xilinx/zynq/zed_hw_platform/ps7_init_gpl.h | 130 + 13 files changed, 52943 insertions(+), 5 deletions(-) create mode 100644 board/xilinx/zynq/MicroZed_hw_platform/ps7_init_gpl.c create mode 100644 board/xilinx/zynq/MicroZed_hw_platform/ps7_init_gpl.h create mode 100644 board/xilinx/zynq/ZC702_hw_platform/ps7_init_gpl.c create mode 100644 board/xilinx/zynq/ZC702_hw_platform/ps7_init_gpl.h create mode 100644 board/xilinx/zynq/ZC706_hw_platform/ps7_init_gpl.c create mode 100644 board/xilinx/zynq/ZC706_hw_platform/ps7_init_gpl.h create mode 100644 board/xilinx/zynq/custom_hw_platform/.gitignore create mode 100644 board/xilinx/zynq/zed_hw_platform/ps7_init_gpl.c create mode 100644 board/xilinx/zynq/zed_hw_platform/ps7_init_gpl.h
arch/arm/mach-zynq/Kconfig +11 -0
@@ -1,5 +1,13 @@ if ARCH_ZYNQ +config ZYNQ_CUSTOM_INIT + bool "Use custom ps7_init provided by Xilinx tool" + help + U-Boot includes ps7_init_gpl.[ch] for some Zynq board variants. + If you want to override them with customized ones + or ps7_init code for your board is missing, please say Y here + and add ones into board/xilinx/zynq/custom_hw_platform/ directory. + choice prompt "Xilinx Zynq board select" optional
@@ -15,6 +23,7 @@ config TARGET_ZYNQ_PICOZED config TARGET_ZYNQ_ZC70X bool "Zynq ZC702/ZC706 Board (deprecated)" + select ZYNQ_CUSTOM_INIT help This option is deprecated. Use TARGET_ZYNQ_ZC702 or TARGET_ZYNQ_706.
@@ -27,9 +36,11 @@ config TARGET_ZYNQ_ZC706 config TARGET_ZYNQ_ZC770 bool "Zynq ZC770 Board" + select ZYNQ_CUSTOM_INIT config TARGET_ZYNQ_ZYBO bool "Zynq Zybo Board" + select ZYNQ_CUSTOM_INIT endchoice
arch/arm/mach-zynq/spl.c +1 -1
@@ -85,6 +85,6 @@ __weak void ps7_init(void) {/* * This function is overridden by the one in -* board/xilinx/zynq/ps7_init_gpl.c, if it exists. +* board/xilinx/zynq/(platform)/ps7_init_gpl.c, if it exists. */ }
board/xilinx/zynq/.gitignore +1 -1
@@ -1 +1 @@ -ps7_init_gpl.[ch] +/ps7_init_gpl.[ch]
board/xilinx/zynq/Makefile +26 -3
@@ -7,13 +7,36 @@ obj-y := board.o -# Please copy ps7_init_gpl.c/h from hw project to this directory -obj-$(CONFIG_SPL_BUILD) += \ - $(if $(wildcard $(srctree)/$(src)/ps7_init_gpl.c), ps7_init_gpl.o) +# Copied from Xilinx SDK 2014.4 +hw-platform-$(CONFIG_TARGET_ZYNQ_ZED) := zed_hw_platform +hw-platform-$(CONFIG_TARGET_ZYNQ_MICROZED) := MicroZed_hw_platform +hw-platform-$(CONFIG_TARGET_ZYNQ_ZC702) := ZC702_hw_platform +hw-platform-$(CONFIG_TARGET_ZYNQ_ZC706) := ZC706_hw_platform +# If you want to use customized ps7_init_gpl.c/h, +# enable CONFIG_ZYNQ_CUSTOM_INIT and put them into custom_hw_platform/. +# This line must be placed at the bottom of the list because +# it takes precedence over the default ones. +hw-platform-$(CONFIG_ZYNQ_CUSTOM_INIT) := custom_hw_platform + +init-objs := $(if $(wildcard $(srctree)/$(src)/$(hw-platform-y)/ps7_init_gpl.c),\ + $(hw-platform-y)/ps7_init_gpl.o) + +ifeq ($(init-objs),) +ifneq ($(wildcard $(srctree)/$(src)/ps7_init_gpl.c),) +init-objs := ps7_init_gpl.o +$(if $(CONFIG_SPL_BUILD),\ +$(warning Put custom ps7_init_gpl.c/h to board/xilinx/zynq/custome_hw_platform/)) +endif +endif + +obj-$(CONFIG_SPL_BUILD) += $(init-objs) # Suppress "warning: function declaration isn't a prototype" CFLAGS_REMOVE_ps7_init_gpl.o := -Wstrict-prototypes +# To include xil_io.h +CFLAGS_ps7_init_gpl.o := -I$(srctree)/$(src) + # Warn if CONFIG_TARGET_ZYNQ_ZC70X is enabled ifeq ($(CONFIG_TARGET_ZYNQ_ZC70X),y) ifeq ($(CONFIG_SPL_BUILD),y)
board/xilinx/zynq/MicroZed_hw_platform/ps7_init_gpl.c new file +12978 -0
2,921 lines not on this page · raw message
board/xilinx/zynq/MicroZed_hw_platform/ps7_init_gpl.h new file +130 -0
130 lines not on this page · raw message
board/xilinx/zynq/ZC702_hw_platform/ps7_init_gpl.c new file +13311 -0
13,311 lines not on this page · raw message
board/xilinx/zynq/ZC702_hw_platform/ps7_init_gpl.h new file +130 -0
130 lines not on this page · raw message
board/xilinx/zynq/ZC706_hw_platform/ps7_init_gpl.c new file +13218 -0
13,218 lines not on this page · raw message
board/xilinx/zynq/ZC706_hw_platform/ps7_init_gpl.h new file +130 -0
130 lines not on this page · raw message
board/xilinx/zynq/custom_hw_platform/.gitignore new file +1 -0
Lines of this file are not shown. View the raw message.
board/xilinx/zynq/zed_hw_platform/ps7_init_gpl.c new file +12876 -0
12,876 lines not on this page · raw message
board/xilinx/zynq/zed_hw_platform/ps7_init_gpl.h new file +130 -0
130 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
1.9.1
Part of the diff is not shown here. View the raw message.
PATCH v3 2/2 ARM: zynq: add default ps7_init_gpl.c/h for Zed, MicroZed, ZC70x
Hi Masahiro-san
Quoted 21 lines · Masahiro Yamada
Due to licensing issues, the files ps7_init.c/h are not able to be distributed with U-Boot source code. Recent Xilinx tools also provide the GPL variants (ps7_init_gpl.c/h), compatible with U-Boot license.
Prior to this commit, we had to copy
ps7_initfiles into board/xilinx/zynq/ before the compile.To be more user-friendly, let's include ps7_init_gpl.c/h for Zedboard, MicroZed, ZC702, ZC706.
These init code have been taken from the
hwplatform_templatesdirectory of Xilinx SDK 2014.4.You can still use customized ps7_init_gpl.c/h by enabling
CONFIG_ZYNQ_CUSTOM_INIT. The recommended directory for storing them is now board/xilinx/zynq/custom_hw_platform, but board/xilinx/zynq is still supported for backward compatibility. The latter emits a warning message to prompt users to gradually switch to the new directory.
Quoted 3 lines
Signed-off-by Masahiro Yamada <[email protected]>Acked-by S?ren Brinkmann <[email protected]>---
v3 cover ARM: zynq: include ps7_init_gpl.c/h of Zed, MicroZed, ZC702, ZC706
In reply to Masahiro YamadaQuoted 25 lines · Masahiro Yamada
Masahiro Yamada (2):
ARM: zynq: add separate configuration for ZC702 and ZC706
ARM: zynq: add default ps7_init_gpl.c/h for Zed, MicroZed, ZC70xarch/arm/mach-zynq/Kconfig | 25 +- arch/arm/mach-zynq/spl.c | 2 +- board/xilinx/zynq/.gitignore | 2 +- board/xilinx/zynq/Makefile | 39 +- .../zynq/MicroZed_hw_platform/ps7_init_gpl.c | 12978 ++++++++++++++++++ .../zynq/MicroZed_hw_platform/ps7_init_gpl.h | 130 + board/xilinx/zynq/ZC702_hw_platform/ps7_init_gpl.c | 13311 +++++++++++++++++++ board/xilinx/zynq/ZC702_hw_platform/ps7_init_gpl.h | 130 + board/xilinx/zynq/ZC706_hw_platform/ps7_init_gpl.c | 13218 ++++++++++++++++++ board/xilinx/zynq/ZC706_hw_platform/ps7_init_gpl.h | 130 + board/xilinx/zynq/custom_hw_platform/.gitignore | 1 + board/xilinx/zynq/zed_hw_platform/ps7_init_gpl.c | 12876 ++++++++++++++++++ board/xilinx/zynq/zed_hw_platform/ps7_init_gpl.h | 130 + configs/zynq_zc702_defconfig | 10 + configs/zynq_zc706_defconfig | 10 + doc/README.zynq | 15 +- 16 files changed, 52989 insertions(+), 18 deletions(-) create mode 100644 board/xilinx/zynq/MicroZed_hw_platform/ps7_init_gpl.c create mode 100644 board/xilinx/zynq/MicroZed_hw_platform/ps7_init_gpl.h create mode 100644 board/xilinx/zynq/ZC702_hw_platform/ps7_init_gpl.c
Quoted 9 lines
create mode 100644 board/xilinx/zynq/ZC702_hw_platform/ps7_init_gpl.h create mode 100644 board/xilinx/zynq/ZC706_hw_platform/ps7_init_gpl.c create mode 100644 board/xilinx/zynq/ZC706_hw_platform/ps7_init_gpl.h create mode 100644 board/xilinx/zynq/custom_hw_platform/.gitignore create mode 100644 board/xilinx/zynq/zed_hw_platform/ps7_init_gpl.c create mode 100644 board/xilinx/zynq/zed_hw_platform/ps7_init_gpl.h create mode 100644 configs/zynq_zc702_defconfig create mode 100644 configs/zynq_zc706_defconfig
Applied both.
Thanks,
Michal