public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/4] blackfin: the sclk MHz in i2c driver should be divided by 1000 other than 1024
@ 2014-01-28  5:53 Sonic Zhang
  2014-01-28  5:53 ` [U-Boot] [PATCH 2/4] blackfin: add spi and i2c specific get clock functions Sonic Zhang
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Sonic Zhang @ 2014-01-28  5:53 UTC (permalink / raw)
  To: u-boot

From: Sonic Zhang <sonic.zhang@analog.com>

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
---
 drivers/i2c/bfin-twi_i2c.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/i2c/bfin-twi_i2c.c b/drivers/i2c/bfin-twi_i2c.c
index b3a04d3..5c37280 100644
--- a/drivers/i2c/bfin-twi_i2c.c
+++ b/drivers/i2c/bfin-twi_i2c.c
@@ -274,7 +274,7 @@ unsigned int i2c_get_bus_speed(void)
  */
 void i2c_init(int speed, int slaveaddr)
 {
-	uint8_t prescale = ((get_sclk() / 1024 / 1024 + 5) / 10) & 0x7F;
+	uint8_t prescale = ((get_sclk() / 1000 / 1000 + 5) / 10) & 0x7F;
 
 	/* Set TWI internal clock as 10MHz */
 	twi->control = prescale;
-- 
1.8.2.3

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2014-01-30  5:28 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-28  5:53 [U-Boot] [PATCH 1/4] blackfin: the sclk MHz in i2c driver should be divided by 1000 other than 1024 Sonic Zhang
2014-01-28  5:53 ` [U-Boot] [PATCH 2/4] blackfin: add spi and i2c specific get clock functions Sonic Zhang
2014-01-30  5:27   ` Heiko Schocher
2014-01-28  5:53 ` [U-Boot] [PATCH 3/4] blackfin: rename bfin-twi_i2c driver to adi_i2c Sonic Zhang
2014-01-30  5:28   ` Heiko Schocher
2014-01-28  5:53 ` [U-Boot] [PATCH 4/4] blackfin: make i2c driver blackfin independant Sonic Zhang
2014-01-30  5:28   ` Heiko Schocher
2014-01-30  5:27 ` [U-Boot] [PATCH 1/4] blackfin: the sclk MHz in i2c driver should be divided by 1000 other than 1024 Heiko Schocher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox