[PATCH v2 11/19] i2c: designware_i2c: Rewrite timing calculation
Heiko Schocher
hs at denx.de
Thu Jan 16 07:58:38 CET 2020
Hello Simon,
Am 03.01.2020 um 23:26 schrieb Simon Glass:
> At present the driver can end up with timing parameters which are slightly
> faster than those expected. It is possible to optimise the parameters to
> get the best possible result.
>
> Create a new function to handle the timing calculation. This uses a table
> of defaults for each speed mode rather than writing it in code.
>
> The function works by calculating the 'period' of each bit on the bus in
> terms of the input clock to the controller (IC_CLK). It makes sure that
> the constraints are met and that the different components of that period
> add up correctly.
>
> This code was taken from coreboot which has ended up with this same
> driver, but now in a much-different form.
>
> Signed-off-by: Simon Glass <sjg at chromium.org>
> ---
>
> Changes in v2: None
>
> drivers/i2c/designware_i2c.c | 169 ++++++++++++++++++++++++++++++-----
> 1 file changed, 147 insertions(+), 22 deletions(-)
Reviewed-by: Heiko Schocher <hs at denx.de>
bye,
Heiko
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-52 Fax: +49-8142-66989-80 Email: hs at denx.de
More information about the U-Boot
mailing list