]> git.baikalelectronics.ru Git - kernel.git/commit
mmc: core: fix multi-bit bus width without high-speed mode
authorAnssi Hannula <anssi.hannula@bitwise.fi>
Mon, 13 Feb 2017 11:46:41 +0000 (13:46 +0200)
committerUlf Hansson <ulf.hansson@linaro.org>
Tue, 14 Feb 2017 07:50:10 +0000 (08:50 +0100)
commitda0e7c0d3091bed8f86e006d491ad42c876fb12f
tree74bf597f6e43a0d85684dd1db535a29d23d4d29d
parentb915d943c6a4caa9247bf5fa13354dc3d4a74d26
mmc: core: fix multi-bit bus width without high-speed mode

Commit 51c99ae3aa80 ("mmc: rework selection of bus speed mode")
refactored bus width selection code to mmc_select_bus_width().

However, it also altered the behavior to not call the selection code in
non-high-speed modes anymore.

This causes 1-bit mode to always be used when the high-speed mode is not
enabled, even though 4-bit and 8-bit bus are valid bus widths in the
backwards-compatibility (legacy) mode as well (see e.g. 5.3.2 Bus Speed
Modes in JEDEC 84-B50). This results in a significant regression in
transfer speeds.

Fix the code to allow 4-bit and 8-bit widths even without high-speed
mode, as before.

Tested with a Zynq-7000 PicoZed 7020 board.

Fixes: 51c99ae3aa80 ("mmc: rework selection of bus speed mode")
Signed-off-by: Anssi Hannula <anssi.hannula@bitwise.fi>
Cc: <stable@vger.kernel.org>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/core/mmc.c