mbox series

[v3,0/2] net: mdio-ipq4019: add Clause 45 support

Message ID 20200918205633.2698654-1-robert.marko@sartura.hr
Headers show
Series net: mdio-ipq4019: add Clause 45 support | expand

Message

Robert Marko Sept. 18, 2020, 8:56 p.m. UTC
This patch series adds support for Clause 45 to the driver.

While at it also change some defines to upper case to match rest of the driver.

Changes since v1:
* Drop clock patches, these need further investigation and
no user for non default configuration has been found

Robert Marko (2):
  net: mdio-ipq4019: change defines to upper case
  net: mdio-ipq4019: add Clause 45 support

 drivers/net/phy/mdio-ipq4019.c | 109 ++++++++++++++++++++++++++++-----
 1 file changed, 92 insertions(+), 17 deletions(-)

Comments

Andrew Lunn Sept. 20, 2020, 12:19 a.m. UTC | #1
> +
> +/* 0 = Clause 22, 1 = Clause 45 */
> +#define MDIO_MODE_BIT				BIT(8)

How about calling this MDIO_MODE_C45

> +		/* Enter Clause 45 mode */
> +		data = readl(priv->membase + MDIO_MODE_REG);
> +
> +		data |= MDIO_MODE_BIT;
> +
> +		writel(data, priv->membase + MDIO_MODE_REG);

It then becomes clearer what this does.

Otherwise this looks O.K.

	  Andrew
Robert Marko Sept. 20, 2020, 2:18 p.m. UTC | #2
On Sun, Sep 20, 2020 at 2:19 AM Andrew Lunn <andrew@lunn.ch> wrote:
>
> > +
> > +/* 0 = Clause 22, 1 = Clause 45 */
> > +#define MDIO_MODE_BIT                                BIT(8)
>
> How about calling this MDIO_MODE_C45

Good idea, will rename it.

>
> > +             /* Enter Clause 45 mode */
> > +             data = readl(priv->membase + MDIO_MODE_REG);
> > +
> > +             data |= MDIO_MODE_BIT;
> > +
> > +             writel(data, priv->membase + MDIO_MODE_REG);
>
> It then becomes clearer what this does.
>
> Otherwise this looks O.K.
>
>           Andrew

v4 has been pushed to address your comment
Regards,
Robert