i2c: stm32f2: FIXME: Disable I2C timing calculation
RFC PATCH 1/1 i2c: stm32f2: FIXME: Disable I2C timing calculation
WARNING: This is NOT a fix, but rather a bug report / notice of a problem. Disable the I2C timing calculation. The calculation is adding 1 second (!) to the SPL boot time only to calculate I2C timing parameters, that is not acceptable. Moreover, it is exercising the memory allocator massively.
Is there no simplified timing parameter calculation which could replace that horribleness ?
--- drivers/i2c/stm32f7_i2c.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
drivers/i2c/stm32f7_i2c.c +7 -2
@@ -743,20 +743,25 @@ static int stm32_i2c_hw_config(struct stm32_i2c_priv *i2c_priv)struct stm32_i2c_timings t;int ret;u32 timing =0 ; - +/* This calculation adds 1 second to SPL boot time */ +#if 0 ret =stm32_i2c_setup_timing (i2c_priv, &t);if (ret)return ret; - +#endif /* Disable I2C */ clrbits_le32 (®s->cr1,STM32_I2C_CR1_PE );/* Timing settings */ +#if 0 timing |=STM32_I2C_TIMINGR_PRESC (t.presc); timing |=STM32_I2C_TIMINGR_SCLDEL (t.scldel); timing |=STM32_I2C_TIMINGR_SDADEL (t.sdadel); timing |=STM32_I2C_TIMINGR_SCLH (t.sclh); timing |=STM32_I2C_TIMINGR_SCLL (t.scll); +#else +timing =0x10d09b90 ; +#endif writel (timing, ®s->timingr);/* Enable I2C */
Signature · 1 line
2.25.1
RFC PATCH 1/1 i2c: stm32f2: FIXME: Disable I2C timing calculation
Quoted 7 lines · Marek Vasut
WARNING: This is NOT a fix, but rather a bug report / notice of a problem. Disable the I2C timing calculation. The calculation is adding 1 second (!) to the SPL boot time only to calculate I2C timing parameters, that is not acceptable. Moreover, it is exercising the memory allocator massively.
Is there no simplified timing parameter calculation which could replace that horribleness ?
Also note the DWC i2c driver has some rather simple I2C setup/hold time calculation, maybe that could be recycled ?
Signature · 2 lines
Best regards, Marek Vasut