[PATCH] net: ethernet: mtk_eth_soc: implement Clause 45 MDIO access

Andrew Lunn andrew at lunn.ch
Sun Dec 26 13:51:08 PST 2021


> +	if (phy_register & MII_ADDR_C45) {
> +		u8 dev_num = (phy_register >> 16) & 0x1f;
> +		u16 reg = (u16)(phy_register & 0xffff);

Hi Daniel

You can use the helpers

mdio_phy_id_is_c45()
mdio_phy_id_prtad()
mdio_phy_id_devad()

	Andrew



More information about the linux-arm-kernel mailing list