ARM: zynq: Simplify zynq configuration
Subsystems (3)
PATCH 1/1 ARM: zynq: Simplify zynq configuration
Extending Kconfig for adding new platform is a lot of work for nothing. Setting SYS_CONFIG_NAME directly in Kconfig and remove all dependencies on TARGET_ZYNQ_* options including SPL. As a side-effect it also remove custom init folder for ps7_init_gpl.* files. Folder is choosed based on device-tree file.
---
arch/arm/mach-zynq/Kconfig | 48 +++-------------------
board/xilinx/zynq/Makefile | 12 +-----
board/xilinx/zynq/custom_hw_platform/.gitignore | 1 -
.../ps7_init_gpl.c | 0
.../ps7_init_gpl.h | 0
.../ps7_init_gpl.c | 0
.../ps7_init_gpl.h | 0
.../ps7_init_gpl.c | 0
.../ps7_init_gpl.h | 0
.../{zed_hw_platform => zynq-zed}/ps7_init_gpl.c | 0
.../{zed_hw_platform => zynq-zed}/ps7_init_gpl.h | 0
.../{zybo_hw_platform => zynq-zybo}/ps7_init_gpl.c | 0
.../{zybo_hw_platform => zynq-zybo}/ps7_init_gpl.h | 0
configs/zynq_microzed_defconfig | 2 +-
configs/zynq_picozed_defconfig | 2 +-
configs/zynq_zc702_defconfig | 1 +
configs/zynq_zc706_defconfig | 2 +-
configs/zynq_zc770_xm010_defconfig | 2 +-
configs/zynq_zc770_xm011_defconfig | 2 +-
configs/zynq_zc770_xm012_defconfig | 2 +-
configs/zynq_zc770_xm013_defconfig | 2 +-
configs/zynq_zed_defconfig | 2 +-
configs/zynq_zybo_defconfig | 2 +-
23 files changed, 17 insertions(+), 63 deletions(-)
delete mode 100644 board/xilinx/zynq/custom_hw_platform/.gitignore
rename board/xilinx/zynq/{MicroZed_hw_platform => zynq-microzed}/ps7_init_gpl.c (100%)
rename board/xilinx/zynq/{MicroZed_hw_platform => zynq-microzed}/ps7_init_gpl.h (100%)
rename board/xilinx/zynq/{ZC702_hw_platform => zynq-zc702}/ps7_init_gpl.c (100%)
rename board/xilinx/zynq/{ZC702_hw_platform => zynq-zc702}/ps7_init_gpl.h (100%)
rename board/xilinx/zynq/{ZC706_hw_platform => zynq-zc706}/ps7_init_gpl.c (100%)
rename board/xilinx/zynq/{ZC706_hw_platform => zynq-zc706}/ps7_init_gpl.h (100%)
rename board/xilinx/zynq/{zed_hw_platform => zynq-zed}/ps7_init_gpl.c (100%)
rename board/xilinx/zynq/{zed_hw_platform => zynq-zed}/ps7_init_gpl.h (100%)
rename board/xilinx/zynq/{zybo_hw_platform => zynq-zybo}/ps7_init_gpl.c (100%)
rename board/xilinx/zynq/{zybo_hw_platform => zynq-zybo}/ps7_init_gpl.h (100%)arch/arm/mach-zynq/Kconfig +6 -42
@@ -1,41 +1,5 @@ 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" - default TARGET_ZYNQ_ZC702 - -config TARGET_ZYNQ_ZED - bool "Zynq ZedBoard" - -config TARGET_ZYNQ_MICROZED - bool "Zynq MicroZed" - -config TARGET_ZYNQ_PICOZED - bool "Zynq PicoZed" - -config TARGET_ZYNQ_ZC702 - bool "Zynq ZC702 Board" - -config TARGET_ZYNQ_ZC706 - bool "Zynq ZC706 Board" - -config TARGET_ZYNQ_ZC770 - bool "Zynq ZC770 Board" - select ZYNQ_CUSTOM_INIT - -config TARGET_ZYNQ_ZYBO - bool "Zynq Zybo Board" - -endchoice - config SYS_BOARD default "zynq"
@@ -46,11 +10,11 @@ config SYS_SOC default "zynq" 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_ZC702 || TARGET_ZYNQ_ZC706 - default "zynq_zc770" if TARGET_ZYNQ_ZC770 - default "zynq_zybo" if TARGET_ZYNQ_ZYBO + string "Board configuration name" + default "zynq-common" + help + This option contains information about board configuration name. + Based on this option include/configs/<CONFIG_SYS_CONFIG_NAME>.h header + will be used for board configuration. endif
board/xilinx/zynq/Makefile +1 -11
@@ -7,17 +7,7 @@ obj-y := board.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 -hw-platform-$(CONFIG_TARGET_ZYNQ_ZYBO) := zybo_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 +hw-platform-y :=$(shell echo $(CONFIG_DEFAULT_DEVICE_TREE)) init-objs := $(if $(wildcard $(srctree)/$(src)/$(hw-platform-y)/ps7_init_gpl.c),\ $(hw-platform-y)/ps7_init_gpl.o)
board/xilinx/zynq/custom_hw_platform/.gitignore deleted +0 -1
@@ -1 +0,0 @@ -ps7_init_gpl.[ch]
board/xilinx/zynq/zynq-microzed/ps7_init_gpl.c renamed from board/xilinx/zynq/MicroZed_hw_platform/ps7_init_gpl.c +0 -0
board/xilinx/zynq/zynq-microzed/ps7_init_gpl.h renamed from board/xilinx/zynq/MicroZed_hw_platform/ps7_init_gpl.h +0 -0
board/xilinx/zynq/zynq-zc702/ps7_init_gpl.c renamed from board/xilinx/zynq/ZC702_hw_platform/ps7_init_gpl.c +0 -0
board/xilinx/zynq/zynq-zc702/ps7_init_gpl.h renamed from board/xilinx/zynq/ZC702_hw_platform/ps7_init_gpl.h +0 -0
board/xilinx/zynq/zynq-zc706/ps7_init_gpl.c renamed from board/xilinx/zynq/ZC706_hw_platform/ps7_init_gpl.c +0 -0
board/xilinx/zynq/zynq-zc706/ps7_init_gpl.h renamed from board/xilinx/zynq/ZC706_hw_platform/ps7_init_gpl.h +0 -0
board/xilinx/zynq/zynq-zed/ps7_init_gpl.c renamed from board/xilinx/zynq/zed_hw_platform/ps7_init_gpl.c +0 -0
board/xilinx/zynq/zynq-zed/ps7_init_gpl.h renamed from board/xilinx/zynq/zed_hw_platform/ps7_init_gpl.h +0 -0
board/xilinx/zynq/zynq-zybo/ps7_init_gpl.c renamed from board/xilinx/zynq/zybo_hw_platform/ps7_init_gpl.c +0 -0
board/xilinx/zynq/zynq-zybo/ps7_init_gpl.h renamed from board/xilinx/zynq/zybo_hw_platform/ps7_init_gpl.h +0 -0
configs/zynq_microzed_defconfig +1 -1
@@ -1,6 +1,6 @@ CONFIG_ARM=y +CONFIG_SYS_CONFIG_NAME="zynq_microzed" CONFIG_ARCH_ZYNQ=y -CONFIG_TARGET_ZYNQ_MICROZED=y CONFIG_DEFAULT_DEVICE_TREE="zynq-microzed" CONFIG_SPL=y CONFIG_FIT=y
configs/zynq_picozed_defconfig +1 -1
@@ -1,6 +1,6 @@ CONFIG_ARM=y +CONFIG_SYS_CONFIG_NAME="zynq_picozed" CONFIG_ARCH_ZYNQ=y -CONFIG_TARGET_ZYNQ_PICOZED=y CONFIG_DEFAULT_DEVICE_TREE="zynq-picozed" CONFIG_SPL=y CONFIG_HUSH_PARSER=y
configs/zynq_zc702_defconfig +1 -0
@@ -1,4 +1,5 @@ CONFIG_ARM=y +CONFIG_SYS_CONFIG_NAME="zynq_zc70x" CONFIG_ARCH_ZYNQ=y CONFIG_DEFAULT_DEVICE_TREE="zynq-zc702" CONFIG_SPL=y
configs/zynq_zc706_defconfig +1 -1
@@ -1,6 +1,6 @@ CONFIG_ARM=y +CONFIG_SYS_CONFIG_NAME="zynq_zc70x" CONFIG_ARCH_ZYNQ=y -CONFIG_TARGET_ZYNQ_ZC706=y CONFIG_DEFAULT_DEVICE_TREE="zynq-zc706" CONFIG_SPL=y CONFIG_FIT=y
configs/zynq_zc770_xm010_defconfig +1 -1
@@ -1,6 +1,6 @@ CONFIG_ARM=y +CONFIG_SYS_CONFIG_NAME="zynq_zc770" CONFIG_ARCH_ZYNQ=y -CONFIG_TARGET_ZYNQ_ZC770=y CONFIG_DEFAULT_DEVICE_TREE="zynq-zc770-xm010" CONFIG_SPL=y CONFIG_FIT=y
configs/zynq_zc770_xm011_defconfig +1 -1
@@ -1,6 +1,6 @@ CONFIG_ARM=y +CONFIG_SYS_CONFIG_NAME="zynq_zc770" CONFIG_ARCH_ZYNQ=y -CONFIG_TARGET_ZYNQ_ZC770=y CONFIG_DEFAULT_DEVICE_TREE="zynq-zc770-xm011" CONFIG_SPL=y CONFIG_FIT=y
configs/zynq_zc770_xm012_defconfig +1 -1
@@ -1,6 +1,6 @@ CONFIG_ARM=y +CONFIG_SYS_CONFIG_NAME="zynq_zc770" CONFIG_ARCH_ZYNQ=y -CONFIG_TARGET_ZYNQ_ZC770=y CONFIG_DEFAULT_DEVICE_TREE="zynq-zc770-xm012" CONFIG_SPL=y CONFIG_FIT=y
configs/zynq_zc770_xm013_defconfig +1 -1
@@ -1,6 +1,6 @@ CONFIG_ARM=y +CONFIG_SYS_CONFIG_NAME="zynq_zc770" CONFIG_ARCH_ZYNQ=y -CONFIG_TARGET_ZYNQ_ZC770=y CONFIG_DEFAULT_DEVICE_TREE="zynq-zc770-xm013" CONFIG_SPL=y CONFIG_FIT=y
configs/zynq_zed_defconfig +1 -1
@@ -1,6 +1,6 @@ CONFIG_ARM=y +CONFIG_SYS_CONFIG_NAME="zynq_zed" CONFIG_ARCH_ZYNQ=y -CONFIG_TARGET_ZYNQ_ZED=y CONFIG_DEFAULT_DEVICE_TREE="zynq-zed" CONFIG_SPL=y CONFIG_FIT=y
configs/zynq_zybo_defconfig +1 -1
@@ -1,6 +1,6 @@ CONFIG_ARM=y +CONFIG_SYS_CONFIG_NAME="zynq_zybo" CONFIG_ARCH_ZYNQ=y -CONFIG_TARGET_ZYNQ_ZYBO=y CONFIG_DEFAULT_DEVICE_TREE="zynq-zybo" CONFIG_SPL=y CONFIG_FIT=y
Signature · 1 line
1.9.1
PATCH 1/1 ARM: zynq: Simplify zynq configuration
Hi Michal
2016-05-20 22:54 GMT+09:00 Michal Simek <[email protected]>:
Quoted 5 lines
Extending
Kconfigfor adding new platform is a lot of work for nothing. SettingSYS_CONFIG_NAMEdirectly inKconfigand remove all dependencies on TARGET_ZYNQ_* options including SPL. As a side-effect it also remove custom init folder for ps7_init_gpl.* files. Folder is choosed based on device-tree file.
Just comment:
CONFIG_SYS_CONFIG_NAME would be deprecated in a very very long run if we could completely switch to Kconfig and delete board config headers, but it might be a pipe dream. So, I am fine with this change.
Nit:
s/choosed/chosen/
Signature · 2 lines
Best Regards Masahiro Yamada
PATCH 1/1 ARM: zynq: Simplify zynq configuration
Quoted 9 lines · Masahiro Yamada
Hi Michal
2016-05-20 22:54 GMT+09:00 Michal Simek <[email protected]>:
Quoted 5 lines
Extending
Kconfigfor adding new platform is a lot of work for nothing. SettingSYS_CONFIG_NAMEdirectly inKconfigand remove all dependencies on TARGET_ZYNQ_* options including SPL. As a side-effect it also remove custom init folder for ps7_init_gpl.* files. Folder is choosed based on device-tree file.
Quoted 5 lines
Just comment:
CONFIG_SYS_CONFIG_NAMEwould be deprecated in a very very long run if we could completely switch toKconfigand delete board config headers, but it might be a pipe dream. So, I am fine with this change.
That's my goal too. There could be others board come and I want to do changes as small as possible.
Quoted 4 lines
Nit:
s/choosed/chosen/
will fix.
Thanks,
Michal