summaryrefslogtreecommitdiffstats
path: root/drivers/i2c
diff options
context:
space:
mode:
authorGregory CLEMENT <gregory.clement@bootlin.com>2018-03-14 18:03:40 +0100
committerWolfram Sang <wsa@the-dreams.de>2018-03-17 21:20:04 +0100
commit31184d8c6ea49ea0676d100cdd7e1f102ad025b5 (patch)
tree188b5baa43accef26ba5704b945a799d1a9f0edb /drivers/i2c
parent74d23319fd16cae28a2cbb53a213fe0765ac2028 (diff)
downloadop-kernel-dev-31184d8c6ea49ea0676d100cdd7e1f102ad025b5.zip
op-kernel-dev-31184d8c6ea49ea0676d100cdd7e1f102ad025b5.tar.gz
i2c: mv64xxx: Apply errata delay only in standard mode
The errata FE-8471889 description has been updated. There is still a timing violation for repeated start. But the errata now states that it was only the case for the Standard mode (100 kHz), in Fast mode (400 kHz) there is no issue. This patch limit the errata fix to the Standard mode. It has been tesed successfully on the clearfog (Aramda 388 based board). Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'drivers/i2c')
-rw-r--r--drivers/i2c/busses/i2c-mv64xxx.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/i2c/busses/i2c-mv64xxx.c b/drivers/i2c/busses/i2c-mv64xxx.c
index 440fe4a..a5a95ea 100644
--- a/drivers/i2c/busses/i2c-mv64xxx.c
+++ b/drivers/i2c/busses/i2c-mv64xxx.c
@@ -845,12 +845,16 @@ mv64xxx_of_config(struct mv64xxx_i2c_data *drv_data,
*/
if (of_device_is_compatible(np, "marvell,mv78230-i2c")) {
drv_data->offload_enabled = true;
- drv_data->errata_delay = true;
+ /* The delay is only needed in standard mode (100kHz) */
+ if (bus_freq <= 100000)
+ drv_data->errata_delay = true;
}
if (of_device_is_compatible(np, "marvell,mv78230-a0-i2c")) {
drv_data->offload_enabled = false;
- drv_data->errata_delay = true;
+ /* The delay is only needed in standard mode (100kHz) */
+ if (bus_freq <= 100000)
+ drv_data->errata_delay = true;
}
if (of_device_is_compatible(np, "allwinner,sun6i-a31-i2c"))
OpenPOWER on IntegriCloud