Re: [RFC net-next 2/2] net: phy: bcm7xxx: request and manage GPHY clock

2020-09-03 Thread Florian Fainelli
On 9/3/2020 1:09 PM, Adam Rudziński wrote: W dniu 2020-09-03 o 21:35, Florian Fainelli pisze: On 9/3/2020 12:21 PM, Adam Rudziński wrote: W dniu 2020-09-03 o 19:17, Florian Fainelli pisze: On 9/3/2020 10:13 AM, Adam Rudziński wrote: W dniu 2020-09-03 o 17:21, Florian Fainelli pisze:

Re: [RFC net-next 2/2] net: phy: bcm7xxx: request and manage GPHY clock

2020-09-03 Thread Adam Rudziński
W dniu 2020-09-03 o 21:35, Florian Fainelli pisze: On 9/3/2020 12:21 PM, Adam Rudziński wrote: W dniu 2020-09-03 o 19:17, Florian Fainelli pisze: On 9/3/2020 10:13 AM, Adam Rudziński wrote: W dniu 2020-09-03 o 17:21, Florian Fainelli pisze: On 9/2/2020 11:00 PM, Adam Rudziński wrote

Re: [RFC net-next 2/2] net: phy: bcm7xxx: request and manage GPHY clock

2020-09-03 Thread Florian Fainelli
On 9/3/2020 12:21 PM, Adam Rudziński wrote: W dniu 2020-09-03 o 19:17, Florian Fainelli pisze: On 9/3/2020 10:13 AM, Adam Rudziński wrote: W dniu 2020-09-03 o 17:21, Florian Fainelli pisze: On 9/2/2020 11:00 PM, Adam Rudziński wrote: W dniu 2020-09-03 o 04:13, Florian Fainelli pisze

Re: [RFC net-next 2/2] net: phy: bcm7xxx: request and manage GPHY clock

2020-09-03 Thread Adam Rudziński
W dniu 2020-09-03 o 19:17, Florian Fainelli pisze: On 9/3/2020 10:13 AM, Adam Rudziński wrote: W dniu 2020-09-03 o 17:21, Florian Fainelli pisze: On 9/2/2020 11:00 PM, Adam Rudziński wrote: W dniu 2020-09-03 o 04:13, Florian Fainelli pisze: On 9/2/2020 3:20 PM, Andrew Lunn wrote: + 

Re: [RFC net-next 2/2] net: phy: bcm7xxx: request and manage GPHY clock

2020-09-03 Thread Florian Fainelli
On 9/3/2020 10:13 AM, Adam Rudziński wrote: W dniu 2020-09-03 o 17:21, Florian Fainelli pisze: On 9/2/2020 11:00 PM, Adam Rudziński wrote: W dniu 2020-09-03 o 04:13, Florian Fainelli pisze: On 9/2/2020 3:20 PM, Andrew Lunn wrote: +    priv->clk = devm_clk_get_optional(&phydev->mdio.d

Re: [RFC net-next 2/2] net: phy: bcm7xxx: request and manage GPHY clock

2020-09-03 Thread Adam Rudziński
W dniu 2020-09-03 o 17:21, Florian Fainelli pisze: On 9/2/2020 11:00 PM, Adam Rudziński wrote: W dniu 2020-09-03 o 04:13, Florian Fainelli pisze: On 9/2/2020 3:20 PM, Andrew Lunn wrote: +    priv->clk = devm_clk_get_optional(&phydev->mdio.dev, "sw_gphy"); +    if (IS_ERR(priv->clk)) +  

Re: [RFC net-next 2/2] net: phy: bcm7xxx: request and manage GPHY clock

2020-09-03 Thread Florian Fainelli
On 9/2/2020 11:00 PM, Adam Rudziński wrote: W dniu 2020-09-03 o 04:13, Florian Fainelli pisze: On 9/2/2020 3:20 PM, Andrew Lunn wrote: +    priv->clk = devm_clk_get_optional(&phydev->mdio.dev, "sw_gphy"); +    if (IS_ERR(priv->clk)) +    return PTR_ERR(priv->clk); + +    /* To get the

Re: [RFC net-next 2/2] net: phy: bcm7xxx: request and manage GPHY clock

2020-09-02 Thread Adam Rudziński
W dniu 2020-09-03 o 04:13, Florian Fainelli pisze: On 9/2/2020 3:20 PM, Andrew Lunn wrote: +    priv->clk = devm_clk_get_optional(&phydev->mdio.dev, "sw_gphy"); +    if (IS_ERR(priv->clk)) +    return PTR_ERR(priv->clk); + +    /* To get there, the mdiobus registration logic already enab

Re: [RFC net-next 2/2] net: phy: bcm7xxx: request and manage GPHY clock

2020-09-02 Thread Florian Fainelli
On 9/2/2020 3:20 PM, Andrew Lunn wrote: + priv->clk = devm_clk_get_optional(&phydev->mdio.dev, "sw_gphy"); + if (IS_ERR(priv->clk)) + return PTR_ERR(priv->clk); + + /* To get there, the mdiobus registration logic already enabled our +* clock otherwise we

Re: [RFC net-next 2/2] net: phy: bcm7xxx: request and manage GPHY clock

2020-09-02 Thread Andrew Lunn
> + priv->clk = devm_clk_get_optional(&phydev->mdio.dev, "sw_gphy"); > + if (IS_ERR(priv->clk)) > + return PTR_ERR(priv->clk); > + > + /* To get there, the mdiobus registration logic already enabled our > + * clock otherwise we would not have probed this device since we

[RFC net-next 2/2] net: phy: bcm7xxx: request and manage GPHY clock

2020-09-02 Thread Florian Fainelli
The internal Gigabit PHY on Broadcom STB chips has a digital clock which drives its MDIO interface among other things, the driver now requests and manage that clock during .probe() and .remove() accordingly. Signed-off-by: Florian Fainelli --- drivers/net/phy/bcm7xxx.c | 29 +