mmc: sdhci-s3c: Simplify min/max clock calculation
authorTomasz Figa <tomasz.figa@gmail.com>
Sat, 11 Jan 2014 21:39:04 +0000 (22:39 +0100)
committerChris Ball <chris@printf.net>
Mon, 3 Mar 2014 15:23:32 +0000 (10:23 -0500)
commit222a13c5d0c67333e443a1ea2fcc746ad61f8d68
tree0be436987c782fb63333952c2ca2a1a305b7fa84
parent8f4b78d9bb042aacce43e0213c727da861a128f6
mmc: sdhci-s3c: Simplify min/max clock calculation

This patch reimplements functions calculating minimum and maximum clock
rates to leverage clock rate cache introduced by previous patches.

In addition, the calculation is simplified to just comparing input
clock rates (max case) or input clock rates divided by maximum divisor
(min case), which is basically what the original code did, but with much
more unnecessary work.

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
Tested-by: Heiko Stuebner <heiko@sntech.de>
Acked-by: Heiko Stuebner <heiko@sntech.de>
Tested-by: Jaehoon Chung <jh80.chung@samsung.com>
Acked-by; Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Chris Ball <chris@printf.net>
drivers/mmc/host/sdhci-s3c.c