@@ -375,8 +375,8 @@ static void mmd_phy_indirect(struct mii_bus *bus, int phy_addr, int devad,
375375 devad | MII_MMD_CTRL_NOINCR );
376376}
377377
378- static int mmd_phy_read (struct mii_bus * bus , int phy_addr , bool is_c45 ,
379- int devad , u32 regnum )
378+ int mmd_phy_read (struct mii_bus * bus , int phy_addr , bool is_c45 ,
379+ int devad , u32 regnum )
380380{
381381 if (is_c45 )
382382 return __mdiobus_c45_read (bus , phy_addr , devad , regnum );
@@ -385,9 +385,10 @@ static int mmd_phy_read(struct mii_bus *bus, int phy_addr, bool is_c45,
385385 /* Read the content of the MMD's selected register */
386386 return __mdiobus_read (bus , phy_addr , MII_MMD_DATA );
387387}
388+ EXPORT_SYMBOL_GPL (mmd_phy_read );
388389
389- static int mmd_phy_write (struct mii_bus * bus , int phy_addr , bool is_c45 ,
390- int devad , u32 regnum , u16 val )
390+ int mmd_phy_write (struct mii_bus * bus , int phy_addr , bool is_c45 ,
391+ int devad , u32 regnum , u16 val )
391392{
392393 if (is_c45 )
393394 return __mdiobus_c45_write (bus , phy_addr , devad , regnum , val );
@@ -396,6 +397,7 @@ static int mmd_phy_write(struct mii_bus *bus, int phy_addr, bool is_c45,
396397 /* Write the data into MMD's selected register */
397398 return __mdiobus_write (bus , phy_addr , MII_MMD_DATA , val );
398399}
400+ EXPORT_SYMBOL_GPL (mmd_phy_write );
399401
400402/**
401403 * __phy_read_mmd - Convenience function for reading a register
@@ -485,71 +487,6 @@ int phy_write_mmd(struct phy_device *phydev, int devad, u32 regnum, u16 val)
485487}
486488EXPORT_SYMBOL (phy_write_mmd );
487489
488- /**
489- * __phy_package_read_mmd - read MMD reg relative to PHY package base addr
490- * @phydev: The phy_device struct
491- * @addr_offset: The offset to be added to PHY package base_addr
492- * @devad: The MMD to read from
493- * @regnum: The register on the MMD to read
494- *
495- * Convenience helper for reading a register of an MMD on a given PHY
496- * using the PHY package base address. The base address is added to
497- * the addr_offset value.
498- *
499- * Same calling rules as for __phy_read();
500- *
501- * NOTE: It's assumed that the entire PHY package is either C22 or C45.
502- */
503- int __phy_package_read_mmd (struct phy_device * phydev ,
504- unsigned int addr_offset , int devad ,
505- u32 regnum )
506- {
507- int addr = phy_package_address (phydev , addr_offset );
508-
509- if (addr < 0 )
510- return addr ;
511-
512- if (regnum > (u16 )~0 || devad > 32 )
513- return - EINVAL ;
514-
515- return mmd_phy_read (phydev -> mdio .bus , addr , phydev -> is_c45 , devad ,
516- regnum );
517- }
518- EXPORT_SYMBOL (__phy_package_read_mmd );
519-
520- /**
521- * __phy_package_write_mmd - write MMD reg relative to PHY package base addr
522- * @phydev: The phy_device struct
523- * @addr_offset: The offset to be added to PHY package base_addr
524- * @devad: The MMD to write to
525- * @regnum: The register on the MMD to write
526- * @val: value to write to @regnum
527- *
528- * Convenience helper for writing a register of an MMD on a given PHY
529- * using the PHY package base address. The base address is added to
530- * the addr_offset value.
531- *
532- * Same calling rules as for __phy_write();
533- *
534- * NOTE: It's assumed that the entire PHY package is either C22 or C45.
535- */
536- int __phy_package_write_mmd (struct phy_device * phydev ,
537- unsigned int addr_offset , int devad ,
538- u32 regnum , u16 val )
539- {
540- int addr = phy_package_address (phydev , addr_offset );
541-
542- if (addr < 0 )
543- return addr ;
544-
545- if (regnum > (u16 )~0 || devad > 32 )
546- return - EINVAL ;
547-
548- return mmd_phy_write (phydev -> mdio .bus , addr , phydev -> is_c45 , devad ,
549- regnum , val );
550- }
551- EXPORT_SYMBOL (__phy_package_write_mmd );
552-
553490/**
554491 * phy_modify_changed - Function for modifying a PHY register
555492 * @phydev: the phy_device struct
0 commit comments