From: Florian Fainelli <f.fainelli@gmail.com>
To: Wenyou Yang <wenyou.yang@atmel.com>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
nicolas.ferre@atmel.com,
linux-arm-kernel-bounces@lists.infradead.org, johan@kernel.org
Subject: Re: [PATCH] net: phy: micrel: workaround to NAND_Tree# incorrectly strapp-in during the reset period.
Date: Sun, 07 Dec 2014 21:08:56 -0800 [thread overview]
Message-ID: <54853268.6030701@gmail.com> (raw)
In-Reply-To: <1418009740-27384-1-git-send-email-wenyou.yang@atmel.com>
Le 07/12/2014 19:35, Wenyou Yang a écrit :
> Appearance: On some boards, after power up, the Ethernet doesn't work.
>
> Reason: On the SAMA5D4EK, the PIOE2 pin is connected to the NAND_Tree# of KSZ8081,
> But it outputs LOW during the reset period, which cause the NAND_Tree# enabled.
>
> Workaround: In the .config_init(), add code to disable NAND_Tree#
> by operating Operation Mode Strap Override(i.e. Register 16h).
Your patch won't apply cleanly to the net-next tree where the PHY
drivers development is happening, especially not after Johan's recent
changes.
Is not what you are looking for a phy_fixup() rather than clearing this
bit for all Micrel PHYs?
>
> Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
> ---
> drivers/net/phy/micrel.c | 8 +++++++-
> 1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c
> index 8c2a29a..11d72cb 100644
> --- a/drivers/net/phy/micrel.c
> +++ b/drivers/net/phy/micrel.c
> @@ -31,6 +31,7 @@
> /* Operation Mode Strap Override */
> #define MII_KSZPHY_OMSO 0x16
> #define KSZPHY_OMSO_B_CAST_OFF (1 << 9)
> +#define KSZPHY_OMSO_NAND_TREE_OVERRIDE (1 << 5)
> #define KSZPHY_OMSO_RMII_OVERRIDE (1 << 1)
> #define KSZPHY_OMSO_MII_OVERRIDE (1 << 0)
>
> @@ -180,7 +181,12 @@ static int kszphy_setup_led(struct phy_device *phydev,
>
> static int kszphy_config_init(struct phy_device *phydev)
> {
> - return 0;
> + int rc;
> +
> + phy_write(phydev, MII_KSZPHY_OMSO, phy_read(phydev, MII_KSZPHY_OMSO)
> + & (~KSZPHY_OMSO_NAND_TREE_OVERRIDE));
> + rc = ksz_config_flags(phydev);
> + return rc < 0 ? rc : 0;
> }
>
> static int kszphy_config_init_led8041(struct phy_device *phydev)
>
next prev parent reply other threads:[~2014-12-08 5:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-08 3:35 [PATCH] net: phy: micrel: workaround to NAND_Tree# incorrectly strapp-in during the reset period Wenyou Yang
2014-12-08 5:08 ` Florian Fainelli [this message]
2014-12-08 6:38 ` Yang, Wenyou
2014-12-08 6:38 ` Yang, Wenyou
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=54853268.6030701@gmail.com \
--to=f.fainelli@gmail.com \
--cc=johan@kernel.org \
--cc=linux-arm-kernel-bounces@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nicolas.ferre@atmel.com \
--cc=wenyou.yang@atmel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.