netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: "Shengzhou.Liu@freescale.com" <Shengzhou.Liu@freescale.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"joe.hershberger@gmail.com" <joe.hershberger@gmail.com>
Subject: Re: [PATCH] net/phy: refactor RTL8211F initialization
Date: Wed, 22 Apr 2015 21:39:29 -0700	[thread overview]
Message-ID: <55387781.3010707@gmail.com> (raw)
In-Reply-To: <DM2PR03MB398CDA834F4E9BAFE2AF34CF8ED0@DM2PR03MB398.namprd03.prod.outlook.com>

Le 22/04/2015 20:53, Shengzhou.Liu@freescale.com a écrit :
>> -----Original Message-----
>> From: Florian Fainelli [mailto:f.fainelli@gmail.com]
>> Sent: Thursday, April 23, 2015 12:57 AM
>> To: Liu Shengzhou-B36685; netdev@vger.kernel.org; joe.hershberger@gmail.com
>> Subject: Re: [PATCH] net/phy: refactor RTL8211F initialization
>>
>> On 22/04/15 03:22, Shengzhou Liu wrote:
>>> RTL8211F needs to enalbe TXDLY for RGMII during phy initialization, so
>>> move it to rtl8211f_config for early initialization.
>>>
>>> Signed-off-by: Shengzhou Liu <Shengzhou.Liu@freescale.com>
>>> cc: Joe Hershberger <joe.hershberger@gmail.com>
>>> ---
>>>  drivers/net/phy/realtek.c | 25 +++++++++++++++++--------
>>>  1 file changed, 17 insertions(+), 8 deletions(-)
>>>
>>> diff --git a/drivers/net/phy/realtek.c b/drivers/net/phy/realtek.c
>>> index 3917c82..d48095b 100644
>>> --- a/drivers/net/phy/realtek.c
>>> +++ b/drivers/net/phy/realtek.c
>>> @@ -43,6 +43,22 @@ static int rtl8211x_config(struct phy_device *phydev)
>>>  	return 0;
>>>  }
>>>
>>> +static int rtl8211f_config(struct phy_device *phydev) {
>>> +	phy_write(phydev, MDIO_DEVAD_NONE, MII_BMCR, BMCR_RESET);
>>
>> That part of the change is not documented but has to be, and you should use
>> genphy_soft_reset() which also takes care of waiting the required amount of
>> time before BMCR_RESET is cleared.
> 
> There is no genphy_soft_reset() in current u-boot tree. 

Did you mean to submit that against u-boot or Linux? If the latter,
there is absolutely no need to have the same file compile under u-boot
and Linux without changes, that is too restrictive. There is a
genphy_soft_reset() which takes care of waiting for BMCR_RESET to clear,
please use it, there is no guarantee otherwise that a PHY has completed
a reset.
--
Florian

  reply	other threads:[~2015-04-23  4:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-22 10:22 [PATCH] net/phy: refactor RTL8211F initialization Shengzhou Liu
2015-04-22 16:57 ` Florian Fainelli
2015-04-23  3:53   ` Shengzhou.Liu
2015-04-23  4:39     ` Florian Fainelli [this message]
2015-04-23  5:58       ` Shengzhou.Liu

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=55387781.3010707@gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=Shengzhou.Liu@freescale.com \
    --cc=joe.hershberger@gmail.com \
    --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).