From 290f1f999a42fd08f3483722a61e2d9e0901eb17 Mon Sep 17 00:00:00 2001 From: Soren Brinkmann Date: Thu, 30 Oct 2014 10:52:43 -0700 Subject: zynq: Use GPLed files for SPL The latest Xilinx tools generate ps7_init files that are explicitly available under GPL. Change the makefile to allow drop in of those files for building the SPL. Signed-off-by: Soren Brinkmann Acked-by: Jagannadha Sutradharudu Teki Reviewed-and-tested-by: Masahiro Yamada Signed-off-by: Michal Simek --- board/xilinx/zynq/.gitignore | 1 + board/xilinx/zynq/Makefile | 6 ++++-- board/xilinx/zynq/legacy.c | 2 ++ board/xilinx/zynq/xil_io.h | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 board/xilinx/zynq/legacy.c diff --git a/board/xilinx/zynq/.gitignore b/board/xilinx/zynq/.gitignore index 68b8edd260..7c36bc963f 100644 --- a/board/xilinx/zynq/.gitignore +++ b/board/xilinx/zynq/.gitignore @@ -1 +1,2 @@ ps7_init.[ch] +ps7_init_gpl.[ch] diff --git a/board/xilinx/zynq/Makefile b/board/xilinx/zynq/Makefile index 71c0c351f9..3b1eb4f74a 100644 --- a/board/xilinx/zynq/Makefile +++ b/board/xilinx/zynq/Makefile @@ -7,9 +7,11 @@ obj-y := board.o -# Please copy ps7_init.c/h from hw project to this directory +# Please copy ps7_init_gpl.c/h from hw project to this directory obj-$(CONFIG_SPL_BUILD) += \ - $(if $(wildcard $(srctree)/$(src)/ps7_init.c), ps7_init.o) + $(if $(wildcard $(srctree)/$(src)/ps7_init_gpl.c), ps7_init_gpl.o, \ + $(if $(wildcard $(srctree)/$(src)/ps7_init.c), ps7_init.o legacy.o)) # Suppress "warning: function declaration isn't a prototype" +CFLAGS_REMOVE_ps7_init_gpl.o := -Wstrict-prototypes CFLAGS_REMOVE_ps7_init.o := -Wstrict-prototypes diff --git a/board/xilinx/zynq/legacy.c b/board/xilinx/zynq/legacy.c new file mode 100644 index 0000000000..4ae913eefe --- /dev/null +++ b/board/xilinx/zynq/legacy.c @@ -0,0 +1,2 @@ + +#warning usage of ps7_init files is deprecated please use ps7_init_gpl diff --git a/board/xilinx/zynq/xil_io.h b/board/xilinx/zynq/xil_io.h index e59a977eb1..1eccf8d91d 100644 --- a/board/xilinx/zynq/xil_io.h +++ b/board/xilinx/zynq/xil_io.h @@ -6,7 +6,7 @@ #define XIL_IO_H /* - * This empty file is here because ps7_init.c exported by hw project + * This empty file is here because ps7_init_gpl.c exported by hw project * has #include "xil_io.h" line. */ -- cgit v1.2.1 From 9757b65befff800303f053d95d49b167a0d159a2 Mon Sep 17 00:00:00 2001 From: Peter Crosthwaite Date: Thu, 28 Aug 2014 21:16:39 +1000 Subject: arm: dts: zynq: Add digilent ZYBO board dts It's a Zynq board similar in design to the currently supported ones. 512MB of RAM and UART1 is used. Signed-off-by: Peter Crosthwaite Acked-by: Jagannadha Sutradharudu Teki Signed-off-by: Michal Simek --- arch/arm/dts/Makefile | 1 + arch/arm/dts/zynq-zybo.dts | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 arch/arm/dts/zynq-zybo.dts diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index 52f8926894..8977d4b5ae 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -34,6 +34,7 @@ dtb-$(CONFIG_TEGRA) += tegra20-harmony.dtb \ dtb-$(CONFIG_ZYNQ) += zynq-zc702.dtb \ zynq-zc706.dtb \ zynq-zed.dtb \ + zynq-zybo.dtb \ zynq-microzed.dtb \ zynq-zc770-xm010.dtb \ zynq-zc770-xm012.dtb \ diff --git a/arch/arm/dts/zynq-zybo.dts b/arch/arm/dts/zynq-zybo.dts new file mode 100644 index 0000000000..20e0386777 --- /dev/null +++ b/arch/arm/dts/zynq-zybo.dts @@ -0,0 +1,23 @@ +/* + * Digilent ZYBO board DTS + * + * Copyright (C) 2013 Xilinx, Inc. + * + * SPDX-License-Identifier: GPL-2.0+ + */ +/dts-v1/; +#include "zynq-7000.dtsi" + +/ { + model = "Zynq ZYBO Board"; + compatible = "xlnx,zynq-zybo", "xlnx,zynq-7000"; + + aliases { + serial0 = &uart1; + }; + + memory { + device_type = "memory"; + reg = <0 0x20000000>; + }; +}; -- cgit v1.2.1 From d977d6f71ed2613c716c140ed718806fec5bae4a Mon Sep 17 00:00:00 2001 From: Tinghui Wang Date: Thu, 28 Aug 2014 21:16:40 +1000 Subject: configs: zynq: Add config support for ZYBO This patch adds config support needed for ZYBO target and has been tested on Rev. B ZYBO hardware. Signed-off-by: Tinghui Wang [PC changes: * Dropped boards.cfg change (rebase conflict) * Dropped custom u-boot env * Added DTS * Misc forward-porting changes ] Signed-off-by: Peter Crosthwiate Signed-off-by: Michal Simek --- include/configs/zynq_zybo.h | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 include/configs/zynq_zybo.h diff --git a/include/configs/zynq_zybo.h b/include/configs/zynq_zybo.h new file mode 100644 index 0000000000..ce1527fafc --- /dev/null +++ b/include/configs/zynq_zybo.h @@ -0,0 +1,31 @@ +/* + * (C) Copyright 2012 Xilinx + * (C) Copyright 2014 Digilent Inc. + * + * Configuration for Zynq Development Board - ZYBO + * See zynq-common.h for Zynq common configs + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#ifndef __CONFIG_ZYNQ_ZYBO_H +#define __CONFIG_ZYNQ_ZYBO_H + +#define CONFIG_SYS_SDRAM_SIZE (512 * 1024 * 1024) + +#define CONFIG_ZYNQ_SERIAL_UART1 +#define CONFIG_ZYNQ_GEM0 +#define CONFIG_ZYNQ_GEM_PHY_ADDR0 0 + +#define CONFIG_SYS_NO_FLASH + +#define CONFIG_ZYNQ_SDHCI0 +#define CONFIG_ZYNQ_BOOT_FREEBSD +#define CONFIG_DEFAULT_DEVICE_TREE zynq-zybo + +/* Define ZYBO PS Clock Frequency to 50MHz */ +#define CONFIG_ZYNQ_PS_CLK_FREQ 50000000UL + +#include + +#endif /* __CONFIG_ZYNQ_ZYBO_H */ -- cgit v1.2.1 From 61eb3cf2d5ef174b5a3008df6f7530b21f393261 Mon Sep 17 00:00:00 2001 From: Peter Crosthwaite Date: Thu, 28 Aug 2014 21:16:41 +1000 Subject: kconfig: zynq: Add ZYBO board Add a defconfig and Kconfigury for the Digilent ZYBO board. Signed-off-by: Peter Crosthwaite Acked-by: Jagannadha Sutradharudu Teki Reviewed-by: Masahiro Yamada Signed-off-by: Michal Simek --- arch/arm/cpu/armv7/zynq/Kconfig | 4 ++++ configs/zynq_zybo_defconfig | 4 ++++ 2 files changed, 8 insertions(+) create mode 100644 configs/zynq_zybo_defconfig diff --git a/arch/arm/cpu/armv7/zynq/Kconfig b/arch/arm/cpu/armv7/zynq/Kconfig index f418cd6d99..3a52535ce0 100644 --- a/arch/arm/cpu/armv7/zynq/Kconfig +++ b/arch/arm/cpu/armv7/zynq/Kconfig @@ -15,6 +15,9 @@ config TARGET_ZYNQ_ZC70X config TARGET_ZYNQ_ZC770 bool "Zynq ZC770 Board" +config TARGET_ZYNQ_ZYBO + bool "Zynq Zybo Board" + endchoice config SYS_BOARD @@ -31,5 +34,6 @@ config SYS_CONFIG_NAME default "zynq_microzed" if TARGET_ZYNQ_MICROZED default "zynq_zc70x" if TARGET_ZYNQ_ZC70X default "zynq_zc770" if TARGET_ZYNQ_ZC770 + default "zynq_zybo" if TARGET_ZYNQ_ZYBO endif diff --git a/configs/zynq_zybo_defconfig b/configs/zynq_zybo_defconfig new file mode 100644 index 0000000000..a00f4fcea5 --- /dev/null +++ b/configs/zynq_zybo_defconfig @@ -0,0 +1,4 @@ +CONFIG_SPL=y ++S:CONFIG_ARM=y ++S:CONFIG_ZYNQ=y ++S:CONFIG_TARGET_ZYNQ_ZYBO=y -- cgit v1.2.1