mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: vj <vicencb@gmail.com>
To: barebox@lists.infradead.org
Cc: vj <vicencb@gmail.com>
Subject: [PATCH 2/7] added debug info for twl6030
Date: Wed, 26 Sep 2012 00:59:49 +0200	[thread overview]
Message-ID: <1348613994-1793-3-git-send-email-vicencb@gmail.com> (raw)
In-Reply-To: <1348613994-1793-1-git-send-email-vicencb@gmail.com>

---
 drivers/mfd/twl6030.c | 13 +++++++++++++
 include/mfd/twl6030.h |  8 ++++++++
 2 files changed, 21 insertions(+)

diff --git a/drivers/mfd/twl6030.c b/drivers/mfd/twl6030.c
index 7ecfed8..a2d16a1 100644
--- a/drivers/mfd/twl6030.c
+++ b/drivers/mfd/twl6030.c
@@ -39,6 +39,19 @@ static int twl_probe(struct device_d *dev)
 
 	devfs_create(&(twl_dev->core.cdev));
 
+#ifdef DEBUG
+    {
+        u8 i, jtag_rev, eprom_rev;
+        int r;
+        u64 dieid;
+        r =twl6030_reg_read(twl_dev, TWL6030_JTAG_JTAGVERNUM, &jtag_rev );
+        r|=twl6030_reg_read(twl_dev, TWL6030_JTAG_EPROM_REV , &eprom_rev);
+        for(i=0; i<8; i++) r|=twl6030_reg_read(twl_dev, TWL6030_DIEID_0+i, ((u8*)(&dieid))+i);
+        if(r) debug("TWL6030 Error reading ID\n");
+        else  debug("TWL6030 JTAG REV: 0x%02X, EPROM REV: 0x%02X DIE ID: 0x%016llX\n", (unsigned)jtag_rev, (unsigned)eprom_rev, dieid);
+    }
+#endif
+
 	return 0;
 }
 
diff --git a/include/mfd/twl6030.h b/include/mfd/twl6030.h
index f1278d4..bb4f773 100644
--- a/include/mfd/twl6030.h
+++ b/include/mfd/twl6030.h
@@ -371,6 +371,14 @@ enum twl6030_reg {
 	/* JTAG */
 	TWL6030_JTAG_JTAGVERNUM = 0x0287,
 	TWL6030_JTAG_EPROM_REV = 0x02DF,
+	TWL6030_DIEID_0 = 0x02C0,
+	TWL6030_DIEID_1 = 0x02C1,
+	TWL6030_DIEID_2 = 0x02C2,
+	TWL6030_DIEID_3 = 0x02C3,
+	TWL6030_DIEID_4 = 0x02C4,
+	TWL6030_DIEID_5 = 0x02C5,
+	TWL6030_DIEID_6 = 0x02C6,
+	TWL6030_DIEID_7 = 0x02C7,
 	/* GPADC Trimming */
 	TWL6030_GPADC_TRIM1 = 0x02CD,
 	TWL6030_GPADC_TRIM2 = 0x02CE,
-- 
1.7.12.1


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

  parent reply	other threads:[~2012-09-25 23:00 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <[RFC][PATCH] archosg9: add support for tablet>
2012-09-25 22:59 ` [PATCH 0/7] [RFC][PATCH] archosg9: add support for tablet vj
2012-09-25 22:59   ` [PATCH 1/7] Improved an error message and solved a minor bug vj
2012-09-26  7:11     ` Sascha Hauer
2012-09-25 22:59   ` vj [this message]
2012-09-25 22:59   ` [PATCH 3/7] OMAP specific changes vj
2012-09-26  7:18     ` Sascha Hauer
2012-09-25 22:59   ` [PATCH 4/7] Add USB booting capabilities to OMAP vj
2012-09-26  7:45     ` Sascha Hauer
2012-09-28  0:27       ` vj
2012-09-28  7:32         ` Sascha Hauer
2012-09-25 22:59   ` [PATCH 5/7] add console support over the same USB used for booting vj
2012-09-25 22:59   ` [PATCH 6/7] add filesystem " vj
2012-09-25 22:59   ` [PATCH 7/7] Add support for Archos G9 tablet vj
2012-09-26  3:57   ` [PATCH 0/7] [RFC][PATCH] archosg9: add support for tablet Antony Pavlov
2012-09-26  7:06   ` Sascha Hauer
2012-09-26 22:38     ` vj
2012-09-26  8:16   ` 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=1348613994-1793-3-git-send-email-vicencb@gmail.com \
    --to=vicencb@gmail.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