spi: davinci: simplify prescalar calculation
authorBrian Niebuhr <bniebuhr@efjohnson.com>
Fri, 13 Aug 2010 07:57:23 +0000 (12:57 +0530)
committerSekhar Nori <nsekhar@ti.com>
Thu, 18 Nov 2010 13:08:25 +0000 (18:08 +0530)
commit7fe0092b1f55f58a749d68ace3a3597e8a2a9163
tree95df072f92ab7766aba26869d42777f817d3c6e1
parent23853973d9b76eb8b3cf46157689bc6187e141d9
spi: davinci: simplify prescalar calculation

Simplify pre-scalar calculation and move it into a seprate
function.

Refuse to correct invalid pre-scalar values silently as this
might lead to unexpected bugs and lower performance. Instead
an error will force users to dig into the root-cause of the
issue.

While at it, remove some device specific checks on the maximum
SPI frequency. As the driver supports the SPI interface
implemented on various devices, it should only take care of core
SPI limitations and leave the device specific handling to platform
code.

Signed-off-by: Brian Niebuhr <bniebuhr@efjohnson.com>
Tested-By: Michael Williamson <michael.williamson@criticallink.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
drivers/spi/davinci_spi.c