diff mbox series

net: ftgmac100: Add support for board specific PHY interface address

Message ID 20200818000826.29865-1-thiruan@linux.microsoft.com
State Accepted
Commit 66e036bab503cddd6afbfecc8b7fcd8941d8bd7d
Delegated to: Tom Rini
Headers show
Series net: ftgmac100: Add support for board specific PHY interface address | expand

Commit Message

Thirupathaiah Annapureddy Aug. 18, 2020, 12:08 a.m. UTC
ftgmac100 driver is using hard-coded PHY interface address of zero.
Each board can have different PHY interface address (phy_addr).
This commit modifies the driver to make use of board specific address
by leveraging CONFIG_PHY_ADDR.

Signed-off-by: Thirupathaiah Annapureddy <thiruan@linux.microsoft.com>
---
 drivers/net/ftgmac100.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Cédric Le Goater Aug. 22, 2020, 3:13 p.m. UTC | #1
On 8/18/20 2:08 AM, Thirupathaiah Annapureddy wrote:
> ftgmac100 driver is using hard-coded PHY interface address of zero.
> Each board can have different PHY interface address (phy_addr).
> This commit modifies the driver to make use of board specific address
> by leveraging CONFIG_PHY_ADDR.
> 
> Signed-off-by: Thirupathaiah Annapureddy <thiruan@linux.microsoft.com>

Reviewed-by: Cédric Le Goater <clg@kaod.org>

Thanks,

C.

> ---
>  drivers/net/ftgmac100.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/net/ftgmac100.c b/drivers/net/ftgmac100.c
> index 5676a5b3ba..00bda24f1f 100644
> --- a/drivers/net/ftgmac100.c
> +++ b/drivers/net/ftgmac100.c
> @@ -551,6 +551,10 @@ static int ftgmac100_probe(struct udevice *dev)
>  	priv->max_speed = pdata->max_speed;
>  	priv->phy_addr = 0;
>  
> +#ifdef CONFIG_PHY_ADDR
> +	priv->phy_addr = CONFIG_PHY_ADDR;
> +#endif
> +
>  	ret = clk_enable_bulk(&priv->clks);
>  	if (ret)
>  		goto out;
>
Thirupathaiah Annapureddy Sept. 29, 2020, 1:56 a.m. UTC | #2
Hi Tom/Joe,

Is this going to be applied to u-boot/next or u-boot-net?

Best Regards,
Thiru

On 8/17/2020 5:08 PM, Thirupathaiah Annapureddy wrote:
> ftgmac100 driver is using hard-coded PHY interface address of zero.
> Each board can have different PHY interface address (phy_addr).
> This commit modifies the driver to make use of board specific address
> by leveraging CONFIG_PHY_ADDR.
> 
> Signed-off-by: Thirupathaiah Annapureddy <thiruan@linux.microsoft.com>
> ---
>  drivers/net/ftgmac100.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/net/ftgmac100.c b/drivers/net/ftgmac100.c
> index 5676a5b3ba..00bda24f1f 100644
> --- a/drivers/net/ftgmac100.c
> +++ b/drivers/net/ftgmac100.c
> @@ -551,6 +551,10 @@ static int ftgmac100_probe(struct udevice *dev)
>  	priv->max_speed = pdata->max_speed;
>  	priv->phy_addr = 0;
>  
> +#ifdef CONFIG_PHY_ADDR
> +	priv->phy_addr = CONFIG_PHY_ADDR;
> +#endif
> +
>  	ret = clk_enable_bulk(&priv->clks);
>  	if (ret)
>  		goto out;
>
Tom Rini Oct. 1, 2020, 2:09 p.m. UTC | #3
On Mon, Aug 17, 2020 at 05:08:26PM -0700, Thirupathaiah Annapureddy wrote:

> ftgmac100 driver is using hard-coded PHY interface address of zero.
> Each board can have different PHY interface address (phy_addr).
> This commit modifies the driver to make use of board specific address
> by leveraging CONFIG_PHY_ADDR.
> 
> Signed-off-by: Thirupathaiah Annapureddy <thiruan@linux.microsoft.com>
> Reviewed-by: Cédric Le Goater <clg@kaod.org>

Applied to u-boot/next, thanks!
diff mbox series

Patch

diff --git a/drivers/net/ftgmac100.c b/drivers/net/ftgmac100.c
index 5676a5b3ba..00bda24f1f 100644
--- a/drivers/net/ftgmac100.c
+++ b/drivers/net/ftgmac100.c
@@ -551,6 +551,10 @@  static int ftgmac100_probe(struct udevice *dev)
 	priv->max_speed = pdata->max_speed;
 	priv->phy_addr = 0;
 
+#ifdef CONFIG_PHY_ADDR
+	priv->phy_addr = CONFIG_PHY_ADDR;
+#endif
+
 	ret = clk_enable_bulk(&priv->clks);
 	if (ret)
 		goto out;