[U-Boot] [PATCH v5 08/15] net: macb: Fix GEM hardware detection

Anup Patel Anup.Patel at wdc.com
Tue Feb 5 13:05:09 UTC 2019


From: Atish Patra <atish.patra at wdc.com>

Fix MID bit field check to correctly identify all GEM hardwares.

The check is updated as per macb driver in Linux location:
<linux_sources>/drivers/net/ethernet/cadence/macb_main.c:259

Signed-off-by: Atish Patra <atish.patra at wdc.com>
Signed-off-by: Anup Patel <anup.patel at wdc.com>
Reviewed-by: Alexander Graf <agraf at suse.de>
Reviewed-by: Lukas Auer <lukas.auer at aisec.fraunhofer.de>
Acked-by: Joe Hershberger <joe.hershberger at ni.com>
---
 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 a5d21731b6..117f54c1b1 100644
--- a/drivers/net/macb.c
+++ b/drivers/net/macb.c
@@ -143,7 +143,7 @@ struct macb_device {
 
 static int macb_is_gem(struct macb_device *macb)
 {
-	return MACB_BFEXT(IDNUM, macb_readl(macb, MID)) == 0x2;
+	return MACB_BFEXT(IDNUM, macb_readl(macb, MID)) >= 0x2;
 }
 
 #ifndef cpu_is_sama5d2
-- 
2.17.1



More information about the U-Boot mailing list