diff options
author | Nagesh Penumarty <vpenumarty@nvidia.com> | 2010-03-26 17:50:28 +0530 |
---|---|---|
committer | Gary King <gking@nvidia.com> | 2010-03-30 15:12:53 -0800 |
commit | 68f7bc2e1198fc0f40a947efedb8d3120e5098ed (patch) | |
tree | bc3369fa774faad63d93e1196a659b117087aaf4 /drivers | |
parent | 15e601183b513960c1803389d274b2bfb7bc60f0 (diff) |
Use CONFIG_ARCH_TEGRA_XX_SOC instead of RM caps
Use CONFIG_ARCH_TEGRA_XX_SOC defines for differentiating
between various tegra SOCs instead of getting the SOC caps
from the RM. With this change enabling quirks for various
chips would be much simpler.
Tested on Android, whistler.
Bug 661035 SD 3.0 support in the linux native driver.
Change-Id: I0a85f3464d00080673a351d1614f311f1855bdae
Reviewed-on: http://git-master/r/969
Reviewed-by: Gary King <gking@nvidia.com>
Tested-by: Gary King <gking@nvidia.com>
Diffstat (limited to 'drivers')
-rwxr-xr-x | drivers/mmc/host/sdhci-tegra.c | 33 |
1 files changed, 8 insertions, 25 deletions
diff --git a/drivers/mmc/host/sdhci-tegra.c b/drivers/mmc/host/sdhci-tegra.c index 9e5798674f9d..a7dcb74c06b6 100755 --- a/drivers/mmc/host/sdhci-tegra.c +++ b/drivers/mmc/host/sdhci-tegra.c @@ -167,10 +167,6 @@ static struct sdhci_ops tegra_sdhci_ops = { #endif }; -struct sdioCaps { - NvBool EnableDmaSupport; -}; - int __init tegra_sdhci_probe(struct platform_device *pdev) { struct sdhci_host *sdhost; @@ -187,19 +183,9 @@ int __init tegra_sdhci_probe(struct platform_device *pdev) #endif NvRmModuleSdmmcInterfaceCaps SdioInterfaceCaps; - struct sdioCaps sdioCapsArray[2]; - struct sdioCaps *pSdioCaps = NULL; - NvRmModuleCapability sdioAllChipCaps[] = { - {1, 0, 0, &sdioCapsArray[0]}, - {2, 0, 0, &sdioCapsArray[1]}, - }; const NvOdmGpioPinInfo *gp_info; NvU32 PinCount; - /* Only enable DMA support on AP2x chips */ - sdioCapsArray[0].EnableDmaSupport = NV_FALSE; - sdioCapsArray[1].EnableDmaSupport = NV_TRUE; - if (pdev->id == -1) return -ENODEV; ModId = NVRM_MODULE_ID(NvRmModuleID_Sdio, pdev->id); @@ -275,11 +261,6 @@ int __init tegra_sdhci_probe(struct platform_device *pdev) NvRmModuleReset(s_hRmGlobal, ModId); NvOdmSdioResume(host->hSdioHandle); - NvRmModuleGetCapabilities(s_hRmGlobal, - NVRM_MODULE_ID(NvRmModuleID_Sdio, pdev->id), - sdioAllChipCaps, NV_ARRAY_SIZE(sdioAllChipCaps), - (void**)&pSdioCaps); - sdhost->hw_name = "tegra"; sdhost->ops = &tegra_sdhci_ops; sdhost->irq = irq; @@ -297,12 +278,14 @@ int __init tegra_sdhci_probe(struct platform_device *pdev) SDHCI_QUIRK_PRESENT_STATE_REGISTER_INVALID | SDHCI_QUIRK_BROKEN_CTRL_HISPD; - if (!pSdioCaps->EnableDmaSupport) - sdhost->quirks |= SDHCI_QUIRK_BROKEN_DMA; - else { - sdhost->quirks |= SDHCI_QUIRK_BROKEN_SPEC_VERSION; - sdhost->quirks |= SDHCI_QUIRK_32KB_MAX_ADMA_SIZE; - } +#ifdef CONFIG_ARCH_TEGRA_1x_SOC + sdhost->quirks |= SDHCI_QUIRK_BROKEN_DMA; +#elif CONFIG_ARCH_TEGRA_2x_SOC + sdhost->quirks |= SDHCI_QUIRK_BROKEN_SPEC_VERSION | + SDHCI_QUIRK_32KB_MAX_ADMA_SIZE; +#else +#error "Not defined for this processor" +#endif err1 = NvRmGetModuleInterfaceCapabilities(s_hRmGlobal, NVRM_MODULE_ID(NvRmModuleID_Sdio, pdev->id), |