From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 7/7] i2c: mxs: Fix TIMING2 register value
Date: Tue, 13 Nov 2012 01:34:31 +0100 [thread overview]
Message-ID: <1352766871-892-7-git-send-email-marex@denx.de> (raw)
In-Reply-To: <1352766871-892-1-git-send-email-marex@denx.de>
According to FSL, the value in the TIMING2 register shall be 0x00300030
instead of what's written in the datasheet. This new value correlates
with older STMP36xx datasheet. Issues were detected in Linux when this
register was misconfigured, so write this correct value.
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
---
drivers/i2c/mxs_i2c.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/i2c/mxs_i2c.c b/drivers/i2c/mxs_i2c.c
index 3771452..006fb91 100644
--- a/drivers/i2c/mxs_i2c.c
+++ b/drivers/i2c/mxs_i2c.c
@@ -267,8 +267,8 @@ int i2c_set_bus_speed(unsigned int speed)
writel(spd->timing0, &i2c_regs->hw_i2c_timing0);
writel(spd->timing1, &i2c_regs->hw_i2c_timing1);
- writel((0x0015 << I2C_TIMING2_BUS_FREE_OFFSET) |
- (0x000d << I2C_TIMING2_LEADIN_COUNT_OFFSET),
+ writel((0x0030 << I2C_TIMING2_BUS_FREE_OFFSET) |
+ (0x0030 << I2C_TIMING2_LEADIN_COUNT_OFFSET),
&i2c_regs->hw_i2c_timing2);
return 0;
--
1.7.10.4
next prev parent reply other threads:[~2012-11-13 0:34 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-13 0:34 [U-Boot] [PATCH 1/7] i2c: Use __weak instead of __attribute__((weak, alias)) Marek Vasut
2012-11-13 0:34 ` [U-Boot] [PATCH 2/7] i2c: Staticize local functions in mxc i2c driver Marek Vasut
2012-11-13 0:34 ` [U-Boot] [PATCH 3/7] i2c: kerneldoc: Add kerneldoc annotations to cmd_i2c.c Marek Vasut
2012-11-13 0:34 ` [U-Boot] [PATCH 4/7] i2c: mxs: Abstract out the MXS I2C speed setup Marek Vasut
2012-11-13 8:29 ` Wolfgang Denk
2012-11-13 13:45 ` Marek Vasut
2012-11-13 0:34 ` [U-Boot] [PATCH 5/7] i2c: mxs: Implement i2c_get/set_bus_speed() Marek Vasut
2012-11-13 0:34 ` [U-Boot] [PATCH 6/7] i2c: mxs: Use i2c_set_bus_speed() in i2c_init() Marek Vasut
2012-11-13 0:34 ` Marek Vasut [this message]
2012-11-13 7:16 ` [U-Boot] [PATCH 1/7] i2c: Use __weak instead of __attribute__((weak, alias)) Wolfgang Denk
2012-11-13 13:48 ` Marek Vasut
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=1352766871-892-7-git-send-email-marex@denx.de \
--to=marex@denx.de \
--cc=u-boot@lists.denx.de \
/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