From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefano Babic Date: Wed, 26 Jun 2013 16:24:33 +0200 Subject: [U-Boot] [PATCH v2] spi: mxc_spi: Update pre and post divider algorithm In-Reply-To: <1368249954-8790-1-git-send-email-dirk.behme@gmail.com> References: <1368249954-8790-1-git-send-email-dirk.behme@gmail.com> Message-ID: <51CAF9A1.1010906@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 > Signed-off-by: Dirk Behme > --- 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 =====================================================================