[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200702132956.GI730739@lunn.ch>
Date: Thu, 2 Jul 2020 15:29:56 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Robert Marko <robert.marko@...tura.hr>
Cc: f.fainelli@...il.com, hkallweit1@...il.com, linux@...linux.org.uk,
davem@...emloft.net, kuba@...nel.org, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-arm-msm@...r.kernel.org,
agross@...nel.org, bjorn.andersson@...aro.org, robh+dt@...nel.org
Subject: Re: [net-next,PATCH 2/4] net: mdio-ipq4019: add clock support
On Thu, Jul 02, 2020 at 12:29:59PM +0200, Robert Marko wrote:
> Some newer SoC-s have a separate MDIO clock that needs to be enabled.
> So lets add support for handling the clocks to the driver.
>
> Signed-off-by: Robert Marko <robert.marko@...tura.hr>
> ---
> drivers/net/phy/mdio-ipq4019.c | 28 +++++++++++++++++++++++++++-
> 1 file changed, 27 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/phy/mdio-ipq4019.c b/drivers/net/phy/mdio-ipq4019.c
> index 0e78830c070b..7660bf006da0 100644
> --- a/drivers/net/phy/mdio-ipq4019.c
> +++ b/drivers/net/phy/mdio-ipq4019.c
> @@ -9,6 +9,7 @@
> #include <linux/iopoll.h>
> #include <linux/of_address.h>
> #include <linux/of_mdio.h>
> +#include <linux/clk.h>
> #include <linux/phy.h>
> #include <linux/platform_device.h>
>
> @@ -24,8 +25,12 @@
> #define IPQ4019_MDIO_TIMEOUT 10000
> #define IPQ4019_MDIO_SLEEP 10
>
> +#define QCA_MDIO_CLK_DEFAULT_RATE 100000000
> +
> struct ipq4019_mdio_data {
> - void __iomem *membase;
> + void __iomem *membase;
> + struct clk *mdio_clk;
> + u32 clk_freq;
Hi Robert
Some sort of tab/space issue here.
> };
>
> static int ipq4019_mdio_wait_busy(struct mii_bus *bus)
> @@ -100,6 +105,7 @@ static int ipq4019_mdio_probe(struct platform_device *pdev)
> {
> struct ipq4019_mdio_data *priv;
> struct mii_bus *bus;
> + struct device_node *np = pdev->dev.of_node;
> int ret;
Reverse Christmas tree.
Andrew
Powered by blists - more mailing lists