netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Veli-Pekka Peltola <veli-pekka.peltola@bluegiga.com>
To: Richard Zhao <richard.zhao@freescale.com>
Cc: patches@linaro.org, netdev@vger.kernel.org, jgq516@gmail.com,
	eric.miao@linaro.org, Richard Zhao <richard.zhao@linaro.org>,
	shawn.guo@linaro.org, Fabio Estevam <festevam@gmail.com>,
	davem@davemloft.net, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 1/1] net/fec: add KSZ9021RN phy fixup
Date: Mon, 12 Dec 2011 16:42:07 +0200	[thread overview]
Message-ID: <4EE612BF.9050907@bluegiga.com> (raw)
In-Reply-To: <20111212135119.GE16835@b20223-02.ap.freescale.net>

On 12/12/2011 03:51 PM, Richard Zhao wrote:
> On Mon, Dec 12, 2011 at 10:56:48AM -0200, Fabio Estevam wrote:
>> On Mon, Dec 12, 2011 at 8:09 AM, Richard Zhao<richard.zhao@linaro.org>  wrote:
>>> For imx6q sabrelite board, set phy RGMII pad skew.
>>>
>>> Signed-off-by: Richard Zhao<richard.zhao@linaro.org>
>>> ---
>>>   drivers/net/ethernet/freescale/fec.c |   19 +++++++++++++++++++
>>>   1 files changed, 19 insertions(+), 0 deletions(-)
>>>
>>> diff --git a/drivers/net/ethernet/freescale/fec.c b/drivers/net/ethernet/freescale/fec.c
>>> index 112af9b..d3b4463 100644
>>> --- a/drivers/net/ethernet/freescale/fec.c
>>> +++ b/drivers/net/ethernet/freescale/fec.c
>>> @@ -1513,6 +1513,21 @@ static inline void fec_reset_phy(struct platform_device *pdev)
>>>   }
>>>   #endif /* CONFIG_OF */
>>>
>>> +/* For imx6q sabrelite board: set KSZ9021RN RGMII pad skew */
>>> +static int ksz9021rn_phy_fixup(struct phy_device *phydev)
>>> +{
>>> +       /* min rx data delay */
>>> +       phy_write(phydev, 0x0b, 0x8105);
>>> +       phy_write(phydev, 0x0c, 0x0000);
>>> +
>>> +       /* max rx/tx clock delay, min rx/tx control delay */
>>> +       phy_write(phydev, 0x0b, 0x8104);
>>> +       phy_write(phydev, 0x0c, 0xf0f0);
>>> +       phy_write(phydev, 0x0b, 0x104);
>>> +
>>> +       return 0;
>>
>> This should go to drivers/net/phy/micrel.c.
> Why? It's specific to fec.

For me it seems to be a board specific and should be placed to the 
machine file. Please include linux/micrel_phy.h and use proper defines 
(PHY_ID_KSZ9021, MICREL_PHY_ID_MASK).

--
Veli-Pekka Peltola

  reply	other threads:[~2011-12-12 14:42 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-12 10:09 [PATCH 1/1] net/fec: add KSZ9021RN phy fixup Richard Zhao
2011-12-12 12:56 ` Fabio Estevam
2011-12-12 13:51   ` Richard Zhao
2011-12-12 14:42     ` Veli-Pekka Peltola [this message]
2011-12-13  2:10       ` Richard Zhao
2011-12-13  2:36         ` Shawn Guo
2011-12-13  2:29           ` Jason Liu
2011-12-13  2:47             ` Shawn Guo
2011-12-13  8:28               ` Richard Zhao

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=4EE612BF.9050907@bluegiga.com \
    --to=veli-pekka.peltola@bluegiga.com \
    --cc=davem@davemloft.net \
    --cc=eric.miao@linaro.org \
    --cc=festevam@gmail.com \
    --cc=jgq516@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=netdev@vger.kernel.org \
    --cc=patches@linaro.org \
    --cc=richard.zhao@freescale.com \
    --cc=richard.zhao@linaro.org \
    --cc=shawn.guo@linaro.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).