mirror of https://gitee.com/openkylin/linux.git
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>
This commit is contained in:
parent
7ad2ed1dfc
commit
1b84def8bf
|
@ -140,7 +140,7 @@ static void tegra_sdhci_reset(struct sdhci_host *host, u8 mask)
|
||||||
if (!(mask & SDHCI_RESET_ALL))
|
if (!(mask & SDHCI_RESET_ALL))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
misc_ctrl = sdhci_readw(host, SDHCI_TEGRA_VENDOR_MISC_CTRL);
|
misc_ctrl = sdhci_readl(host, SDHCI_TEGRA_VENDOR_MISC_CTRL);
|
||||||
/* Erratum: Enable SDHCI spec v3.00 support */
|
/* Erratum: Enable SDHCI spec v3.00 support */
|
||||||
if (soc_data->nvquirks & NVQUIRK_ENABLE_SDHCI_SPEC_300)
|
if (soc_data->nvquirks & NVQUIRK_ENABLE_SDHCI_SPEC_300)
|
||||||
misc_ctrl |= SDHCI_MISC_CTRL_ENABLE_SDHCI_SPEC_300;
|
misc_ctrl |= SDHCI_MISC_CTRL_ENABLE_SDHCI_SPEC_300;
|
||||||
|
@ -151,7 +151,7 @@ static void tegra_sdhci_reset(struct sdhci_host *host, u8 mask)
|
||||||
misc_ctrl |= SDHCI_MISC_CTRL_ENABLE_DDR50;
|
misc_ctrl |= SDHCI_MISC_CTRL_ENABLE_DDR50;
|
||||||
if (soc_data->nvquirks & NVQUIRK_ENABLE_SDR104)
|
if (soc_data->nvquirks & NVQUIRK_ENABLE_SDR104)
|
||||||
misc_ctrl |= SDHCI_MISC_CTRL_ENABLE_SDR104;
|
misc_ctrl |= SDHCI_MISC_CTRL_ENABLE_SDR104;
|
||||||
sdhci_writew(host, misc_ctrl, SDHCI_TEGRA_VENDOR_MISC_CTRL);
|
sdhci_writel(host, misc_ctrl, SDHCI_TEGRA_VENDOR_MISC_CTRL);
|
||||||
|
|
||||||
clk_ctrl = sdhci_readl(host, SDHCI_TEGRA_VENDOR_CLOCK_CTRL);
|
clk_ctrl = sdhci_readl(host, SDHCI_TEGRA_VENDOR_CLOCK_CTRL);
|
||||||
clk_ctrl &= ~SDHCI_CLOCK_CTRL_SPI_MODE_CLKEN_OVERRIDE;
|
clk_ctrl &= ~SDHCI_CLOCK_CTRL_SPI_MODE_CLKEN_OVERRIDE;
|
||||||
|
|
Loading…
Reference in New Issue