Re: [U-Boot] [PATCH 1/2] net: macb: Fixed reading MII_LPA register

2019-07-08 Thread Joe Hershberger
On Fri, Jun 7, 2019 at 8:48 AM Radu Pirea  wrote:
>
> If macb is gem and is gigabit capable, lpa value is not read from
> the right register(MII_LPA) and is read from MII_STAT1000. This patch
> fixes reading of the lpa value.
>
> Signed-off-by: Radu Pirea 

Acked-by: Joe Hershberger 
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH 1/2] net: macb: Fixed reading MII_LPA register

2019-06-07 Thread Radu Pirea
If macb is gem and is gigabit capable, lpa value is not read from
the right register(MII_LPA) and is read from MII_STAT1000. This patch
fixes reading of the lpa value.

Signed-off-by: Radu Pirea 
---
 drivers/net/macb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/macb.c b/drivers/net/macb.c
index 72614164e9..3632650983 100644
--- a/drivers/net/macb.c
+++ b/drivers/net/macb.c
@@ -570,7 +570,7 @@ static int macb_phy_init(struct macb_device *macb, const 
char *name)
 
/* First check for GMAC and that it is GiB capable */
if (gem_is_gigabit_capable(macb)) {
-   lpa = macb_mdio_read(macb, MII_STAT1000);
+   lpa = macb_mdio_read(macb, MII_LPA);
 
if (lpa & (LPA_1000FULL | LPA_1000HALF)) {
duplex = ((lpa & LPA_1000FULL) ? 1 : 0);
-- 
2.21.0

___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot