]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mmc: mxs-mmc: fix clock rate setting
authorKoen Beel <koen.beel@barco.com>
Fri, 15 Jul 2011 21:39:00 +0000 (17:39 -0400)
committerMaxim Uvarov <maxim.uvarov@oracle.com>
Thu, 8 Dec 2011 19:16:12 +0000 (11:16 -0800)
commit84402d9029f7167863a74135faf605dc5096fd58
tree6f8370912d7db77456b866d9489988a8fbae905e
parentfbf954b501b6a28e726ec62edc42f44e16c0f887
mmc: mxs-mmc: fix clock rate setting

commit d982dcdc4e64eb1881df44b0035a8268bf1ab067 upstream.

Fix clock rate setting in the mxs-mmc driver. Previously, if div2 was 0
then the value for TIMING_CLOCK_RATE would have been 255 instead of 0.
The limits for div1 (TIMING_CLOCK_DIVIDE) and div2 (TIMING_CLOCK_RATE+1)
were also not correctly defined.

Can easily be reproduced on mx23evk: default clock for high speed sdio
cards is 50 MHz. With a SSP_CLK of 28.8 MHz default), this resulted in
an actual clock rate of about 56 kHz.  Tested on mx23evk.

Signed-off-by: Koen Beel <koen.beel@barco.com>
Reviewed-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Chris Ball <cjb@laptop.org>
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/mmc/host/mxs-mmc.c