]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitb187322d0dde3133e280de14212976c5bab3333e
tree0be436987c782fb63333952c2ca2a1a305b7fa84
parentfcae129f31490820c9b433db5587ccb8fec7df30
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