mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: "Thomas Hämmerle" <Thomas.Haemmerle@wolfvision.net>
To: "barebox@lists.infradead.org" <barebox@lists.infradead.org>
Cc: "Thomas Hämmerle" <Thomas.Haemmerle@wolfvision.net>
Subject: [PATCH 3/6] macb: fix check if hw is gem
Date: Tue, 8 Jan 2019 14:35:49 +0000	[thread overview]
Message-ID: <1546958133-6556-3-git-send-email-thomas.haemmerle@wolfvision.net> (raw)
In-Reply-To: <1546958133-6556-1-git-send-email-thomas.haemmerle@wolfvision.net>

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@wolfvision.net>
---
 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@wolfvision.net 

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


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

  parent reply	other threads:[~2019-01-08 14:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <afd44571-b69b-41cc-bf15-9eff29f89a72.95bf7d06-047e-438c-8c7b-895af195351a.c64368fe-8a97-44b6-81ce-d981799f53c2@emailsignatures365.codetwo.com>
2019-01-08 14:35 ` [PATCH 1/6] dp83867: port from linux Thomas Hämmerle
     [not found]   ` <afd44571-b69b-41cc-bf15-9eff29f89a72.95bf7d06-047e-438c-8c7b-895af195351a.2f59ab5f-ece6-4f67-bfed-5c6c80a92f11@emailsignatures365.codetwo.com>
2019-01-08 14:35     ` [PATCH 2/6] macb: fix format specifiers for debug output Thomas Hämmerle
     [not found]   ` <afd44571-b69b-41cc-bf15-9eff29f89a72.95bf7d06-047e-438c-8c7b-895af195351a.e3a33094-2d73-4d32-bde8-2dc1ddd31fbf@emailsignatures365.codetwo.com>
2019-01-08 14:35     ` Thomas Hämmerle [this message]
     [not found]   ` <afd44571-b69b-41cc-bf15-9eff29f89a72.95bf7d06-047e-438c-8c7b-895af195351a.d7953183-96ef-4a79-9c25-4e47b7b852de@emailsignatures365.codetwo.com>
2019-01-08 14:35     ` [PATCH 4/6] macb: fix memory leakage due to double allocation of rx_buffer Thomas Hämmerle
     [not found]   ` <afd44571-b69b-41cc-bf15-9eff29f89a72.95bf7d06-047e-438c-8c7b-895af195351a.365885ea-854d-40ae-9139-9d74dd250caf@emailsignatures365.codetwo.com>
2019-01-08 14:35     ` [PATCH 5/6] macb: disable second priority queue for zynqmp gem support Thomas Hämmerle
     [not found]   ` <afd44571-b69b-41cc-bf15-9eff29f89a72.95bf7d06-047e-438c-8c7b-895af195351a.d8af94ec-04db-4c9a-8f5a-ca89336b761c@emailsignatures365.codetwo.com>
2019-01-08 14:36     ` [PATCH 6/6] zynqmp: enable macb Ethernet support Thomas Hämmerle
2019-01-09  7:22   ` [PATCH 1/6] dp83867: port from linux Sascha Hauer

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=1546958133-6556-3-git-send-email-thomas.haemmerle@wolfvision.net \
    --to=thomas.haemmerle@wolfvision.net \
    --cc=barebox@lists.infradead.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox