ARM: 7833/1: mmc: mmci: Adapt to register write restrictions
authorUlf Hansson <ulf.hansson@linaro.org>
Wed, 4 Sep 2013 08:01:15 +0000 (09:01 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Thu, 19 Sep 2013 19:12:24 +0000 (20:12 +0100)
commitf829c04204de83aa0d13307d2a2dc07c0d9a94e3
tree01e7b3ee30568491cc461c1c36ac6adef591388a
parente36bd9c6c99f47902d6fd6804730aa587ae275a0
ARM: 7833/1: mmc: mmci: Adapt to register write restrictions

After a write to the MMCICLOCK register data cannot be written to this
register for three feedback clock cycles. Writes to the MMCIPOWER
register must be separated by three MCLK cycles. Previously no issues
has been observered, but using higher ARM clock frequencies on STE-
platforms has triggered this problem.

The MMCICLOCK register is written to in .set_ios and for some data
transmissions for SDIO. We do not need a delay at the data transmission
path, because sending and receiving data will require more than three
clock cycles. Then we use a simple logic to only delay in .set_ios and
thus we don't affect throughput performance.

Signed-off-by: Johan Rudholm <jrudholm@gmail.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Acked-by: Rickard Andersson <rickard.andersson@stericsson.com>
Reviewed-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
drivers/mmc/host/mmci.c