mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: barebox@lists.infradead.org
Subject: [PATCH 1/3] net/designware: update version display to print user ID and Synosys ID
Date: Thu,  4 Oct 2012 09:00:25 +0200	[thread overview]
Message-ID: <1349334027-9525-1-git-send-email-plagnioj@jcrosoft.com> (raw)

So we can check it with the kernel one

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
 drivers/net/designware.c |   11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/drivers/net/designware.c b/drivers/net/designware.c
index a9a04e3..6a36f14 100644
--- a/drivers/net/designware.c
+++ b/drivers/net/designware.c
@@ -373,6 +373,15 @@ static int dwc_ether_set_ethaddr(struct eth_device *dev, u8 adr[6])
 	return 0;
 }
 
+static void dwc_version(struct device_d *dev, u32 hwid)
+{
+	u32 uid = ((hwid & 0x0000ff00) >> 8);
+	u32 synid = (hwid & 0x000000ff);
+
+	dev_info(dev, "user ID: 0x%x, Synopsys ID: 0x%x\n",
+		uid, synid);
+}
+
 static int dwc_ether_probe(struct device_d *dev)
 {
 	struct dw_eth_dev *priv;
@@ -390,7 +399,7 @@ static int dwc_ether_probe(struct device_d *dev)
 
 	base = dev_request_mem_region(dev, 0);
 	priv->mac_regs_p = base;
-	dev_info(dev, "MAC version %08x\n", readl(&priv->mac_regs_p->version));
+	dwc_version(dev, readl(&priv->mac_regs_p->version));
 	priv->dma_regs_p = base + DW_DMA_BASE_OFFSET;
 	priv->tx_mac_descrtable = dma_alloc_coherent(
 		CONFIG_TX_DESCR_NUM * sizeof(struct dmamacdescr));
-- 
1.7.10.4


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

             reply	other threads:[~2012-10-04  7:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-04  7:00 Jean-Christophe PLAGNIOL-VILLARD [this message]
2012-10-04  7:00 ` [PATCH 2/3] net/designware: fix phy_addr type to int Jean-Christophe PLAGNIOL-VILLARD
2012-10-04  7:00 ` [PATCH 3/3] net/designware: fix phylib support Jean-Christophe PLAGNIOL-VILLARD
2012-10-04 15:21 ` [PATCH 1/3] net/designware: update version display to print user ID and Synosys ID 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=1349334027-9525-1-git-send-email-plagnioj@jcrosoft.com \
    --to=plagnioj@jcrosoft.com \
    --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