Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mmc: sdhci: iproc: Add custom set_power() callback for bcm2711

The controller needs a valid bus voltage in its power register
regardless of whether an external regulator is taking care of the power
supply.

The sdhci core already provides a helper function for this,
sdhci_set_power_and_bus_voltage(), so create a bcm2711 specific 'struct
sdhci_ops' which makes use of it.

Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Link: https://lore.kernel.org/r/20200306174413.20634-10-nsaenzjulienne@suse.de
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>

authored by

Nicolas Saenz Julienne and committed by
Ulf Hansson
f87391ee 9d8acdd3

+16 -1
+16 -1
drivers/mmc/host/sdhci-iproc.c
··· 261 261 .mmc_caps = 0x00000000, 262 262 }; 263 263 264 + static const struct sdhci_ops sdhci_iproc_bcm2711_ops = { 265 + .read_l = sdhci_iproc_readl, 266 + .read_w = sdhci_iproc_readw, 267 + .read_b = sdhci_iproc_readb, 268 + .write_l = sdhci_iproc_writel, 269 + .write_w = sdhci_iproc_writew, 270 + .write_b = sdhci_iproc_writeb, 271 + .set_clock = sdhci_set_clock, 272 + .set_power = sdhci_set_power_and_bus_voltage, 273 + .get_max_clock = sdhci_iproc_get_max_clock, 274 + .set_bus_width = sdhci_set_bus_width, 275 + .reset = sdhci_reset, 276 + .set_uhs_signaling = sdhci_set_uhs_signaling, 277 + }; 278 + 264 279 static const struct sdhci_pltfm_data sdhci_bcm2711_pltfm_data = { 265 280 .quirks = SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12, 266 - .ops = &sdhci_iproc_32only_ops, 281 + .ops = &sdhci_iproc_bcm2711_ops, 267 282 }; 268 283 269 284 static const struct sdhci_iproc_data bcm2711_data = {