diff options
author | Florian Fainelli <florian.fainelli@broadcom.com> | 2024-02-19 23:40:52 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2024-02-21 15:46:17 +0300 |
commit | ee2b4cf8b281606bbf332cbd73ce2a73eac417f0 (patch) | |
tree | 73cdef385d628f051d97c6b3983668103bc3750a /drivers/net/ethernet/broadcom | |
parent | ee975351cf0c2a11cdf97eae58265c126cb32850 (diff) | |
download | linux-ee2b4cf8b281606bbf332cbd73ce2a73eac417f0.tar.xz |
net: bcmgenet: Pass "main" clock down to the MDIO driver
GENET has historically had to create a MDIO platform device for its
controller and pass some auxiliary data to it, like a MDIO completion
callback. Now we also pass the "main" clock to allow for the MDIO bus
controller to manage that clock adequately around I/O accesses.
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/broadcom')
-rw-r--r-- | drivers/net/ethernet/broadcom/genet/bcmmii.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/ethernet/broadcom/genet/bcmmii.c b/drivers/net/ethernet/broadcom/genet/bcmmii.c index cbbe004621bc..7a21950da77c 100644 --- a/drivers/net/ethernet/broadcom/genet/bcmmii.c +++ b/drivers/net/ethernet/broadcom/genet/bcmmii.c @@ -476,6 +476,10 @@ static int bcmgenet_mii_register(struct bcmgenet_priv *priv) ppd.wait_func = bcmgenet_mii_wait; ppd.wait_func_data = priv; ppd.bus_name = "bcmgenet MII bus"; + /* Pass a reference to our "main" clock which is used for MDIO + * transfers + */ + ppd.clk = priv->clk; /* Unimac MDIO bus controller starts at UniMAC offset + MDIO_CMD * and is 2 * 32-bits word long, 8 bytes total. |