From: Michal Simek Date: Tue, 22 Jan 2019 14:55:46 +0000 (+0100) Subject: xilinx: common: Remove !DM_i2C code for reading mac from eeprom X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0bbaa17208435104ffb00c996fc1145902220440;p=thirdparty%2Fu-boot.git xilinx: common: Remove !DM_i2C code for reading mac from eeprom All platforms are converted to DM_I2C that's why there is no reason to keep this code here. Note: Update also Makefile till zc706_eeprom is updated. Signed-off-by: Michal Simek --- diff --git a/board/xilinx/common/board.c b/board/xilinx/common/board.c index 122c36589ab..c1abe4e0042 100644 --- a/board/xilinx/common/board.c +++ b/board/xilinx/common/board.c @@ -8,24 +8,6 @@ #include #include -#if !defined(CONFIG_DM_I2C) -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; -} - -#else int zynq_board_read_rom_ethaddr(unsigned char *ethaddr) { int ret = -ENOSYS; @@ -54,4 +36,3 @@ int zynq_board_read_rom_ethaddr(unsigned char *ethaddr) return ret; } -#endif diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig index 704c8dd1955..d6e677fba84 100644 --- a/drivers/misc/Kconfig +++ b/drivers/misc/Kconfig @@ -245,6 +245,7 @@ config SPL_I2C_EEPROM config ZYNQ_GEM_I2C_MAC_OFFSET hex "Set the I2C MAC offset" default 0x0 + depends on DM_I2C help Set the MAC offset for i2C.