All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] ravb: Remove checks for unsupported internal delay modes
@ 2021-08-11 15:49 Geert Uytterhoeven
  2021-08-12  9:30 ` Niklas Söderlund
  2021-08-13 23:20 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Geert Uytterhoeven @ 2021-08-11 15:49 UTC (permalink / raw)
  To: Sergey Shtylyov, David S . Miller, Jakub Kicinski, Yoshihiro Shimoda
  Cc: netdev, linux-renesas-soc, Geert Uytterhoeven

The EtherAVB instances on the R-Car E3/D3 and RZ/G2E SoCs do not support
TX clock internal delay modes, and the EtherAVB driver prints a warning
if an unsupported "rgmii-*id" PHY mode is specified, to catch buggy
DTBs.

Commit a6f51f2efa742df0 ("ravb: Add support for explicit internal
clock delay configuration") deprecated deriving the internal delay mode
from the PHY mode, in favor of explicit configuration using the now
mandatory "rx-internal-delay-ps" and "tx-internal-delay-ps" properties,
thus delegating the warning to the legacy fallback code.

Since explicit configuration of a (valid) internal clock delay
configuration is enforced by validating device tree source files against
DT binding files, and all upstream DTS files have been converted as of
commit a5200e63af57d05e ("arm64: dts: renesas: rzg2: Convert EtherAVB to
explicit delay handling"), the checks in the legacy fallback code can be
removed.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 drivers/net/ethernet/renesas/ravb_main.c | 15 ++-------------
 1 file changed, 2 insertions(+), 13 deletions(-)

diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c
index f4dfe9f71d067533..62b0605f02ff786e 100644
--- a/drivers/net/ethernet/renesas/ravb_main.c
+++ b/drivers/net/ethernet/renesas/ravb_main.c
@@ -1973,13 +1973,6 @@ static void ravb_set_config_mode(struct net_device *ndev)
 	}
 }
 
-static const struct soc_device_attribute ravb_delay_mode_quirk_match[] = {
-	{ .soc_id = "r8a774c0" },
-	{ .soc_id = "r8a77990" },
-	{ .soc_id = "r8a77995" },
-	{ /* sentinel */ }
-};
-
 /* Set tx and rx clock internal delay modes */
 static void ravb_parse_delay_mode(struct device_node *np, struct net_device *ndev)
 {
@@ -2010,12 +2003,8 @@ static void ravb_parse_delay_mode(struct device_node *np, struct net_device *nde
 
 	if (priv->phy_interface == PHY_INTERFACE_MODE_RGMII_ID ||
 	    priv->phy_interface == PHY_INTERFACE_MODE_RGMII_TXID) {
-		if (!WARN(soc_device_match(ravb_delay_mode_quirk_match),
-			  "phy-mode %s requires TX clock internal delay mode which is not supported by this hardware revision. Please update device tree",
-			  phy_modes(priv->phy_interface))) {
-			priv->txcidm = 1;
-			priv->rgmii_override = 1;
-		}
+		priv->txcidm = 1;
+		priv->rgmii_override = 1;
 	}
 }
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] ravb: Remove checks for unsupported internal delay modes
  2021-08-11 15:49 [PATCH net-next] ravb: Remove checks for unsupported internal delay modes Geert Uytterhoeven
@ 2021-08-12  9:30 ` Niklas Söderlund
  2021-08-13 23:20 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Niklas Söderlund @ 2021-08-12  9:30 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Sergey Shtylyov, David S . Miller, Jakub Kicinski,
	Yoshihiro Shimoda, netdev, linux-renesas-soc

Hi Geert,

Thanks for your work.

