[PATCH 1/3] net: dwc_eth_qos: remove use of DWC_NET_PHYADDR

Ramon Fried rfried.dev at gmail.com
Mon May 16 02:30:45 CEST 2022


On Thu, May 12, 2022 at 10:34 AM Rasmus Villemoes
<rasmus.villemoes at prevas.dk> wrote:
>
> Only two boards in the tree set the macro DWC_NET_PHYADDR. Both have
> CONFIG_DM_ETH_PHY=y, so should set the phy address in DT if necessary.
>
> The imx8mp_evk does set the correct address in device tree.
>
> The other board seems to be a copy-paste-adapt from an old
> version of the imx8mp_evk config header, given the "#ifdef
> CONFIG_DWC_ETH_QOS" block that has been removed from imx8mp_evk header
> in commit 127fb454955. Its device tree doesn't even enable (i.e., set
> 'status = "okay"') the &eqos node. But the other ethernet device,
> &fec, does get enabled, and does have a phy sitting at address 4 (and
> it also has a corresponding legacy #define CONFIG_FEC_MXC_PHYADDR
> 4). So I believe it should be completely safe to remove it from there
> as well.
>
> Signed-off-by: Rasmus Villemoes <rasmus.villemoes at prevas.dk>
> ---
>  drivers/net/dwc_eth_qos.c        | 3 ---
>  include/configs/imx8mp_evk.h     | 2 --
>  include/configs/imx8mp_rsb3720.h | 1 -
>  3 files changed, 6 deletions(-)
>
> diff --git a/drivers/net/dwc_eth_qos.c b/drivers/net/dwc_eth_qos.c
> index 9d255cf95f..27b3f98e0e 100644
> --- a/drivers/net/dwc_eth_qos.c
> +++ b/drivers/net/dwc_eth_qos.c
> @@ -1081,9 +1081,6 @@ static int eqos_start(struct udevice *dev)
>                 int addr = -1;
>  #ifdef CONFIG_DM_ETH_PHY
>                 addr = eth_phy_get_addr(dev);
> -#endif
> -#ifdef DWC_NET_PHYADDR
> -               addr = DWC_NET_PHYADDR;
>  #endif
>                 eqos->phy = phy_connect(eqos->mii, addr, dev,
>                                         eqos->config->interface(dev));
> diff --git a/include/configs/imx8mp_evk.h b/include/configs/imx8mp_evk.h
> index cc8d65cb54..f846c55d9c 100644
> --- a/include/configs/imx8mp_evk.h
> +++ b/include/configs/imx8mp_evk.h
> @@ -34,8 +34,6 @@
>  #define CONFIG_FEC_MXC_PHYADDR          1
>  #define FEC_QUIRK_ENET_MAC
>
> -#define DWC_NET_PHYADDR                        1
> -
>  #define PHY_ANEG_TIMEOUT 20000
>
>  #endif
> diff --git a/include/configs/imx8mp_rsb3720.h b/include/configs/imx8mp_rsb3720.h
> index c5dd545471..5608491b44 100644
> --- a/include/configs/imx8mp_rsb3720.h
> +++ b/include/configs/imx8mp_rsb3720.h
> @@ -53,7 +53,6 @@
>  #define CONFIG_FEC_MXC_PHYADDR          4
>  #define FEC_QUIRK_ENET_MAC
>
> -#define DWC_NET_PHYADDR                        4
>  #ifdef CONFIG_DWC_ETH_QOS
>  #define CONFIG_SYS_NONCACHED_MEMORY     (1 * SZ_1M)     /* 1M */
>  #endif
> --
> 2.31.1
>
Reviewed-by: Ramon Fried <rfried.dev at gmail.com>


More information about the U-Boot mailing list