linux-mips.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "René van Dorst" <opensource@vdorst.com>
To: sean.wang@mediatek.com, f.fainelli@gmail.com,
	linux@armlinux.org.uk, davem@davemloft.net,
	matthias.bgg@gmail.com, andrew@lunn.ch, vivien.didelot@gmail.com
Cc: frank-w@public-files.de, netdev@vger.kernel.org,
	linux-mediatek@lists.infradead.org, linux-mips@vger.kernel.org
Subject: Re: [PATCH] net: ethernet: mediatek: Allow non TRGMII mode with MT7621 DDR2 devices
Date: Mon, 01 Jul 2019 12:57:52 +0000	[thread overview]
Message-ID: <20190701125752.Horde.M4sGI0OXZNgSa9VpOKj-m3s@www.vdorst.com> (raw)
In-Reply-To: <20190629122451.19578-1-opensource@vdorst.com>

Quoting René van Dorst <opensource@vdorst.com>:

I see that I also forgot to tag this patch for net-next.

Greats,

René

> No reason to error out on a MT7621 device with DDR2 memory when non
> TRGMII mode is selected.
> Only MT7621 DDR2 clock setup is not supported for TRGMII mode.
> But non TRGMII mode doesn't need any special clock setup.
>
> Signed-off-by: René van Dorst <opensource@vdorst.com>
> ---
>  drivers/net/ethernet/mediatek/mtk_eth_soc.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c  
> b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
> index 066712f2e985..b20b3a5a1ebb 100644
> --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
> +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
> @@ -139,9 +139,12 @@ static int mt7621_gmac0_rgmii_adjust(struct  
> mtk_eth *eth,
>  {
>  	u32 val;
>
> -	/* Check DDR memory type. Currently DDR2 is not supported. */
> +	/* Check DDR memory type.
> +	 * Currently TRGMII mode with DDR2 memory is not supported.
> +	 */
>  	regmap_read(eth->ethsys, ETHSYS_SYSCFG, &val);
> -	if (val & SYSCFG_DRAM_TYPE_DDR2) {
> +	if (interface == PHY_INTERFACE_MODE_TRGMII &&
> +	    val & SYSCFG_DRAM_TYPE_DDR2) {
>  		dev_err(eth->dev,
>  			"TRGMII mode with DDR2 memory is not supported!\n");
>  		return -EOPNOTSUPP;
> --
> 2.20.1




  reply	other threads:[~2019-07-01 12:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-29 12:24 [PATCH] net: ethernet: mediatek: Allow non TRGMII mode with MT7621 DDR2 devices René van Dorst
2019-07-01 12:57 ` René van Dorst [this message]
2019-07-02 21:06 ` David Miller

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=20190701125752.Horde.M4sGI0OXZNgSa9VpOKj-m3s@www.vdorst.com \
    --to=opensource@vdorst.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=frank-w@public-files.de \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=matthias.bgg@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=sean.wang@mediatek.com \
    --cc=vivien.didelot@gmail.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).