netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Simon Horman <horms+renesas@verge.net.au>,
	netdev@vger.kernel.org, linux-renesas-soc@vger.kernel.org
Cc: Magnus Damm <magnus.damm@gmail.com>,
	Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>,
	Wolfram Sang <wsa+renesas@sang-engineering.com>
Subject: Re: [PATCH/RFC net-next] ravb: Avoid unsupported internal delay mode for R-Car E3/D3
Date: Mon, 8 Apr 2019 20:39:14 +0300	[thread overview]
Message-ID: <12616e19-9127-39db-4346-be642c87b596@cogentembedded.com> (raw)
In-Reply-To: <20190408082928.22840-1-horms+renesas@verge.net.au>

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@verge.net.au>
> ---
>  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

  parent reply	other threads:[~2019-04-08 17:39 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-08  8:29 [PATCH/RFC net-next] ravb: Avoid unsupported internal delay mode for R-Car E3/D3 Simon Horman
2019-04-08  9:01 ` Wolfram Sang
2019-04-08  9:48   ` Simon Horman
2019-04-08 11:12     ` Wolfram Sang
2019-04-08 13:02       ` Simon Horman
2019-04-08 13:40         ` Wolfram Sang
2019-04-08 17:39 ` Sergei Shtylyov [this message]
2019-04-08 17:49   ` Andrew Lunn
2019-04-09 10:45     ` Simon Horman
2019-04-09 15:03       ` Sergei Shtylyov
2019-04-10  9:37         ` Simon Horman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=12616e19-9127-39db-4346-be642c87b596@cogentembedded.com \
    --to=sergei.shtylyov@cogentembedded.com \
    --cc=horms+renesas@verge.net.au \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=magnus.damm@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=wsa+renesas@sang-engineering.com \
    --cc=yoshihiro.shimoda.uh@renesas.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).