[U-Boot] [PATCH v2] spi: mxc_spi: Update pre and post divider algorithm

Stefano Babic sbabic at denx.de
Wed Jun 26 16:24:33 CEST 2013


On 11/05/2013 07:25, Dirk Behme wrote:
> The spi clock divisor is of the form x * (2**y),  or  x  << y, where x is
> 1 to 16, and y is 0 to 15. Note the similarity with floating point numbers.
> Convert the desired divisor to the smallest number which is >= desired divisor,
> and can be represented in this form. The previous algorithm chose a divisor
> which could be almost twice as large as needed.
> 
> Signed-off-by: Troy Kisky <troy.kisky at boundarydevices.com>
> Signed-off-by: Dirk Behme <dirk.behme at gmail.com>
> ---

Applied to u-boot-imx as a fix, thanks !

Best regards,
Stefano Babic


-- 
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================


More information about the U-Boot mailing list