]> git.baikalelectronics.ru Git - kernel.git/commit
mmc: dw_mmc: avoid write to CDTHRCTL on older versions
authorJames Hogan <james.hogan@imgtec.com>
Mon, 17 Nov 2014 17:49:05 +0000 (17:49 +0000)
committerUlf Hansson <ulf.hansson@linaro.org>
Wed, 26 Nov 2014 13:31:02 +0000 (14:31 +0100)
commit14385ea4a6c957b102f0fba99fd091c51de134d5
treed44b00cb3fe8aa75c096ec3c849f24dcadad835b
parent896b9908b8a1d03cd01c811fe8e11da917930a42
mmc: dw_mmc: avoid write to CDTHRCTL on older versions

Commit de2fc6f11a1c (mmc: dw_mmc: control card read threshold) added
dw_mci_ctrl_rd_thld() with an unconditional write to the CDTHRCTL
register at offset 0x100. However before version 240a, the FIFO region
started at 0x100, so the write messes with the FIFO and completely
breaks the driver.

If the version id < 240A, return early from dw_mci_ctl_rd_thld() so as
not to hit this problem.

Fixes: de2fc6f11a1c (mmc: dw_mmc: control card read threshold)
Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: <stable@vger.kernel.org> # v3.13+
Acked-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/dw_mmc.c