mirror of
https://xff.cz/git/u-boot/
synced 2025-09-04 02:02:08 +02:00
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. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Heiko Schocher <hs@denx.de>
This commit is contained in:
@@ -8,24 +8,6 @@
|
|||||||
#include <dm/uclass.h>
|
#include <dm/uclass.h>
|
||||||
#include <i2c.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 zynq_board_read_rom_ethaddr(unsigned char *ethaddr)
|
||||||
{
|
{
|
||||||
int ret = -EINVAL;
|
int ret = -EINVAL;
|
||||||
@@ -54,4 +36,3 @@ int zynq_board_read_rom_ethaddr(unsigned char *ethaddr)
|
|||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
@@ -39,7 +39,6 @@ CONFIG_DFU_RAM=y
|
|||||||
CONFIG_FPGA_XILINX=y
|
CONFIG_FPGA_XILINX=y
|
||||||
CONFIG_FPGA_ZYNQPL=y
|
CONFIG_FPGA_ZYNQPL=y
|
||||||
CONFIG_DM_GPIO=y
|
CONFIG_DM_GPIO=y
|
||||||
CONFIG_ZYNQ_GEM_I2C_MAC_OFFSET=0xFA
|
|
||||||
CONFIG_MMC_SDHCI=y
|
CONFIG_MMC_SDHCI=y
|
||||||
CONFIG_MMC_SDHCI_ZYNQ=y
|
CONFIG_MMC_SDHCI_ZYNQ=y
|
||||||
CONFIG_SPI_FLASH=y
|
CONFIG_SPI_FLASH=y
|
||||||
|
@@ -245,6 +245,7 @@ config SPL_I2C_EEPROM
|
|||||||
config ZYNQ_GEM_I2C_MAC_OFFSET
|
config ZYNQ_GEM_I2C_MAC_OFFSET
|
||||||
hex "Set the I2C MAC offset"
|
hex "Set the I2C MAC offset"
|
||||||
default 0x0
|
default 0x0
|
||||||
|
depends on DM_I2C
|
||||||
help
|
help
|
||||||
Set the MAC offset for i2C.
|
Set the MAC offset for i2C.
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user