]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit - drivers/mmc/core/sdio.c
mmc: sdio: don't use rocr to check if the card could support UHS mode
authorShawn Lin <shawn.lin@rock-chips.com>
Mon, 9 Jan 2017 08:56:20 +0000 (16:56 +0800)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 13 Feb 2017 12:20:13 +0000 (13:20 +0100)
commit5fc3d80ef496c3bc3e8c09f056e3586fb681de56
treeee4887229f65ec02220617a7777e7936f044c031
parent0eb51a58ad823b2081c69ec1cf165833dd11c450
mmc: sdio: don't use rocr to check if the card could support UHS mode

Per SDIO Simplified Specification V3, section 3.1.2, A host that
supports UHS-I sets S18R to 1 in the argument of CMD5 to request a
change of the signal voltage to 1.8V. If the card supports UHS-I and
the current signal voltage is 3.3V, S18A is set to 1 in the R4 response.
If the signal voltage is already 1.8V, the card sets S18A to 0 so that
host maintains the current signal voltage. UHS-I is supported in SD mode
and S18A is always 0 in SPI mode.

For the current code, if the signaling voltage is fixed 1.8v, so
the card will set S18A to 0 for rocr and thus we would clear the
R4_18V_PRESENT from ocr, which make core won't try to use uhs mode.

To fix it, we expect sdio_read_cccr would fail if the uhs mode won't
work at all. Note that it's interesting that some sdio cards still
response S18A even the voltage is fixed to 1.8v and the CMD11 will
also accepted and finish enabling UHS mode successfully. I guess this
is why folks didn't notice this problem. Anyway, fix it.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/core/sdio.c