]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
xilinx: common: Remove zynq_board_read_rom_ethaddr()
authorVenkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
Mon, 17 Oct 2022 09:48:18 +0000 (15:18 +0530)
committerMichal Simek <michal.simek@amd.com>
Tue, 22 Nov 2022 14:02:07 +0000 (15:02 +0100)
Removing the zynq_board_read_rom_ethaddr() function as
xlnx,eeprom is not used anymore. As all board dts to use
nvmem alias instead of xlnx,eeprom.

Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
Link: https://lore.kernel.org/r/20221017094818.17996-1-venkatesh.abbarapu@amd.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
arch/arm/mach-zynq/include/mach/sys_proto.h
arch/arm/mach-zynqmp/include/mach/sys_proto.h
board/xilinx/common/board.c
drivers/net/zynq_gem.c

index 1dc16d479ea0388fa2428ea590ea310ee526e4fd..268ec50ad84d60b3b2fd6fdbf16db88d34c20cbb 100644 (file)
@@ -17,6 +17,4 @@ extern int zynq_slcr_get_mio_pin_status(const char *periph);
 extern void zynq_ddrc_init(void);
 extern unsigned int zynq_get_silicon_version(void);
 
-int zynq_board_read_rom_ethaddr(unsigned char *ethaddr);
-
 #endif /* _SYS_PROTO_H_ */
index 9fffb4e541c942567814d844f40c5dc3a1e5959e..c6733ed1bbe7cf0d5cf611cd6094f2d3510e5967 100644 (file)
@@ -46,7 +46,6 @@ enum {
        TCM_SPLIT,
 };
 
-int zynq_board_read_rom_ethaddr(unsigned char *ethaddr);
 unsigned int zynqmp_get_silicon_version(void);
 
 int zynqmp_mmio_write(const u32 address, const u32 mask, const u32 value);
index 99fdbac639b7dd2e5d9c6487de5a7b46d27dbbbd..59d87f2352021d053722051286f021d94e45dce9 100644 (file)
@@ -54,34 +54,6 @@ struct efi_capsule_update_info update_info = {
 u8 num_image_type_guids = ARRAY_SIZE(fw_images);
 #endif /* EFI_HAVE_CAPSULE_SUPPORT */
 
-#if defined(CONFIG_ZYNQ_GEM_I2C_MAC_OFFSET)
-int zynq_board_read_rom_ethaddr(unsigned char *ethaddr)
-{
-       int ret = -EINVAL;
-       struct udevice *dev;
-       ofnode eeprom;
-
-       eeprom = ofnode_get_chosen_node("xlnx,eeprom");
-       if (!ofnode_valid(eeprom))
-               return -ENODEV;
-
-       debug("%s: Path to EEPROM %s\n", __func__,
-             ofnode_read_chosen_string("xlnx,eeprom"));
-
-       ret = uclass_get_device_by_ofnode(UCLASS_I2C_EEPROM, eeprom, &dev);
-       if (ret)
-               return ret;
-
-       ret = dm_i2c_read(dev, CONFIG_ZYNQ_GEM_I2C_MAC_OFFSET, ethaddr, 6);
-       if (ret)
-               debug("%s: I2C EEPROM MAC address read failed\n", __func__);
-       else
-               debug("%s: I2C EEPROM MAC %pM\n", __func__, ethaddr);
-
-       return ret;
-}
-#endif
-
 #define EEPROM_HEADER_MAGIC            0xdaaddeed
 #define EEPROM_HDR_MANUFACTURER_LEN    16
 #define EEPROM_HDR_NAME_LEN            16
index 3f4357ec80b380754132d05648ed0026895d07f6..507b19b759757c72745bcfae4f08142bdd6b5350 100644 (file)
@@ -662,21 +662,6 @@ static void zynq_gem_halt(struct udevice *dev)
                                                ZYNQ_GEM_NWCTRL_TXEN_MASK, 0);
 }
 
-__weak int zynq_board_read_rom_ethaddr(unsigned char *ethaddr)
-{
-       return -ENOSYS;
-}
-
-static int zynq_gem_read_rom_mac(struct udevice *dev)
-{
-       struct eth_pdata *pdata = dev_get_plat(dev);
-
-       if (!pdata)
-               return -ENOSYS;
-
-       return zynq_board_read_rom_ethaddr(pdata->enetaddr);
-}
-
 static int zynq_gem_miiphy_read(struct mii_dev *bus, int addr,
                                int devad, int reg)
 {
@@ -884,7 +869,6 @@ static const struct eth_ops zynq_gem_ops = {
        .free_pkt               = zynq_gem_free_pkt,
        .stop                   = zynq_gem_halt,
        .write_hwaddr           = zynq_gem_setup_mac,
-       .read_rom_hwaddr        = zynq_gem_read_rom_mac,
 };
 
 static int zynq_gem_of_to_plat(struct udevice *dev)