diff options
author | Michal Simek <michal.simek@xilinx.com> | 2019-01-21 15:25:02 +0100 |
---|---|---|
committer | Michal Simek <michal.simek@xilinx.com> | 2019-02-14 14:31:09 +0100 |
commit | 9755e3db8b1223699954146dfb171df75ec89ab3 (patch) | |
tree | 6f52a7923e6f89c1e60a92fa4f908630f91a81d5 /board/xilinx/zynqmp/zynqmp.c | |
parent | ad78d2641f03b08c7d7f18d5fe1c5acd19b828ec (diff) |
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/zynqmp/zynqmp.c')
-rw-r--r-- | board/xilinx/zynqmp/zynqmp.c | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/board/xilinx/zynqmp/zynqmp.c b/board/xilinx/zynqmp/zynqmp.c index 41e88b03f9..e7dfd49a3c 100644 --- a/board/xilinx/zynqmp/zynqmp.c +++ b/board/xilinx/zynqmp/zynqmp.c @@ -20,7 +20,6 @@ #include <usb.h> #include <dwc3-uboot.h> #include <zynqmppl.h> -#include <i2c.h> #include <g_dnl.h> DECLARE_GLOBAL_DATA_PTR; @@ -409,22 +408,6 @@ 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; -} - unsigned long do_go_exec(ulong (*entry)(int, char * const []), int argc, char * const argv[]) { |