Re: [PATCH/RFC net-next] ravb: Avoid unsupported internal delay mode for R-Car E3/D3

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 04/08/2019 11:29 AM, Simon Horman wrote:

> According to the R-Car Gen3 Hardware Manual Errata for Rev 1.00 of
> August 24, 2018,

   Rummaged in Cogent's archives but was unable to find that errata...

> the TX clock internal delay mode isn't supported
> on R-Car E3 (r8a77990) and D3 (r8a77995).
> 
> Based on work by Kazuya Mizuguchi.
> 
> Signed-off-by: Simon Horman <horms+renesas@xxxxxxxxxxxx>
> ---
>  drivers/net/ethernet/renesas/ravb_main.c | 11 +++++++++--
>  1 file changed, 9 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c
> index 4f648394e645..be8af4a382cf 100644
> --- a/drivers/net/ethernet/renesas/ravb_main.c
> +++ b/drivers/net/ethernet/renesas/ravb_main.c
> @@ -1969,6 +1969,12 @@ static void ravb_set_config_mode(struct net_device *ndev)
>  	}
>  }
>  
> +static const struct soc_device_attribute ravb_delay_mode_quirk_match[] = {
> +	{ .soc_id = "r8a77990", .revision = "ES1.*" },
> +	{ .soc_id = "r8a77995", .revision = "ES1.*" },
> +	{ /* sentinel */ }
> +};

   I'm OK with this approach (modulo the revisions)...

[...]
> @@ -1979,8 +1985,9 @@ static void ravb_set_delay_mode(struct net_device *ndev)
>  	    priv->phy_interface == PHY_INTERFACE_MODE_RGMII_RXID)
>  		set |= APSR_DM_RDM;
>  
> -	if (priv->phy_interface == PHY_INTERFACE_MODE_RGMII_ID ||
> -	    priv->phy_interface == PHY_INTERFACE_MODE_RGMII_TXID)
> +	if ((priv->phy_interface == PHY_INTERFACE_MODE_RGMII_ID ||
> +	     priv->phy_interface == PHY_INTERFACE_MODE_RGMII_TXID) &&
> +	    !soc_device_match(ravb_delay_mode_quirk_match))

   But don't we need to error out of the probing as we can't set the delay mode
requested?

>  		set |= APSR_DM_TDM;
>  
>  	ravb_modify(ndev, APSR, APSR_DM, set);

MBR, Sergei



[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux