[U-Boot] [PATCH v3 4/7] rockchip: spi: rk_spi: improve clocking code for the RK3399

Simon Glass sjg at chromium.org
Tue Apr 18 03:59:39 UTC 2017


On 17 April 2017 at 09:43, Philipp Tomsich <
philipp.tomsich at theobroma-systems.com> wrote:
> The original code for the clock clamping did not support going up to
> half the module input frequency (even when clocking the module at
> 99MHz), as a hard limit (of 48MHz) was used for the maximum bitrate.
>
> This rewrites the check to allow frequencies of up to half the SPI
> module rate as bitrates and then clamps to whatever the DTS allows
> as a maximum (board-specific) frequency.
>
> Signed-off-by: Philipp Tomsich <philipp.tomsich at theobroma-systems.com>
>
> ---
>
> Changes in v3:
> - change the top bitrate permissible (without generating a -EINVAL)
> from 48MHz/MBit to half the input clockrate (i.e. 49.5MHz/MBit for
> a 99MHz module input clock)
>
> Changes in v2: None
>
> drivers/spi/rk_spi.c | 9 ++++++++-
> 1 file changed, 8 insertions(+), 1 deletion(-)

Acked-by: Simon Glass <sjg at chromium.org>


More information about the U-Boot mailing list