diff options
author | wdenk <wdenk> | 2004-10-10 23:27:33 +0000 |
---|---|---|
committer | wdenk <wdenk> | 2004-10-10 23:27:33 +0000 |
commit | e1599e83d643c1667a4157d03609c6e29928fb2e (patch) | |
tree | 5de7676c2c02bdddb3f01251d14bfdd43454cde0 /cpu/mpc8260/i2c.c | |
parent | c15f3120eca5359ed7ec1a359085312bbafca169 (diff) | |
download | u-boot-imx-e1599e83d643c1667a4157d03609c6e29928fb2e.zip u-boot-imx-e1599e83d643c1667a4157d03609c6e29928fb2e.tar.gz u-boot-imx-e1599e83d643c1667a4157d03609c6e29928fb2e.tar.bz2 |
* Patch by Gridish Shlomi, 30 Aug 2004:
- Add support to revA version of PQ27 and PQ27E.
- Reverted MPC8260ADS baudrate back to original 115200
* Patch by Hojin, 17 Sep 2004:
Fix typo in cfi_flash.c
* Patch by Mark Jonas, 09 September 2004:
mtest's data line test (with CFG_ALT_MEMTEST set) returned a wrong
error message
* Patch by Mark Jonas, 31 August 2004:
Added option CFG_XLB_PIPELINING to enable XLB pipelining. This
improves FTP performance for MPC5200 systems. Enabled for IceCube
by default.
Diffstat (limited to 'cpu/mpc8260/i2c.c')
-rw-r--r-- | cpu/mpc8260/i2c.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cpu/mpc8260/i2c.c b/cpu/mpc8260/i2c.c index 789c514..e0ac684 100644 --- a/cpu/mpc8260/i2c.c +++ b/cpu/mpc8260/i2c.c @@ -149,7 +149,7 @@ i2c_roundrate(int hz, int speed, int filter, int modval, PRINTD(("\t\tmoddiv=%d, brgdiv=%d\n", moddiv, brgdiv)); - *brgval = (brgdiv / 2) - 3 - (2*filter); + *brgval = ((brgdiv + 1) / 2) - 3 - (2*filter); if ((*brgval < 0) || (*brgval > 255)) { PRINTD(("\t\trejected brgval=%d\n", *brgval)); @@ -158,7 +158,7 @@ i2c_roundrate(int hz, int speed, int filter, int modval, brgdiv = 2 * (*brgval + 3 + (2 * filter)); div = moddiv * brgdiv ; - *totspeed = (hz + div - 1) / div; + *totspeed = hz / div; PRINTD(("\t\taccepted brgval=%d, totspeed=%d\n", *brgval, *totspeed)); |