[PATCH 3/6] macb: fix check if hw is gem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Fix check for peripheral version in MACB_MID register to treat Xilinx
ZynqMP as GEM. All MIDs >= 2 indicate a GEM not only MID == 2.

Signed-off-by: Thomas Haemmerle <thomas.haemmerle@xxxxxxxxxxxxxx>
---
 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 240802e..c776535 100644
--- a/drivers/net/macb.c
+++ b/drivers/net/macb.c
@@ -86,7 +86,7 @@ static inline bool macb_is_gem(struct macb_device *macb)
 
 static inline bool read_is_gem(struct macb_device *macb)
 {
-	return MACB_BFEXT(IDNUM, macb_readl(macb, MID)) == 0x2;
+	return MACB_BFEXT(IDNUM, macb_readl(macb, MID)) >= 0x2;
 }
 
 static int macb_send(struct eth_device *edev, void *packet,
-- 
2.7.4


Thomas Hämmerle
Research and Development 

Wolfvision GmbH
 | 6833 Klaus | Austria 
Tel: +43 5523 52250 | Mail: Thomas.Haemmerle@xxxxxxxxxxxxxx 

Webpage: www.wolfvision.com | www.wolfvision.com/green
Firmenbuch / Commercial Register: FN283521v Feldkirch/Austria


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox




[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux