]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
mmc: sdhci: Make signal voltage support explicit
authorAdrian Hunter <adrian.hunter@intel.com>
Wed, 29 Jun 2016 13:24:16 +0000 (16:24 +0300)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 25 Jul 2016 08:34:34 +0000 (10:34 +0200)
commit8cb851a4da64aa838c3cb4fa76ad130ace2b5a98
tree3ed652f9d0267aeb7be5ec59ca979d2ae9f42778
parent52f5336db2d6c32a807ca37cc1c45060a88a2506
mmc: sdhci: Make signal voltage support explicit

Signal voltage support is not a quirk, it is a capability. According to the
SDHCI specification, support for 1.8V signaling is determined by the
presence of one of the capability bits SDHCI_SUPPORT_SDR50,
SDHCI_SUPPORT_SDR104, or SDHCI_SUPPORT_DDR50. This is complicated by also
supporting eMMC which has 1.8V modes and 1.2V modes. It would be possible
to use the transfer mode to determine signal voltage support, except for
eMMC DDR52 mode which uses the same capability (MMC_CAP_1_8V_DDR) for 1.8V
signaling and 3V signaling.

In addition, the mmc core will fail over from one signaling voltage to the
next (refer mmc_power_up()) which means SDHCI really needs to validate
which voltages are actually supported.

Introduce SDHCI flags for signal voltage support and set them based on the
supported transfer modes. In general, drivers should prefer to set the
supported transfer modes correctly rather than change the signal voltage
capability, except in the case where 3V DDR52 is supported but 1.8V is
not.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/sdhci.c
drivers/mmc/host/sdhci.h