diff options
author | Tom Rini <trini@konsulko.com> | 2016-05-24 12:20:43 (GMT) |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2016-05-24 12:20:43 (GMT) |
commit | ec8fb48ce98987065493b27422200897cf0909f8 (patch) | |
tree | e56d70ee24a04ee26fe75ac2af46c22705da61ed /board | |
parent | c98dc5a13399414fb651a80d05fa682236c4444e (diff) | |
parent | ad5b5801264e573bfbf17a20b04c546985c5bfc1 (diff) | |
download | u-boot-ec8fb48ce98987065493b27422200897cf0909f8.tar.xz |
Merge branch 'master' of git://www.denx.de/git/u-boot-microblaze
Diffstat (limited to 'board')
-rw-r--r-- | board/xilinx/zynq/Makefile | 12 | ||||
-rw-r--r-- | board/xilinx/zynq/custom_hw_platform/.gitignore | 1 | ||||
-rw-r--r-- | board/xilinx/zynq/zynq-microzed/ps7_init_gpl.c (renamed from board/xilinx/zynq/MicroZed_hw_platform/ps7_init_gpl.c) | 0 | ||||
-rw-r--r-- | board/xilinx/zynq/zynq-microzed/ps7_init_gpl.h (renamed from board/xilinx/zynq/MicroZed_hw_platform/ps7_init_gpl.h) | 0 | ||||
-rw-r--r-- | board/xilinx/zynq/zynq-zc702/ps7_init_gpl.c (renamed from board/xilinx/zynq/ZC702_hw_platform/ps7_init_gpl.c) | 0 | ||||
-rw-r--r-- | board/xilinx/zynq/zynq-zc702/ps7_init_gpl.h (renamed from board/xilinx/zynq/ZC702_hw_platform/ps7_init_gpl.h) | 0 | ||||
-rw-r--r-- | board/xilinx/zynq/zynq-zc706/ps7_init_gpl.c (renamed from board/xilinx/zynq/ZC706_hw_platform/ps7_init_gpl.c) | 0 | ||||
-rw-r--r-- | board/xilinx/zynq/zynq-zc706/ps7_init_gpl.h (renamed from board/xilinx/zynq/ZC706_hw_platform/ps7_init_gpl.h) | 0 | ||||
-rw-r--r-- | board/xilinx/zynq/zynq-zed/ps7_init_gpl.c (renamed from board/xilinx/zynq/zed_hw_platform/ps7_init_gpl.c) | 0 | ||||
-rw-r--r-- | board/xilinx/zynq/zynq-zed/ps7_init_gpl.h (renamed from board/xilinx/zynq/zed_hw_platform/ps7_init_gpl.h) | 0 | ||||
-rw-r--r-- | board/xilinx/zynq/zynq-zybo/ps7_init_gpl.c (renamed from board/xilinx/zynq/zybo_hw_platform/ps7_init_gpl.c) | 0 | ||||
-rw-r--r-- | board/xilinx/zynq/zynq-zybo/ps7_init_gpl.h (renamed from board/xilinx/zynq/zybo_hw_platform/ps7_init_gpl.h) | 0 | ||||
-rw-r--r-- | board/xilinx/zynqmp/Makefile | 23 | ||||
-rw-r--r-- | board/xilinx/zynqmp/xil_io.h | 35 | ||||
-rw-r--r-- | board/xilinx/zynqmp/zynqmp.c | 17 |
15 files changed, 75 insertions, 13 deletions
diff --git a/board/xilinx/zynq/Makefile b/board/xilinx/zynq/Makefile index eab9303..7de0212 100644 --- a/board/xilinx/zynq/Makefile +++ b/board/xilinx/zynq/Makefile @@ -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) diff --git a/board/xilinx/zynq/custom_hw_platform/.gitignore b/board/xilinx/zynq/custom_hw_platform/.gitignore deleted file mode 100644 index c455361..0000000 --- a/board/xilinx/zynq/custom_hw_platform/.gitignore +++ /dev/null @@ -1 +0,0 @@ -ps7_init_gpl.[ch] diff --git a/board/xilinx/zynq/MicroZed_hw_platform/ps7_init_gpl.c b/board/xilinx/zynq/zynq-microzed/ps7_init_gpl.c index eb29002..eb29002 100644 --- a/board/xilinx/zynq/MicroZed_hw_platform/ps7_init_gpl.c +++ b/board/xilinx/zynq/zynq-microzed/ps7_init_gpl.c diff --git a/board/xilinx/zynq/MicroZed_hw_platform/ps7_init_gpl.h b/board/xilinx/zynq/zynq-microzed/ps7_init_gpl.h index bdea5a0..bdea5a0 100644 --- a/board/xilinx/zynq/MicroZed_hw_platform/ps7_init_gpl.h +++ b/board/xilinx/zynq/zynq-microzed/ps7_init_gpl.h diff --git a/board/xilinx/zynq/ZC702_hw_platform/ps7_init_gpl.c b/board/xilinx/zynq/zynq-zc702/ps7_init_gpl.c index abfd911..abfd911 100644 --- a/board/xilinx/zynq/ZC702_hw_platform/ps7_init_gpl.c +++ b/board/xilinx/zynq/zynq-zc702/ps7_init_gpl.c diff --git a/board/xilinx/zynq/ZC702_hw_platform/ps7_init_gpl.h b/board/xilinx/zynq/zynq-zc702/ps7_init_gpl.h index 16fa810..16fa810 100644 --- a/board/xilinx/zynq/ZC702_hw_platform/ps7_init_gpl.h +++ b/board/xilinx/zynq/zynq-zc702/ps7_init_gpl.h diff --git a/board/xilinx/zynq/ZC706_hw_platform/ps7_init_gpl.c b/board/xilinx/zynq/zynq-zc706/ps7_init_gpl.c index 77fd949..77fd949 100644 --- a/board/xilinx/zynq/ZC706_hw_platform/ps7_init_gpl.c +++ b/board/xilinx/zynq/zynq-zc706/ps7_init_gpl.c diff --git a/board/xilinx/zynq/ZC706_hw_platform/ps7_init_gpl.h b/board/xilinx/zynq/zynq-zc706/ps7_init_gpl.h index 8527eef..8527eef 100644 --- a/board/xilinx/zynq/ZC706_hw_platform/ps7_init_gpl.h +++ b/board/xilinx/zynq/zynq-zc706/ps7_init_gpl.h diff --git a/board/xilinx/zynq/zed_hw_platform/ps7_init_gpl.c b/board/xilinx/zynq/zynq-zed/ps7_init_gpl.c index f4f45be..f4f45be 100644 --- a/board/xilinx/zynq/zed_hw_platform/ps7_init_gpl.c +++ b/board/xilinx/zynq/zynq-zed/ps7_init_gpl.c diff --git a/board/xilinx/zynq/zed_hw_platform/ps7_init_gpl.h b/board/xilinx/zynq/zynq-zed/ps7_init_gpl.h index 9b41e28..9b41e28 100644 --- a/board/xilinx/zynq/zed_hw_platform/ps7_init_gpl.h +++ b/board/xilinx/zynq/zynq-zed/ps7_init_gpl.h diff --git a/board/xilinx/zynq/zybo_hw_platform/ps7_init_gpl.c b/board/xilinx/zynq/zynq-zybo/ps7_init_gpl.c index 83daf7b..83daf7b 100644 --- a/board/xilinx/zynq/zybo_hw_platform/ps7_init_gpl.c +++ b/board/xilinx/zynq/zynq-zybo/ps7_init_gpl.c diff --git a/board/xilinx/zynq/zybo_hw_platform/ps7_init_gpl.h b/board/xilinx/zynq/zynq-zybo/ps7_init_gpl.h index 22d9fd9..22d9fd9 100644 --- a/board/xilinx/zynq/zybo_hw_platform/ps7_init_gpl.h +++ b/board/xilinx/zynq/zynq-zybo/ps7_init_gpl.h diff --git a/board/xilinx/zynqmp/Makefile b/board/xilinx/zynqmp/Makefile index 2ab3f19..90f00c6 100644 --- a/board/xilinx/zynqmp/Makefile +++ b/board/xilinx/zynqmp/Makefile @@ -1,8 +1,29 @@ # -# (C) Copyright 2014 - 2015 Xilinx, Inc. +# (C) Copyright 2014 - 2016 Xilinx, Inc. # Michal Simek <michal.simek@xilinx.com> # # SPDX-License-Identifier: GPL-2.0+ # obj-y := zynqmp.o + +hw-platform-y :=$(shell echo $(CONFIG_SYS_CONFIG_NAME)) + +init-objs := $(if $(wildcard $(srctree)/$(src)/$(hw-platform-y)/psu_init_gpl.c),\ + $(hw-platform-y)/psu_init_gpl.o) + +ifeq ($(init-objs),) +ifneq ($(wildcard $(srctree)/$(src)/psu_init_gpl.c),) +init-objs := psu_init_gpl.o +$(if $(CONFIG_SPL_BUILD),\ +$(warning Put custom psu_init_gpl.c/h to board/xilinx/zynqmp/custom_hw_platform/)) +endif +endif + +obj-$(CONFIG_SPL_BUILD) += $(init-objs) + +# Suppress "warning: function declaration isn't a prototype" +CFLAGS_REMOVE_psu_init_gpl.o := -Wstrict-prototypes + +# To include xil_io.h +CFLAGS_psu_init_gpl.o := -I$(srctree)/$(src) diff --git a/board/xilinx/zynqmp/xil_io.h b/board/xilinx/zynqmp/xil_io.h new file mode 100644 index 0000000..57ca4ad --- /dev/null +++ b/board/xilinx/zynqmp/xil_io.h @@ -0,0 +1,35 @@ +/* + * SPDX-License-Identifier: GPL-2.0+ + */ + +#ifndef XIL_IO_H /* prevent circular inclusions */ +#define XIL_IO_H + +/* FIXME remove this when vivado is fixed */ +#include <asm/io.h> + +#define xil_printf(...) + +void Xil_ICacheEnable(void) +{} + +void Xil_DCacheEnable(void) +{} + +void Xil_ICacheDisable(void) +{} + +void Xil_DCacheDisable(void) +{} + +void Xil_Out32(unsigned long addr, unsigned long val) +{ + writel(val, addr); +} + +int Xil_In32(unsigned long addr) +{ + return readl(addr); +} + +#endif /* XIL_IO_H */ diff --git a/board/xilinx/zynqmp/zynqmp.c b/board/xilinx/zynqmp/zynqmp.c index 132d724..4623cd4 100644 --- a/board/xilinx/zynqmp/zynqmp.c +++ b/board/xilinx/zynqmp/zynqmp.c @@ -15,6 +15,7 @@ #include <asm/io.h> #include <usb.h> #include <dwc3-uboot.h> +#include <i2c.h> DECLARE_GLOBAL_DATA_PTR; @@ -50,6 +51,22 @@ int board_early_init_r(void) return 0; } +int zynq_board_read_rom_ethaddr(unsigned char *ethaddr) +{ +#if defined(CONFIG_ZYNQ_GEM_EEPROM_ADDR) && \ + defined(CONFIG_ZYNQ_GEM_I2C_MAC_OFFSET) && \ + defined(CONFIG_ZYNQ_EEPROM_BUS) + i2c_set_bus_num(CONFIG_ZYNQ_EEPROM_BUS); + + if (eeprom_read(CONFIG_ZYNQ_GEM_EEPROM_ADDR, + CONFIG_ZYNQ_GEM_I2C_MAC_OFFSET, + ethaddr, 6)) + printf("I2C EEPROM MAC address read failed\n"); +#endif + + return 0; +} + #if !defined(CONFIG_SYS_SDRAM_BASE) && !defined(CONFIG_SYS_SDRAM_SIZE) /* * fdt_get_reg - Fill buffer by information from DT |