summaryrefslogtreecommitdiff
path: root/drivers/i2c/i2c-gpio.c
diff options
context:
space:
mode:
authormario.six@gdsys.cc <mario.six@gdsys.cc>2016-07-21 09:57:12 (GMT)
committerHeiko Schocher <hs@denx.de>2016-07-26 08:20:28 (GMT)
commitc68c624320e315ec79e78fef1d7baaaa3c64b790 (patch)
treee0d199f7f33f77d95a2d49a68d8066bde5af7fc8 /drivers/i2c/i2c-gpio.c
parent24f9c6bbc7d5e5e276dea32a81ade71f0e6b56ae (diff)
downloadu-boot-c68c624320e315ec79e78fef1d7baaaa3c64b790.tar.xz
i2c: mvtwsi: Make delay times frequency-dependent
Some devices using the MVTWSI driver have the option to run at speeds faster than Standard Mode (100kHZ). On the Armada 38x controllers, this is actually necessary, since due to erratum FE-8471889, a timing violation concerning repeated starts prevents the controller from working correctly in Standard Mode. One of the workarounds recommended in the erratum is to set the bus to Fast Mode (400kHZ) operation and ensure all connected devices are set to Fast Mode. In the current version of the driver, however, the delay times are hard-coded to 10ms, corresponding to Standard Mode operation. To take full advantage of the faster modes, we would need to either keep the currently configured I2C speed in a globally accessible variable, or pass it to the necessary functions as a parameter. For DM, the first option is not a problem, and we can simply keep the speed in the private data of the driver. For the legacy interface, however, we would need to introduce a static variable, which would cause problems with boots from NOR flashes; see commit d6b7757 "i2c: mvtwsi: Eliminate twsi_control_flags." As to not clutter the interface with yet another parameter, we therefore keep the default 10ms delays for the legacy functions. In DM mode, we make the delay time dependant on the frequency to allow taking full advantage of faster modes of operation (tested with up to 1MHZ frequency on Armada MV88F6820). Signed-off-by: Mario Six <mario.six@gdsys.cc> Reviewed-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'drivers/i2c/i2c-gpio.c')
0 files changed, 0 insertions, 0 deletions