diff options
author | Shawn Guo <shawn.guo@linaro.org> | 2011-07-20 17:13:36 -0400 |
---|---|---|
committer | Chris Ball <cjb@laptop.org> | 2011-07-20 17:20:38 -0400 |
commit | e307148fd4f971cecfaebb516ee28e164948a24b (patch) | |
tree | a57fd2fda7d70d8936ac7c9b433f93dac540b665 /drivers/mmc/host/sdhci-of-esdhc.c | |
parent | 85d6509dc8ca24b2b652863ef7a75622ddca17d6 (diff) |
mmc: sdhci: eliminate sdhci_of_host and sdhci_of_data
The patch migrates the use of sdhci_of_host and sdhci_of_data to
sdhci_pltfm_host and sdhci_pltfm_data, so that the former pair can
be eliminated.
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Reviewed-by: Grant Likely <grant.likely@secretlab.ca>
Reviewed-by: Wolfram Sang <w.sang@pengutronix.de>
Acked-by: Anton Vorontsov <cbouatmailru@gmail.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc/host/sdhci-of-esdhc.c')
-rw-r--r-- | drivers/mmc/host/sdhci-of-esdhc.c | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/drivers/mmc/host/sdhci-of-esdhc.c b/drivers/mmc/host/sdhci-of-esdhc.c index ba40d6d035c7..492bcd72180a 100644 --- a/drivers/mmc/host/sdhci-of-esdhc.c +++ b/drivers/mmc/host/sdhci-of-esdhc.c | |||
@@ -60,32 +60,34 @@ static int esdhc_of_enable_dma(struct sdhci_host *host) | |||
60 | 60 | ||
61 | static unsigned int esdhc_of_get_max_clock(struct sdhci_host *host) | 61 | static unsigned int esdhc_of_get_max_clock(struct sdhci_host *host) |
62 | { | 62 | { |
63 | struct sdhci_of_host *of_host = sdhci_priv(host); | 63 | struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); |
64 | 64 | ||
65 | return of_host->clock; | 65 | return pltfm_host->clock; |
66 | } | 66 | } |
67 | 67 | ||
68 | static unsigned int esdhc_of_get_min_clock(struct sdhci_host *host) | 68 | static unsigned int esdhc_of_get_min_clock(struct sdhci_host *host) |
69 | { | 69 | { |
70 | struct sdhci_of_host *of_host = sdhci_priv(host); | 70 | struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); |
71 | 71 | ||
72 | return of_host->clock / 256 / 16; | 72 | return pltfm_host->clock / 256 / 16; |
73 | } | 73 | } |
74 | 74 | ||
75 | struct sdhci_of_data sdhci_esdhc = { | 75 | static struct sdhci_ops sdhci_esdhc_ops = { |
76 | .read_l = sdhci_be32bs_readl, | ||
77 | .read_w = esdhc_readw, | ||
78 | .read_b = sdhci_be32bs_readb, | ||
79 | .write_l = sdhci_be32bs_writel, | ||
80 | .write_w = esdhc_writew, | ||
81 | .write_b = esdhc_writeb, | ||
82 | .set_clock = esdhc_set_clock, | ||
83 | .enable_dma = esdhc_of_enable_dma, | ||
84 | .get_max_clock = esdhc_of_get_max_clock, | ||
85 | .get_min_clock = esdhc_of_get_min_clock, | ||
86 | }; | ||
87 | |||
88 | struct sdhci_pltfm_data sdhci_esdhc_pdata = { | ||
76 | /* card detection could be handled via GPIO */ | 89 | /* card detection could be handled via GPIO */ |
77 | .quirks = ESDHC_DEFAULT_QUIRKS | SDHCI_QUIRK_BROKEN_CARD_DETECTION | 90 | .quirks = ESDHC_DEFAULT_QUIRKS | SDHCI_QUIRK_BROKEN_CARD_DETECTION |
78 | | SDHCI_QUIRK_NO_CARD_NO_RESET, | 91 | | SDHCI_QUIRK_NO_CARD_NO_RESET, |
79 | .ops = { | 92 | .ops = &sdhci_esdhc_ops, |
80 | .read_l = sdhci_be32bs_readl, | ||
81 | .read_w = esdhc_readw, | ||
82 | .read_b = sdhci_be32bs_readb, | ||
83 | .write_l = sdhci_be32bs_writel, | ||
84 | .write_w = esdhc_writew, | ||
85 | .write_b = esdhc_writeb, | ||
86 | .set_clock = esdhc_set_clock, | ||
87 | .enable_dma = esdhc_of_enable_dma, | ||
88 | .get_max_clock = esdhc_of_get_max_clock, | ||
89 | .get_min_clock = esdhc_of_get_min_clock, | ||
90 | }, | ||
91 | }; | 93 | }; |