]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
xilinx: common: Remove !DM_i2C code for reading mac from eeprom
authorMichal Simek <michal.simek@xilinx.com>
Tue, 22 Jan 2019 14:55:46 +0000 (15:55 +0100)
committerMichal Simek <michal.simek@xilinx.com>
Tue, 12 Feb 2019 08:43:01 +0000 (09:43 +0100)
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 <michal.simek@xilinx.com>
board/xilinx/common/board.c
drivers/misc/Kconfig

index 122c36589abd7fa5b1d571c21fc5ed30c9084d67..c1abe4e00423c5b68bf1b12e2edc11c52a984ada 100644 (file)
@@ -8,24 +8,6 @@
 #include <dm/uclass.h>
 #include <i2c.h>
 
-#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
index 704c8dd1955f57aa3927df88980afa03686e8e63..d6e677fba847b9985935d4c61748bf03e2709d77 100644 (file)
@@ -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.