SPI: mxc_spi: add SPI clock calculation and setup to the driver
authorAnatolij Gustschin <agust@denx.de>
Wed, 19 Jan 2011 22:46:32 +0000 (22:46 +0000)
committerAlbert Aribaud <albert.aribaud@free.fr>
Tue, 1 Feb 2011 23:54:43 +0000 (00:54 +0100)
commitafaa9f65c24d815ed4f6133c800884921e051913
tree2ded84b8cf87fb1a3497d66e8f651fe7abdd4c57
parentdff0109496846fd9787b6cdc0941217ecdf0ae28
SPI: mxc_spi: add SPI clock calculation and setup to the driver

The MXC SPI driver didn't calculate the SPI clock up to
now and just used highest possible divider 512 for DATA
RATE in the control register. This results in very low
transfer rates.

The patch adds code to calculate and setup the SPI clock
frequency for transfers.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Signed-off-by: Stefano Babic <sbabic@denx.de>
drivers/spi/mxc_spi.c