netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Greg Ungerer <gerg@linux-m68k.org>
Cc: Chris Heally <cphealy@gmail.com>,
	netdev@vger.kernel.org, Fugang Duan <fugang.duan@nxp.com>
Subject: Re: [PATCH] net: ethernet: fec: Replace interrupt driven MDIO with polled IO
Date: Wed, 21 Oct 2020 15:37:58 +0200	[thread overview]
Message-ID: <20201021133758.GL139700@lunn.ch> (raw)
In-Reply-To: <9fa61ea8-11b4-ef3c-c04e-cb124490c9ae@linux-m68k.org>

> +	if (fep->quirks & FEC_QUIRK_CLEAR_SETUP_MII) {
> +		/* Clear MMFR to avoid to generate MII event by writing MSCR.
> +		 * MII event generation condition:
> +		 * - writing MSCR:
> +		 *	- mmfr[31:0]_not_zero & mscr[7:0]_is_zero &
> +		 *	  mscr_reg_data_in[7:0] != 0
> +		 * - writing MMFR:
> +		 *	- mscr[7:0]_not_zero
> +		 */
> +		writel(0, fep->hwp + FEC_MII_DATA);
> +	}

Hi Greg

The last time we discussed this, we decided that if you cannot do the
quirk, you need to wait around for an MDIO interrupt, e.g. call
fec_enet_mdio_wait() after setting FEC_MII_SPEED register.

>  
>  	writel(fep->phy_speed, fep->hwp + FEC_MII_SPEED);

	Andrew

  parent reply	other threads:[~2020-10-21 13:38 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-20  2:14 [PATCH] net: ethernet: fec: Replace interrupt driven MDIO with polled IO Greg Ungerer
2020-10-20  2:40 ` Andrew Lunn
2020-10-20  3:02   ` [EXT] " Andy Duan
2020-10-20 13:06     ` Chris Healy
2020-10-20 13:52       ` Andy Duan
2020-10-20 13:08     ` Andrew Lunn
2020-10-21  1:51   ` Greg Ungerer
2020-10-21  2:19     ` [EXT] " Andy Duan
2020-10-21  2:37       ` Greg Ungerer
2020-10-21 13:37     ` Andrew Lunn [this message]
2020-10-22  1:14       ` Greg Ungerer
2020-10-22  2:39         ` [EXT] " Andy Duan
2020-10-22  9:04         ` Andy Duan
2020-10-27  0:17           ` Greg Ungerer
2020-10-27  1:33             ` Andy Duan
  -- strict thread matches above, loose matches on Subject: below --
2020-04-14  0:45 Andrew Lunn
2020-04-14 23:38 ` David Miller
2020-04-15  0:20   ` Andrew Lunn
2020-04-27 15:19 ` Leonard Crestez
2020-04-27 15:29   ` Andy Duan
2020-04-27 15:37   ` Andrew Lunn
2020-04-27 16:37   ` Andrew Lunn
2020-04-27 16:48     ` Fabio Estevam
2020-04-27 16:46   ` Andrew Lunn
2020-04-27 20:00     ` Leonard Crestez
2020-04-27 20:13       ` Andrew Lunn

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=20201021133758.GL139700@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=cphealy@gmail.com \
    --cc=fugang.duan@nxp.com \
    --cc=gerg@linux-m68k.org \
    --cc=netdev@vger.kernel.org \
    /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).