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

mmc: tegra: use correct accessor for misc ctrl register

The misc control register is 32bit wide, the used readw/writew
accessors only mainipulate the low 16bit of this register. It
currently doesn't matter as all the bit changed are located in
the lower half, but together with the u32 variable used to hold
the contents of the register it is seriously confusing.

Switch to 32bit accessors to avoid any future breakage.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>

authored by

Lucas Stach and committed by
Ulf Hansson
1b84def8 7ad2ed1d

+2 -2
+2 -2
drivers/mmc/host/sdhci-tegra.c
··· 140 140 if (!(mask & SDHCI_RESET_ALL)) 141 141 return; 142 142 143 - misc_ctrl = sdhci_readw(host, SDHCI_TEGRA_VENDOR_MISC_CTRL); 143 + misc_ctrl = sdhci_readl(host, SDHCI_TEGRA_VENDOR_MISC_CTRL); 144 144 /* Erratum: Enable SDHCI spec v3.00 support */ 145 145 if (soc_data->nvquirks & NVQUIRK_ENABLE_SDHCI_SPEC_300) 146 146 misc_ctrl |= SDHCI_MISC_CTRL_ENABLE_SDHCI_SPEC_300; ··· 151 151 misc_ctrl |= SDHCI_MISC_CTRL_ENABLE_DDR50; 152 152 if (soc_data->nvquirks & NVQUIRK_ENABLE_SDR104) 153 153 misc_ctrl |= SDHCI_MISC_CTRL_ENABLE_SDR104; 154 - sdhci_writew(host, misc_ctrl, SDHCI_TEGRA_VENDOR_MISC_CTRL); 154 + sdhci_writel(host, misc_ctrl, SDHCI_TEGRA_VENDOR_MISC_CTRL); 155 155 156 156 clk_ctrl = sdhci_readl(host, SDHCI_TEGRA_VENDOR_CLOCK_CTRL); 157 157 clk_ctrl &= ~SDHCI_CLOCK_CTRL_SPI_MODE_CLKEN_OVERRIDE;