mmc: sdhci-s3c: Fix handling of bus clock switching
authorTomasz Figa <tomasz.figa@gmail.com>
Sat, 11 Jan 2014 21:39:05 +0000 (22:39 +0100)
committerChris Ball <chris@printf.net>
Mon, 3 Mar 2014 15:23:36 +0000 (10:23 -0500)
commit3ac147facfbd234acf3a990968de9746a399f133
treeac929a35cdc6480f09afec0dfac831488e100710
parent222a13c5d0c67333e443a1ea2fcc746ad61f8d68
mmc: sdhci-s3c: Fix handling of bus clock switching

Currently the driver assumes at probe that controller is configured for
last valid enumerated bus clock. This assumption is completely wrong, as
there is no way to ensure such configuration until the hardware gets
first configured (by calling sdhci_s3c_set_clock()).

This patch modifies the driver to set current clock at probe to unknown
state (represented by negative value) and make sure that the hardware
gets actually configured to selected clock in sdhci_s3c_set_clock().

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