1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-09-25 04:21:18 +02:00
Files
u-boot-megous/drivers/i2c
Hans de Goede fab356a0b8 mvtwsi: Fix clock programming
The TWSI_FREQUENCY macro was wrong in 2 ways:
1) It was casting the result of the calculations to an u8, while i2c clk
rates are often >= 100Khz which won't fit in a u8, drop the cast.
2) It had an extra factor of 2 in the divider which neither the datasheet nor
the Linux driver have.

The comment for the default value was wrongly saying that m lives in
bits 4-7, while in reality it is in bits 3-6, as can be seen from the correct
shift by 3 used in i2c_init().

While at it remove the unused twsi_actual_speed variable.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2014-05-14 12:58:55 +02:00
..
2014-01-13 08:17:51 +01:00
2014-02-22 19:30:39 +01:00
2014-05-14 12:58:55 +02:00