From: Michal Simek <monstr@monstr.eu>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 3/6] net: phy: realtek: Use generic genphy_parse_link() for RTL8211E
Date: Mon, 22 Feb 2016 16:15:50 +0100 [thread overview]
Message-ID: <56CB2626.3090600@monstr.eu> (raw)
In-Reply-To: <49e06584fffd21613ec604becdf372e8b2c32bd0.1455359979.git.monstr@monstr.eu>
On 13.2.2016 11:39, Michal Simek wrote:
> The problem with current implementation is that SPDDONE bit is 1
> but link bit is zero. That's why phydev->link is setup to 0
> which ending up in driver failure that link is not up.
>
> Log:
> Zynq> dhcp
> ethernet at e000b000 Waiting for PHY auto negotiation to complete.......
> done
> ethernet at e000b000: No link.
>
> There is at least 1ms delay between spddone bit and link up.
>
> Use genphy_read_status() instead of realtek implemenation which is
> working with page 11. Linux driver is also using generic implementation.
>
> Signed-off-by: Michal Simek <monstr@monstr.eu>
> ---
>
> drivers/net/phy/realtek.c | 10 +++++++++-
> 1 file changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/phy/realtek.c b/drivers/net/phy/realtek.c
> index bba48da4099f..259a87fcc59e 100644
> --- a/drivers/net/phy/realtek.c
> +++ b/drivers/net/phy/realtek.c
> @@ -203,6 +203,14 @@ static int rtl8211x_startup(struct phy_device *phydev)
> return 0;
> }
>
> +static int rtl8211e_startup(struct phy_device *phydev)
> +{
> + genphy_update_link(phydev);
> + genphy_parse_link(phydev);
> +
> + return 0;
> +}
> +
> static int rtl8211f_startup(struct phy_device *phydev)
> {
> /* Read the Status (2x to make sure link is right) */
> @@ -230,7 +238,7 @@ static struct phy_driver RTL8211E_driver = {
> .mask = 0xffffff,
> .features = PHY_GBIT_FEATURES,
> .config = &rtl8211x_config,
> - .startup = &rtl8211x_startup,
> + .startup = &rtl8211e_startup,
> .shutdown = &genphy_shutdown,
> };
>
Applied to zynq repo.
Thanks,
Michal
--
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/
Maintainer of Linux kernel - Xilinx Zynq ARM architecture
Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160222/cef3a863/attachment.sig>
next prev parent reply other threads:[~2016-02-22 15:15 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-13 10:39 [U-Boot] [PATCH 1/6] net: gem: Add support for reading MAC from I2C EEPROM Michal Simek
2016-02-13 10:39 ` [U-Boot] [PATCH 2/6] ARM: zynq: zybo: Enabling reading MAC address from EEPROM Michal Simek
2016-02-13 10:39 ` [U-Boot] [PATCH 3/6] net: phy: realtek: Use generic genphy_parse_link() for RTL8211E Michal Simek
2016-02-22 15:15 ` Michal Simek [this message]
2016-02-13 10:39 ` [U-Boot] [PATCH 4/6] ARM: zynq: Enable Realtek phys by default Michal Simek
2016-02-22 15:15 ` Michal Simek
2016-02-13 10:39 ` [U-Boot] [PATCH 5/6] ARM: zynq: Add reset-gpio property for USB on Zybo Michal Simek
2016-02-22 15:16 ` Michal Simek
2016-02-13 10:39 ` [U-Boot] [PATCH 6/6] ARM: zynq: Enable EDID for zybo Michal Simek
2016-02-22 15:16 ` Michal Simek
2016-02-14 2:25 ` [U-Boot] [PATCH 1/6] net: gem: Add support for reading MAC from I2C EEPROM Bin Meng
2016-02-14 10:03 ` Michal Simek
2016-02-14 12:00 ` Bin Meng
2016-02-15 7:16 ` Michal Simek
2016-02-15 11:10 ` Bin Meng
2016-02-15 12:30 ` Michal Simek
2016-02-15 16:01 ` Joe Hershberger
2016-02-15 17:41 ` Michal Simek
2016-02-15 17:53 ` Joe Hershberger
2016-02-15 18:51 ` Michal Simek
2016-02-15 20:42 ` Joe Hershberger
2016-02-16 1:06 ` Bin Meng
2016-02-16 15:59 ` Simon Glass
2016-02-16 16:06 ` Joe Hershberger
2016-02-16 16:17 ` Simon Glass
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=56CB2626.3090600@monstr.eu \
--to=monstr@monstr.eu \
--cc=u-boot@lists.denx.de \
/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.