On 10-11-17 11:58, Michal Simek wrote: > Hi, > > this series is trying to cleanup ps7_init* file that we don't need to > have the same copy of the same functions in different locations. > This work is done based on solution from Topic.nl for miami boards > where format was changed a little bit to save one word in config data > segment. Nice to see one's work appreciated. A bit of comment below. > At the same time older method of simply copying files to particular > folder is still working. > Please test this in your board to make sure I didn't break anything. > I have tested it on zybo/zc702/zc706. > > Thanks, > Michal > > > Michal Simek (9): > arm: zynq: Add missing ps7_post_config declaration > arm: zynq: Enable debug uart on zc706 > arm: zynq: Remove ps7_debug code > arm: zynq: Move ps7_* to separate file > arm: zynq: Get rid of ps7_reset_apu() for syzygy board > arm: zynq: Move common ps7_init* initialization to arch code > arm: zynq: Add ps7GetSiliconVersion() to ps7_spl_init > arm: zynq: Convert EMIT_WRITE to EMIT_MASKWRITE There's actually room for one more opcode, so I would recommend implementing MASK_WRITE instead of forcing everything to be done in read-modify-write mode. #define OPCODE_MASKWRITE 3U #define EMIT_MASKWRITE(addr, val) OPCODE_MASKWRITE | addr, val This "constant table" approach could also be implemented for the zynqmp platforms, cutting down the size of the SPL considerably. (Only thing remaining is to have Vivado output these files properly...) > arm: zynq: Convert all board to use arch ps7_init code > > arch/arm/mach-zynq/Makefile | 2 +- > .../arm/mach-zynq/include/mach}/ps7_init_gpl.h | 14 + > arch/arm/mach-zynq/include/mach/sys_proto.h | 3 - > .../arm/mach-zynq/ps7_spl_init.c | 31 ++- > arch/arm/mach-zynq/spl.c | 18 +- > .../opalkelly/zynq/zynq-syzygy-hub/ps7_init_gpl.c | 138 +--------- > .../opalkelly/zynq/zynq-syzygy-hub/ps7_init_gpl.h | 81 ------ > board/topic/zynq/Makefile | 2 +- > board/topic/zynq/zynq-topic-miami/ps7_init_gpl.c | 2 +- > .../topic/zynq/zynq-topic-miamilite/ps7_init_gpl.c | 2 +- > .../topic/zynq/zynq-topic-miamiplus/ps7_init_gpl.c | 2 +- > board/xilinx/zynq/zynq-microzed/ps7_init_gpl.c | 285 +------------------- > board/xilinx/zynq/zynq-microzed/ps7_init_gpl.h | 117 --------- > board/xilinx/zynq/zynq-zc702/ps7_init_gpl.c | 289 +------------------- > board/xilinx/zynq/zynq-zc702/ps7_init_gpl.h | 117 --------- > board/xilinx/zynq/zynq-zc706/ps7_init_gpl.c | 285 +------------------- > board/xilinx/zynq/zynq-zc706/ps7_init_gpl.h | 117 --------- > board/xilinx/zynq/zynq-zed/ps7_init_gpl.c | 285 +------------------- > board/xilinx/zynq/zynq-zed/ps7_init_gpl.h | 117 --------- > board/xilinx/zynq/zynq-zybo/ps7_init_gpl.c | 292 +-------------------- > board/xilinx/zynq/zynq-zybo/ps7_init_gpl.h | 98 ------- > configs/zynq_zc706_defconfig | 5 + > 22 files changed, 60 insertions(+), 2242 deletions(-) > rename {board/topic/zynq => arch/arm/mach-zynq/include/mach}/ps7_init_gpl.h (75%) > rename board/topic/zynq/ps7_init_common.c => arch/arm/mach-zynq/ps7_spl_init.c (78%) > delete mode 100644 board/opalkelly/zynq/zynq-syzygy-hub/ps7_init_gpl.h > delete mode 100644 board/xilinx/zynq/zynq-microzed/ps7_init_gpl.h > delete mode 100644 board/xilinx/zynq/zynq-zc702/ps7_init_gpl.h > delete mode 100644 board/xilinx/zynq/zynq-zc706/ps7_init_gpl.h > delete mode 100644 board/xilinx/zynq/zynq-zed/ps7_init_gpl.h > delete mode 100644 board/xilinx/zynq/zynq-zybo/ps7_init_gpl.h > Kind regards, Mike Looijmans System Expert TOPIC Products Materiaalweg 4, NL-5681 RJ Best Postbus 440, NL-5680 AK Best Telefoon: +31 (0) 499 33 69 79 E-mail: mike.looijmans at topicproducts.com Website: www.topicproducts.com Please consider the environment before printing this e-mail