On 2021-08-11 17:49:00 +0200, Geert Uytterhoeven wrote:
> The EtherAVB instances on the R-Car E3/D3 and RZ/G2E SoCs do not support
> TX clock internal delay modes, and the EtherAVB driver prints a warning
> if an unsupported "rgmii-*id" PHY mode is specified, to catch buggy
> DTBs.
> 
> Commit a6f51f2efa742df0 ("ravb: Add support for explicit internal
> clock delay configuration") deprecated deriving the internal delay mode
> from the PHY mode, in favor of explicit configuration using the now
> mandatory "rx-internal-delay-ps" and "tx-internal-delay-ps" properties,
> thus delegating the warning to the legacy fallback code.
> 
> Since explicit configuration of a (valid) internal clock delay
> configuration is enforced by validating device tree source files against
> DT binding files, and all upstream DTS files have been converted as of
> commit a5200e63af57d05e ("arm64: dts: renesas: rzg2: Convert EtherAVB to
> explicit delay handling"), the checks in the legacy fallback code can be
> removed.
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>

I really like clean-up patches :-)

Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>

> ---
>  drivers/net/ethernet/renesas/ravb_main.c | 15 ++-------------
>  1 file changed, 2 insertions(+), 13 deletions(-)
> 
> diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c
> index f4dfe9f71d067533..62b0605f02ff786e 100644
> --- a/drivers/net/ethernet/renesas/ravb_main.c
> +++ b/drivers/net/ethernet/renesas/ravb_main.c
> @@ -1973,13 +1973,6 @@ static void ravb_set_config_mode(struct net_device *ndev)
>  	}
>  }
>  
> -static const struct soc_device_attribute ravb_delay_mode_quirk_match[] = {
> -	{ .soc_id = "r8a774c0" },
> -	{ .soc_id = "r8a77990" },
> -	{ .soc_id = "r8a77995" },
> -	{ /* sentinel */ }
> -};
> -
>  /* Set tx and rx clock internal delay modes */
>  static void ravb_parse_delay_mode(struct device_node *np, struct net_device *ndev)
>  {
> @@ -2010,12 +2003,8 @@ static void ravb_parse_delay_mode(struct device_node *np, struct net_device *nde
>  
>  	if (priv->phy_interface == PHY_INTERFACE_MODE_RGMII_ID ||
>  	    priv->phy_interface == PHY_INTERFACE_MODE_RGMII_TXID) {
> -		if (!WARN(soc_device_match(ravb_delay_mode_quirk_match),
> -			  "phy-mode %s requires TX clock internal delay mode which is not supported by this hardware revision. Please update device tree",
> -			  phy_modes(priv->phy_interface))) {
> -			priv->txcidm = 1;
> -			priv->rgmii_override = 1;
> -		}
> +		priv->txcidm = 1;
> +		priv->rgmii_override = 1;
>  	}
>  }
>  
> -- 
> 2.25.1
> 

-- 
Regards,
Niklas Söderlund

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] ravb: Remove checks for unsupported internal delay modes
  2021-08-11 15:49 [PATCH net-next] ravb: Remove checks for unsupported internal delay modes Geert Uytterhoeven
  2021-08-12  9:30 ` Niklas Söderlund
@ 2021-08-13 23:20 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-08-13 23:20 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: s.shtylyov, davem, kuba, yoshihiro.shimoda.uh, netdev, linux-renesas-soc

Hello:

This patch was applied to netdev/net-next.git (refs/heads/master):

On Wed, 11 Aug 2021 17:49:00 +0200 you wrote:
> The EtherAVB instances on the R-Car E3/D3 and RZ/G2E SoCs do not support
> TX clock internal delay modes, and the EtherAVB driver prints a warning
> if an unsupported "rgmii-*id" PHY mode is specified, to catch buggy
> DTBs.
> 
> Commit a6f51f2efa742df0 ("ravb: Add support for explicit internal
> clock delay configuration") deprecated deriving the internal delay mode
> from the PHY mode, in favor of explicit configuration using the now
> mandatory "rx-internal-delay-ps" and "tx-internal-delay-ps" properties,
> thus delegating the warning to the legacy fallback code.
> 
> [...]

Here is the summary with links:
  - [net-next] ravb: Remove checks for unsupported internal delay modes
    https://git.kernel.org/netdev/net-next/c/44e5d0881280

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-08-13 23:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-11 15:49 [PATCH net-next] ravb: Remove checks for unsupported internal delay modes Geert Uytterhoeven
2021-08-12  9:30 ` Niklas Söderlund
2021-08-13 23:20 ` patchwork-bot+netdevbpf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.