From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-we0-f177.google.com ([74.125.82.177]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1TGe74-0007PZ-Ht for barebox@lists.infradead.org; Tue, 25 Sep 2012 23:00:22 +0000 Received: by mail-we0-f177.google.com with SMTP id u50so996925wey.36 for ; Tue, 25 Sep 2012 16:00:22 -0700 (PDT) From: vj Date: Wed, 26 Sep 2012 00:59:49 +0200 Message-Id: <1348613994-1793-3-git-send-email-vicencb@gmail.com> In-Reply-To: <1348613994-1793-1-git-send-email-vicencb@gmail.com> References: <[RFC][PATCH] archosg9: add support for tablet> <1348613994-1793-1-git-send-email-vicencb@gmail.com> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: barebox-bounces@lists.infradead.org Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH 2/7] added debug info for twl6030 To: barebox@lists.infradead.org Cc: vj --- 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