projects
/
project
/
bcm63xx
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1894863
)
blackfin: the sclk MHz in i2c driver should be divided by 1000 other than 1024
author
Sonic Zhang
<sonic.zhang@analog.com>
Tue, 28 Jan 2014 05:53:33 +0000
(13:53 +0800)
committer
Heiko Schocher
<hs@denx.de>
Thu, 20 Feb 2014 05:46:55 +0000
(06:46 +0100)
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
drivers/i2c/bfin-twi_i2c.c
patch
|
blob
|
history
diff --git
a/drivers/i2c/bfin-twi_i2c.c
b/drivers/i2c/bfin-twi_i2c.c
index b3a04d32074a2242d5f647e592083f47b09d865a..5c372809c918b2ee169a8670880ceb90b8147c76 100644
(file)
--- 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() / 10
24 / 1024
+ 5) / 10) & 0x7F;
+ uint8_t prescale = ((get_sclk() / 10
00 / 1000
+ 5) / 10) & 0x7F;
/* Set TWI internal clock as 10MHz */
twi->control = prescale;