NVIDIA: SAUCE: mmc: host: Use tegra_sku_info
BugLink: https://bugs.launchpad.net/bugs/2072591 The structure 'tegra_sku_info' is exported by upstream kernels and so use this to identify the Tegra platform instead of exporting tegra_get_platform(). http://nvbugs/2849456 http://nvbugs/4359070 Signed-off-by: Jon Hunter <jonathanh@nvidia.com> Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Acked-by: Jacob Martin <jacob.martin@canonical.com> Acked-by: Noah Wager <noah.wager@canonical.com> Signed-off-by: Noah Wager <noah.wager@canonical.com>
This commit is contained in:
@@ -193,7 +193,7 @@ static u16 tegra_sdhci_readw(struct sdhci_host *host, int reg)
|
||||
struct sdhci_tegra *tegra_host = sdhci_pltfm_priv(pltfm_host);
|
||||
const struct sdhci_tegra_soc_data *soc_data = tegra_host->soc_data;
|
||||
|
||||
if ((tegra_get_platform() == TEGRA_PLATFORM_VSP) && (reg > SDHCI_HOST_VERSION))
|
||||
if ((tegra_sku_info.platform == TEGRA_PLATFORM_VSP) && (reg > SDHCI_HOST_VERSION))
|
||||
return 0;
|
||||
|
||||
if (unlikely((soc_data->nvquirks & NVQUIRK_FORCE_SDHCI_SPEC_200) &&
|
||||
@@ -209,7 +209,7 @@ static void tegra_sdhci_writew(struct sdhci_host *host, u16 val, int reg)
|
||||
{
|
||||
struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
|
||||
|
||||
if ((tegra_get_platform() == TEGRA_PLATFORM_VSP) && (reg > SDHCI_HOST_VERSION))
|
||||
if ((tegra_sku_info.platform == TEGRA_PLATFORM_VSP) && (reg > SDHCI_HOST_VERSION))
|
||||
return;
|
||||
|
||||
switch (reg) {
|
||||
@@ -235,7 +235,7 @@ static void tegra_sdhci_writel(struct sdhci_host *host, u32 val, int reg)
|
||||
struct sdhci_tegra *tegra_host = sdhci_pltfm_priv(pltfm_host);
|
||||
const struct sdhci_tegra_soc_data *soc_data = tegra_host->soc_data;
|
||||
|
||||
if ((tegra_get_platform() == TEGRA_PLATFORM_VSP) && (reg > SDHCI_HOST_VERSION))
|
||||
if ((tegra_sku_info.platform == TEGRA_PLATFORM_VSP) && (reg > SDHCI_HOST_VERSION))
|
||||
return;
|
||||
/* Seems like we're getting spurious timeout and crc errors, so
|
||||
* disable signalling of them. In case of real errors software
|
||||
@@ -543,7 +543,7 @@ static void tegra_sdhci_pad_autocalib(struct sdhci_host *host)
|
||||
u32 reg;
|
||||
int ret;
|
||||
|
||||
if (tegra_get_platform() == TEGRA_PLATFORM_VSP)
|
||||
if (tegra_sku_info.platform == TEGRA_PLATFORM_VSP)
|
||||
return;
|
||||
switch (ios->timing) {
|
||||
case MMC_TIMING_UHS_SDR104:
|
||||
@@ -1776,7 +1776,7 @@ static int sdhci_tegra_probe(struct platform_device *pdev)
|
||||
|
||||
tegra_host->tmclk = clk;
|
||||
}
|
||||
if (tegra_get_platform() == TEGRA_PLATFORM_VSP)
|
||||
if (tegra_sku_info.platform == TEGRA_PLATFORM_VSP)
|
||||
host->quirks2 |= SDHCI_QUIRK2_BROKEN_64_BIT_DMA;
|
||||
if (!tegra_host->skip_clk_rst) {
|
||||
clk = devm_clk_get(mmc_dev(host->mmc), NULL);
|
||||
|
||||
+12
-12
@@ -677,7 +677,7 @@ struct sdhci_ops {
|
||||
|
||||
static inline void sdhci_writel(struct sdhci_host *host, u32 val, int reg)
|
||||
{
|
||||
if ((tegra_get_platform() == TEGRA_PLATFORM_VSP) && (reg > SDHCI_HOST_VERSION))
|
||||
if ((tegra_sku_info.platform == TEGRA_PLATFORM_VSP) && (reg > SDHCI_HOST_VERSION))
|
||||
return;
|
||||
if (unlikely(host->ops->write_l))
|
||||
host->ops->write_l(host, val, reg);
|
||||
@@ -687,7 +687,7 @@ static inline void sdhci_writel(struct sdhci_host *host, u32 val, int reg)
|
||||
|
||||
static inline void sdhci_writew(struct sdhci_host *host, u16 val, int reg)
|
||||
{
|
||||
if ((tegra_get_platform() == TEGRA_PLATFORM_VSP) && (reg > SDHCI_HOST_VERSION))
|
||||
if ((tegra_sku_info.platform == TEGRA_PLATFORM_VSP) && (reg > SDHCI_HOST_VERSION))
|
||||
return;
|
||||
if (unlikely(host->ops->write_w))
|
||||
host->ops->write_w(host, val, reg);
|
||||
@@ -697,7 +697,7 @@ static inline void sdhci_writew(struct sdhci_host *host, u16 val, int reg)
|
||||
|
||||
static inline void sdhci_writeb(struct sdhci_host *host, u8 val, int reg)
|
||||
{
|
||||
if ((tegra_get_platform() == TEGRA_PLATFORM_VSP) && (reg > SDHCI_HOST_VERSION))
|
||||
if ((tegra_sku_info.platform == TEGRA_PLATFORM_VSP) && (reg > SDHCI_HOST_VERSION))
|
||||
return;
|
||||
if (unlikely(host->ops->write_b))
|
||||
host->ops->write_b(host, val, reg);
|
||||
@@ -707,7 +707,7 @@ static inline void sdhci_writeb(struct sdhci_host *host, u8 val, int reg)
|
||||
|
||||
static inline u32 sdhci_readl(struct sdhci_host *host, int reg)
|
||||
{
|
||||
if ((tegra_get_platform() == TEGRA_PLATFORM_VSP) && (reg > SDHCI_HOST_VERSION))
|
||||
if ((tegra_sku_info.platform == TEGRA_PLATFORM_VSP) && (reg > SDHCI_HOST_VERSION))
|
||||
return 0;
|
||||
if (unlikely(host->ops->read_l))
|
||||
return host->ops->read_l(host, reg);
|
||||
@@ -717,7 +717,7 @@ static inline u32 sdhci_readl(struct sdhci_host *host, int reg)
|
||||
|
||||
static inline u16 sdhci_readw(struct sdhci_host *host, int reg)
|
||||
{
|
||||
if ((tegra_get_platform() == TEGRA_PLATFORM_VSP) && (reg > SDHCI_HOST_VERSION))
|
||||
if ((tegra_sku_info.platform == TEGRA_PLATFORM_VSP) && (reg > SDHCI_HOST_VERSION))
|
||||
return 0;
|
||||
if (unlikely(host->ops->read_w))
|
||||
return host->ops->read_w(host, reg);
|
||||
@@ -727,7 +727,7 @@ static inline u16 sdhci_readw(struct sdhci_host *host, int reg)
|
||||
|
||||
static inline u8 sdhci_readb(struct sdhci_host *host, int reg)
|
||||
{
|
||||
if ((tegra_get_platform() == TEGRA_PLATFORM_VSP) && (reg > SDHCI_HOST_VERSION))
|
||||
if ((tegra_sku_info.platform == TEGRA_PLATFORM_VSP) && (reg > SDHCI_HOST_VERSION))
|
||||
return 0;
|
||||
if (unlikely(host->ops->read_b))
|
||||
return host->ops->read_b(host, reg);
|
||||
@@ -739,42 +739,42 @@ static inline u8 sdhci_readb(struct sdhci_host *host, int reg)
|
||||
|
||||
static inline void sdhci_writel(struct sdhci_host *host, u32 val, int reg)
|
||||
{
|
||||
if ((tegra_get_platform() == TEGRA_PLATFORM_VSP) && (reg > SDHCI_HOST_VERSION))
|
||||
if ((tegra_sku_info.platform == TEGRA_PLATFORM_VSP) && (reg > SDHCI_HOST_VERSION))
|
||||
return;
|
||||
writel(val, host->ioaddr + reg);
|
||||
}
|
||||
|
||||
static inline void sdhci_writew(struct sdhci_host *host, u16 val, int reg)
|
||||
{
|
||||
if ((tegra_get_platform() == TEGRA_PLATFORM_VSP) && (reg > SDHCI_HOST_VERSION))
|
||||
if ((tegra_sku_info.platform == TEGRA_PLATFORM_VSP) && (reg > SDHCI_HOST_VERSION))
|
||||
return;
|
||||
writew(val, host->ioaddr + reg);
|
||||
}
|
||||
|
||||
static inline void sdhci_writeb(struct sdhci_host *host, u8 val, int reg)
|
||||
{
|
||||
if ((tegra_get_platform() == TEGRA_PLATFORM_VSP) && (reg > SDHCI_HOST_VERSION))
|
||||
if ((tegra_sku_info.platform == TEGRA_PLATFORM_VSP) && (reg > SDHCI_HOST_VERSION))
|
||||
return;
|
||||
writeb(val, host->ioaddr + reg);
|
||||
}
|
||||
|
||||
static inline u32 sdhci_readl(struct sdhci_host *host, int reg)
|
||||
{
|
||||
if ((tegra_get_platform() == TEGRA_PLATFORM_VSP) && (reg > SDHCI_HOST_VERSION))
|
||||
if ((tegra_sku_info.platform == TEGRA_PLATFORM_VSP) && (reg > SDHCI_HOST_VERSION))
|
||||
return 0;
|
||||
return readl(host->ioaddr + reg);
|
||||
}
|
||||
|
||||
static inline u16 sdhci_readw(struct sdhci_host *host, int reg)
|
||||
{
|
||||
if ((tegra_get_platform() == TEGRA_PLATFORM_VSP) && (reg > SDHCI_HOST_VERSION))
|
||||
if ((tegra_sku_info.platform == TEGRA_PLATFORM_VSP) && (reg > SDHCI_HOST_VERSION))
|
||||
return 0;
|
||||
return readw(host->ioaddr + reg);
|
||||
}
|
||||
|
||||
static inline u8 sdhci_readb(struct sdhci_host *host, int reg)
|
||||
{
|
||||
if ((tegra_get_platform() == TEGRA_PLATFORM_VSP) && (reg > SDHCI_HOST_VERSION))
|
||||
if ((tegra_sku_info.platform == TEGRA_PLATFORM_VSP) && (reg > SDHCI_HOST_VERSION))
|
||||
return 0;
|
||||
return readb(host->ioaddr + reg);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user