summaryrefslogtreecommitdiff
path: root/board/xilinx/zynq
diff options
context:
space:
mode:
authorMichal Simek <michal.simek@xilinx.com>2019-01-21 17:25:02 +0300
committerMichal Simek <michal.simek@xilinx.com>2019-02-14 16:31:09 +0300
commit9755e3db8b1223699954146dfb171df75ec89ab3 (patch)
tree6f52a7923e6f89c1e60a92fa4f908630f91a81d5 /board/xilinx/zynq
parentad78d2641f03b08c7d7f18d5fe1c5acd19b828ec (diff)
downloadu-boot-9755e3db8b1223699954146dfb171df75ec89ab3.tar.xz
xilinx: Move zynq_board_read_rom_ethaddr to shared location
Zynq and ZynqMP are sharing similar code and there is no reason to do code duplication. Move zynq_board_read_rom_ethaddr() to common file for easier conversion to DM. Use ZynqMP version that's why also add CONFIG_ZYNQ_EEPROM_BUS to Syzygy which is only one Zynq board which is using this feature. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Diffstat (limited to 'board/xilinx/zynq')
-rw-r--r--board/xilinx/zynq/Makefile1
-rw-r--r--board/xilinx/zynq/board.c13
2 files changed, 1 insertions, 13 deletions
diff --git a/board/xilinx/zynq/Makefile b/board/xilinx/zynq/Makefile
index e7645be189..8d33015439 100644
--- a/board/xilinx/zynq/Makefile
+++ b/board/xilinx/zynq/Makefile
@@ -4,6 +4,7 @@
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
obj-y := board.o
+obj-y += ../common/board.o
ifneq ($(CONFIG_XILINX_PS_INIT_FILE),"")
PS_INIT_FILE := $(shell cd $(srctree); readlink -f $(CONFIG_XILINX_PS_INIT_FILE))
diff --git a/board/xilinx/zynq/board.c b/board/xilinx/zynq/board.c
index 614d93c082..f9973840bf 100644
--- a/board/xilinx/zynq/board.c
+++ b/board/xilinx/zynq/board.c
@@ -77,19 +77,6 @@ int board_late_init(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)
- 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)
int dram_init_banksize(void)
{