linux-stable/drivers/net/phy/mscc
Christian Marangi 9eea577eb1 net: phy: extend PHY package API to support multiple global address
Current API for PHY package are limited to single address to configure
global settings for the PHY package.

It was found that some PHY package (for example the qca807x, a PHY
package that is shipped with a bundle of 5 PHY) requires multiple PHY
address to configure global settings. An example scenario is a PHY that
have a dedicated PHY for PSGMII/serdes calibrarion and have a specific
PHY in the package where the global PHY mode is set and affects every
other PHY in the package.

Change the API in the following way:
- Change phy_package_join() to take the base addr of the PHY package
  instead of the global PHY addr.
- Make __/phy_package_write/read() require an additional arg that
  select what global PHY address to use by passing the offset from the
  base addr passed on phy_package_join().

Each user of this API is updated to follow this new implementation
following a pattern where an enum is defined to declare the offset of the
addr.

We also drop the check if shared is defined as any user of the
phy_package_read/write is expected to use phy_package_join first. Misuse
of this will correctly trigger a kernel panic for NULL pointer
exception.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2023-12-17 20:10:07 +00:00
..
Makefile net: phy: mscc: improved serdes calibration applied to VSC8514 2021-02-16 14:06:18 -08:00
mscc.h net: phy: extend PHY package API to support multiple global address 2023-12-17 20:10:07 +00:00
mscc_fc_buffer.h net: phy: mscc: fix copyright and author information in MACsec 2020-06-24 14:33:16 -07:00
mscc_mac.h net: phy: mscc: fix copyright and author information in MACsec 2020-06-24 14:33:16 -07:00
mscc_macsec.c net: phy: mscc: macsec: reject PN update requests 2023-10-10 10:30:31 +02:00
mscc_macsec.h net: phy: mscc: macsec: do not copy encryption keys 2022-11-18 09:17:42 +00:00
mscc_main.c net: phy: extend PHY package API to support multiple global address 2023-12-17 20:10:07 +00:00
mscc_ptp.c net: partial revert of the "Make timestamping selectable: series 2023-11-18 18:42:37 -08:00
mscc_ptp.h net: phy: mscc: use new PTP_MSGTYPE_* defines 2020-11-25 12:23:21 -08:00
mscc_serdes.c net: phy: mscc: improved serdes calibration applied to VSC8514 2021-02-16 14:06:18 -08:00
mscc_serdes.h net: phy: mscc: improved serdes calibration applied to VSC8514 2021-02-16 14:06:18 -08:00