From: Tom Rini Date: Fri, 15 Apr 2022 12:09:52 +0000 (-0400) Subject: Merge branch 'next' of https://source.denx.de/u-boot/custodians/u-boot-net X-Git-Tag: v2022.07-rc1~22 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7f418ea59852945eeb9e5d2555d306f09643d555;p=thirdparty%2Fu-boot.git Merge branch 'next' of https://source.denx.de/u-boot/custodians/u-boot-net - DM9000 DM support - tftp server bug fix - mdio ofnode support functions - Various phy fixes and improvements. [trini: Fixup merge conflicts in drivers/net/phy/ethernet_id.c drivers/net/phy/phy.c include/phy.h] --- 7f418ea59852945eeb9e5d2555d306f09643d555 diff --cc drivers/net/phy/ethernet_id.c index 1a78a751ede,38a8dca347b..8864f99bb32 --- a/drivers/net/phy/ethernet_id.c +++ b/drivers/net/phy/ethernet_id.c @@@ -11,8 -11,7 +11,8 @@@ #include #include -struct phy_device *phy_connect_phy_id(struct mii_dev *bus, struct udevice *dev) +struct phy_device *phy_connect_phy_id(struct mii_dev *bus, struct udevice *dev, - int phyaddr, phy_interface_t interface) ++ int phyaddr) { struct phy_device *phydev; struct ofnode_phandle_args phandle_args; @@@ -68,7 -60,7 +68,7 @@@ } id = vendor << 16 | device; - phydev = phy_device_create(bus, phyaddr, id, false, interface); - phydev = phy_device_create(bus, 0, id, false); ++ phydev = phy_device_create(bus, phyaddr, id, false); if (phydev) phydev->node = node; diff --cc drivers/net/phy/phy.c index 36722620f0c,e0b37a9542e..1121b99abff --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c @@@ -1052,7 -1029,7 +1032,7 @@@ struct phy_device *phy_connect(struct m #ifdef CONFIG_PHY_ETHERNET_ID if (!phydev) - phydev = phy_connect_phy_id(bus, dev, addr, interface); - phydev = phy_connect_phy_id(bus, dev); ++ phydev = phy_connect_phy_id(bus, dev, addr); #endif #ifdef CONFIG_PHY_XILINX_GMII2RGMII @@@ -1101,35 -1078,3 +1081,23 @@@ int phy_shutdown(struct phy_device *phy return 0; } + - int phy_get_interface_by_name(const char *str) - { - int i; - - for (i = 0; i < PHY_INTERFACE_MODE_COUNT; i++) { - if (!strcmp(str, phy_interface_strings[i])) - return i; - } - - return -1; - } - +/** + * phy_modify - Convenience function for modifying a given PHY register + * @phydev: the phy_device struct + * @devad: The MMD to read from + * @regnum: register number to write + * @mask: bit mask of bits to clear + * @set: new value of bits set in mask to write to @regnum + */ +int phy_modify(struct phy_device *phydev, int devad, int regnum, u16 mask, + u16 set) +{ + int ret; + + ret = phy_read(phydev, devad, regnum); + if (ret < 0) + return ret; + + return phy_write(phydev, devad, regnum, (ret & ~mask) | set); +} diff --cc include/phy.h index 528839a33de,37b2a0281e3..b3295957106 --- a/include/phy.h +++ b/include/phy.h @@@ -477,9 -463,7 +463,8 @@@ struct phy_device *phy_device_create(st * @return: pointer to phy_device if a PHY is found, * or NULL otherwise */ -struct phy_device *phy_connect_phy_id(struct mii_dev *bus, struct udevice *dev); +struct phy_device *phy_connect_phy_id(struct mii_dev *bus, struct udevice *dev, - int phyaddr, phy_interface_t interface); ++ int phyaddr); static inline ofnode phy_get_ofnode(struct phy_device *phydev) { diff --cc scripts/config_whitelist.txt index ef7dbbfe982,e4c5f743c94..df70ae2264d --- a/scripts/config_whitelist.txt +++ b/scripts/config_whitelist.txt @@@ -24,8 -49,12 +24,7 @@@ CONFIG_DM9000_BYTE_SWAPPE CONFIG_DM9000_DEBUG CONFIG_DM9000_NO_SROM CONFIG_DM9000_USE_16BIT -CONFIG_DMA_COHERENT -CONFIG_DMA_COHERENT_SIZE -CONFIG_DP_DDR_CTRL CONFIG_DP_DDR_DIMM_SLOTS_PER_CTLR -CONFIG_DP_DDR_NUM_CTRLS --CONFIG_DRIVER_DM9000 CONFIG_DSP_CLUSTER_START CONFIG_DWC_AHSATA_BASE_ADDR CONFIG_DWC_AHSATA_PORT_ID