mmc: tegra: Constify SoC data
Subsystems (3)
PATCH 1/2 mmc: tegra: Constify SoC data
From: Thierry Reding <[email protected]>
The data in the SoC description structures is static and can therefore reside in read-only memory.
--- drivers/mmc/host/sdhci-tegra.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/mmc/host/sdhci-tegra.c +3 -3
@@ -184,7 +184,7 @@ static const struct sdhci_pltfm_data sdhci_tegra20_pdata = { .ops = &tegra_sdhci_ops, }; -static struct sdhci_tegra_soc_data soc_data_tegra20 = { +static const struct sdhci_tegra_soc_data soc_data_tegra20 = { .pdata = &sdhci_tegra20_pdata, .nvquirks =NVQUIRK_FORCE_SDHCI_SPEC_200 |NVQUIRK_ENABLE_BLOCK_GAP_DET ,
@@ -200,7 +200,7 @@ static const struct sdhci_pltfm_data sdhci_tegra30_pdata = { .ops = &tegra_sdhci_ops, }; -static struct sdhci_tegra_soc_data soc_data_tegra30 = { +static const struct sdhci_tegra_soc_data soc_data_tegra30 = { .pdata = &sdhci_tegra30_pdata, .nvquirks =NVQUIRK_ENABLE_SDHCI_SPEC_300 | NVQUIRK_DISABLE_SDR50 |
@@ -229,7 +229,7 @@ static const struct sdhci_pltfm_data sdhci_tegra114_pdata = { .ops = &tegra114_sdhci_ops, }; -static struct sdhci_tegra_soc_data soc_data_tegra114 = { +static const struct sdhci_tegra_soc_data soc_data_tegra114 = { .pdata = &sdhci_tegra114_pdata, .nvquirks =NVQUIRK_DISABLE_SDR50 | NVQUIRK_DISABLE_DDR50 |
Signature · 1 line
2.5.0
A message that is not in the archive (sent off-list or not yet received): 1447666035-10044-1-git-send-email-thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
PATCH 2/2 mmc: tegra: Add Tegra210 support
From: Thierry Reding <[email protected]>
--- drivers/mmc/host/sdhci-tegra.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)
drivers/mmc/host/sdhci-tegra.c +17 -0
@@ -236,7 +236,24 @@ static const struct sdhci_tegra_soc_data soc_data_tegra114 = { NVQUIRK_DISABLE_SDR104, }; +static const struct sdhci_pltfm_data sdhci_tegra210_pdata = { + .quirks =SDHCI_QUIRK_BROKEN_TIMEOUT_VAL | +SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK | +SDHCI_QUIRK_SINGLE_POWER_WRITE | +SDHCI_QUIRK_NO_HISPD_BIT | +SDHCI_QUIRK_BROKEN_ADMA_ZEROLEN_DESC , + .ops = &tegra114_sdhci_ops, +}; + +static const struct sdhci_tegra_soc_data soc_data_tegra210 = { + .pdata = &sdhci_tegra210_pdata, + .nvquirks =NVQUIRK_DISABLE_SDR50 | +NVQUIRK_DISABLE_DDR50 | +NVQUIRK_DISABLE_SDR104 , +}; +static const struct of_device_id sdhci_tegra_dt_match[] = { + { .compatible ="nvidia,tegra210-sdhci" , .data = &soc_data_tegra210 }, { .compatible ="nvidia,tegra124-sdhci" , .data = &soc_data_tegra114 }, { .compatible ="nvidia,tegra114-sdhci" , .data = &soc_data_tegra114 }, { .compatible ="nvidia,tegra30-sdhci" , .data = &soc_data_tegra30 },
Signature · 1 line
2.5.0
A message that is not in the archive (sent off-list or not yet received): 1447666035-10044-2-git-send-email-thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Ulf Hansson
AppliedRe: [PATCH 2/2] mmc: tegra: Add Tegra210 support
Quoted 3 lines · Thierry Reding
From: Thierry Reding <[email protected]>
Signed-off-by Thierry Reding <[email protected]>
Thanks, applied for next!
Kind regards
Uffe
Quoted 36 lines
--- drivers/mmc/host/sdhci-tegra.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)drivers/mmc/host/sdhci-tegra.c +17
-1@@ -236,7 +236,24 @@ static const struct sdhci_tegra_soc_data soc_data_tegra114 = { NVQUIRK_DISABLE_SDR104, }; +static const struct sdhci_pltfm_data sdhci_tegra210_pdata = { + .quirks =SDHCI_QUIRK_BROKEN_TIMEOUT_VAL | +SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK | +SDHCI_QUIRK_SINGLE_POWER_WRITE | +SDHCI_QUIRK_NO_HISPD_BIT | +SDHCI_QUIRK_BROKEN_ADMA_ZEROLEN_DESC , + .ops = &tegra114_sdhci_ops, +}; + +static const struct sdhci_tegra_soc_data soc_data_tegra210 = { + .pdata = &sdhci_tegra210_pdata, + .nvquirks =NVQUIRK_DISABLE_SDR50 | +NVQUIRK_DISABLE_DDR50 | +NVQUIRK_DISABLE_SDR104 , +}; +static const struct of_device_id sdhci_tegra_dt_match[] = { + { .compatible ="nvidia,tegra210-sdhci" , .data = &soc_data_tegra210 }, { .compatible ="nvidia,tegra124-sdhci" , .data = &soc_data_tegra114 }, { .compatible ="nvidia,tegra114-sdhci" , .data = &soc_data_tegra114 }, { .compatible ="nvidia,tegra30-sdhci" , .data = &soc_data_tegra30 }, --2.5.0
Ulf Hansson
AppliedQuoted 6 lines · Thierry Reding
From: Thierry Reding <[email protected]>
The data in the SoC description structures is static and can therefore reside in read-only memory.
Signed-off-by Thierry Reding <[email protected]>
Thanks, applied for next!
Kind regards
Uffe
Quoted 38 lines
--- drivers/mmc/host/sdhci-tegra.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)drivers/mmc/host/sdhci-tegra.c +3
-4@@ -184,7 +184,7 @@ static const struct sdhci_pltfm_data sdhci_tegra20_pdata = { .ops = &tegra_sdhci_ops, }; -static struct sdhci_tegra_soc_data soc_data_tegra20 = { +static const struct sdhci_tegra_soc_data soc_data_tegra20 = { .pdata = &sdhci_tegra20_pdata, .nvquirks =NVQUIRK_FORCE_SDHCI_SPEC_200 |NVQUIRK_ENABLE_BLOCK_GAP_DET ,@@ -200,7 +200,7 @@ static const struct sdhci_pltfm_data sdhci_tegra30_pdata = { .ops = &tegra_sdhci_ops, }; -static struct sdhci_tegra_soc_data soc_data_tegra30 = { +static const struct sdhci_tegra_soc_data soc_data_tegra30 = { .pdata = &sdhci_tegra30_pdata, .nvquirks =NVQUIRK_ENABLE_SDHCI_SPEC_300 | NVQUIRK_DISABLE_SDR50 |@@ -229,7 +229,7 @@ static const struct sdhci_pltfm_data sdhci_tegra114_pdata = { .ops = &tegra114_sdhci_ops, }; -static struct sdhci_tegra_soc_data soc_data_tegra114 = { +static const struct sdhci_tegra_soc_data soc_data_tegra114 = { .pdata = &sdhci_tegra114_pdata, .nvquirks =NVQUIRK_DISABLE_SDR50 | NVQUIRK_DISABLE_DDR50 | --2.5.0