blob: 436186ccbbe21c3158426b5c362228fd0b95fe84 [file] [log] [blame]
Olof Johansson03d2bfc2011-01-01 23:52:56 -05001/*
2 * Copyright (C) 2010 Google, Inc.
3 *
4 * This software is licensed under the terms of the GNU General Public
5 * License version 2, as published by the Free Software Foundation, and
6 * may be copied, distributed, and modified under those terms.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 */
14
15#include <linux/err.h>
Paul Gortmaker96547f52011-07-03 15:15:51 -040016#include <linux/module.h>
Olof Johansson03d2bfc2011-01-01 23:52:56 -050017#include <linux/init.h>
18#include <linux/platform_device.h>
19#include <linux/clk.h>
20#include <linux/io.h>
Stephen Warren55cd65e2011-08-30 13:17:16 -060021#include <linux/of.h>
Stephen Warren3e44a1a2012-02-01 16:30:55 -070022#include <linux/of_device.h>
Grant Likely275173b2011-08-23 12:15:33 -060023#include <linux/of_gpio.h>
Olof Johansson03d2bfc2011-01-01 23:52:56 -050024#include <linux/gpio.h>
25#include <linux/mmc/card.h>
26#include <linux/mmc/host.h>
27
Russell Kinge6b750d2011-07-26 10:59:32 +010028#include <asm/gpio.h>
Stephen Warrenea5abbd2011-09-26 19:00:02 +010029
30#include <mach/gpio-tegra.h>
Olof Johansson03d2bfc2011-01-01 23:52:56 -050031#include <mach/sdhci.h>
32
Olof Johansson03d2bfc2011-01-01 23:52:56 -050033#include "sdhci-pltfm.h"
34
Pavan Kunapulica5879d2012-04-18 18:48:02 +053035/* Tegra SDHOST controller vendor register definitions */
36#define SDHCI_TEGRA_VENDOR_MISC_CTRL 0x120
37#define SDHCI_MISC_CTRL_ENABLE_SDHCI_SPEC_300 0x20
38
Stephen Warren3e44a1a2012-02-01 16:30:55 -070039#define NVQUIRK_FORCE_SDHCI_SPEC_200 BIT(0)
40#define NVQUIRK_ENABLE_BLOCK_GAP_DET BIT(1)
Pavan Kunapulica5879d2012-04-18 18:48:02 +053041#define NVQUIRK_ENABLE_SDHCI_SPEC_300 BIT(2)
Stephen Warren3e44a1a2012-02-01 16:30:55 -070042
43struct sdhci_tegra_soc_data {
44 struct sdhci_pltfm_data *pdata;
45 u32 nvquirks;
46};
47
48struct sdhci_tegra {
49 const struct tegra_sdhci_platform_data *plat;
50 const struct sdhci_tegra_soc_data *soc_data;
51};
52
Olof Johansson03d2bfc2011-01-01 23:52:56 -050053static u32 tegra_sdhci_readl(struct sdhci_host *host, int reg)
54{
55 u32 val;
56
57 if (unlikely(reg == SDHCI_PRESENT_STATE)) {
58 /* Use wp_gpio here instead? */
59 val = readl(host->ioaddr + reg);
60 return val | SDHCI_WRITE_PROTECT;
61 }
62
63 return readl(host->ioaddr + reg);
64}
65
66static u16 tegra_sdhci_readw(struct sdhci_host *host, int reg)
67{
Stephen Warren3e44a1a2012-02-01 16:30:55 -070068 struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
69 struct sdhci_tegra *tegra_host = pltfm_host->priv;
70 const struct sdhci_tegra_soc_data *soc_data = tegra_host->soc_data;
71
72 if (unlikely((soc_data->nvquirks & NVQUIRK_FORCE_SDHCI_SPEC_200) &&
73 (reg == SDHCI_HOST_VERSION))) {
Olof Johansson03d2bfc2011-01-01 23:52:56 -050074 /* Erratum: Version register is invalid in HW. */
75 return SDHCI_SPEC_200;
76 }
77
78 return readw(host->ioaddr + reg);
79}
80
81static void tegra_sdhci_writel(struct sdhci_host *host, u32 val, int reg)
82{
Stephen Warren3e44a1a2012-02-01 16:30:55 -070083 struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
84 struct sdhci_tegra *tegra_host = pltfm_host->priv;
85 const struct sdhci_tegra_soc_data *soc_data = tegra_host->soc_data;
86
Olof Johansson03d2bfc2011-01-01 23:52:56 -050087 /* Seems like we're getting spurious timeout and crc errors, so
88 * disable signalling of them. In case of real errors software
89 * timers should take care of eventually detecting them.
90 */
91 if (unlikely(reg == SDHCI_SIGNAL_ENABLE))
92 val &= ~(SDHCI_INT_TIMEOUT|SDHCI_INT_CRC);
93
94 writel(val, host->ioaddr + reg);
95
Stephen Warren3e44a1a2012-02-01 16:30:55 -070096 if (unlikely((soc_data->nvquirks & NVQUIRK_ENABLE_BLOCK_GAP_DET) &&
97 (reg == SDHCI_INT_ENABLE))) {
Olof Johansson03d2bfc2011-01-01 23:52:56 -050098 /* Erratum: Must enable block gap interrupt detection */
99 u8 gap_ctrl = readb(host->ioaddr + SDHCI_BLOCK_GAP_CONTROL);
100 if (val & SDHCI_INT_CARD_INT)
101 gap_ctrl |= 0x8;
102 else
103 gap_ctrl &= ~0x8;
104 writeb(gap_ctrl, host->ioaddr + SDHCI_BLOCK_GAP_CONTROL);
105 }
106}
107
Stephen Warren3e44a1a2012-02-01 16:30:55 -0700108static unsigned int tegra_sdhci_get_ro(struct sdhci_host *host)
Olof Johansson03d2bfc2011-01-01 23:52:56 -0500109{
Stephen Warren3e44a1a2012-02-01 16:30:55 -0700110 struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
111 struct sdhci_tegra *tegra_host = pltfm_host->priv;
112 const struct tegra_sdhci_platform_data *plat = tegra_host->plat;
Olof Johansson03d2bfc2011-01-01 23:52:56 -0500113
114 if (!gpio_is_valid(plat->wp_gpio))
115 return -1;
116
117 return gpio_get_value(plat->wp_gpio);
118}
119
120static irqreturn_t carddetect_irq(int irq, void *data)
121{
122 struct sdhci_host *sdhost = (struct sdhci_host *)data;
123
124 tasklet_schedule(&sdhost->card_tasklet);
125 return IRQ_HANDLED;
126};
127
Pavan Kunapulica5879d2012-04-18 18:48:02 +0530128static void tegra_sdhci_reset_exit(struct sdhci_host *host, u8 mask)
129{
130 struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
131 struct sdhci_tegra *tegra_host = pltfm_host->priv;
132 const struct sdhci_tegra_soc_data *soc_data = tegra_host->soc_data;
133
134 if (!(mask & SDHCI_RESET_ALL))
135 return;
136
137 /* Erratum: Enable SDHCI spec v3.00 support */
138 if (soc_data->nvquirks & NVQUIRK_ENABLE_SDHCI_SPEC_300) {
139 u32 misc_ctrl;
140
141 misc_ctrl = sdhci_readb(host, SDHCI_TEGRA_VENDOR_MISC_CTRL);
142 misc_ctrl |= SDHCI_MISC_CTRL_ENABLE_SDHCI_SPEC_300;
143 sdhci_writeb(host, misc_ctrl, SDHCI_TEGRA_VENDOR_MISC_CTRL);
144 }
145}
146
Olof Johansson03d2bfc2011-01-01 23:52:56 -0500147static int tegra_sdhci_8bit(struct sdhci_host *host, int bus_width)
148{
Grant Likely275173b2011-08-23 12:15:33 -0600149 struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
Stephen Warren3e44a1a2012-02-01 16:30:55 -0700150 struct sdhci_tegra *tegra_host = pltfm_host->priv;
151 const struct tegra_sdhci_platform_data *plat = tegra_host->plat;
Olof Johansson03d2bfc2011-01-01 23:52:56 -0500152 u32 ctrl;
153
Olof Johansson03d2bfc2011-01-01 23:52:56 -0500154 ctrl = sdhci_readb(host, SDHCI_HOST_CONTROL);
155 if (plat->is_8bit && bus_width == MMC_BUS_WIDTH_8) {
156 ctrl &= ~SDHCI_CTRL_4BITBUS;
157 ctrl |= SDHCI_CTRL_8BITBUS;
158 } else {
159 ctrl &= ~SDHCI_CTRL_8BITBUS;
160 if (bus_width == MMC_BUS_WIDTH_4)
161 ctrl |= SDHCI_CTRL_4BITBUS;
162 else
163 ctrl &= ~SDHCI_CTRL_4BITBUS;
164 }
165 sdhci_writeb(host, ctrl, SDHCI_HOST_CONTROL);
166 return 0;
167}
168
Shawn Guo85d65092011-05-27 23:48:12 +0800169static struct sdhci_ops tegra_sdhci_ops = {
170 .get_ro = tegra_sdhci_get_ro,
171 .read_l = tegra_sdhci_readl,
172 .read_w = tegra_sdhci_readw,
173 .write_l = tegra_sdhci_writel,
174 .platform_8bit_width = tegra_sdhci_8bit,
Pavan Kunapulica5879d2012-04-18 18:48:02 +0530175 .platform_reset_exit = tegra_sdhci_reset_exit,
Shawn Guo85d65092011-05-27 23:48:12 +0800176};
Olof Johansson03d2bfc2011-01-01 23:52:56 -0500177
Stephen Warren3e44a1a2012-02-01 16:30:55 -0700178#ifdef CONFIG_ARCH_TEGRA_2x_SOC
179static struct sdhci_pltfm_data sdhci_tegra20_pdata = {
Shawn Guo85d65092011-05-27 23:48:12 +0800180 .quirks = SDHCI_QUIRK_BROKEN_TIMEOUT_VAL |
181 SDHCI_QUIRK_SINGLE_POWER_WRITE |
182 SDHCI_QUIRK_NO_HISPD_BIT |
183 SDHCI_QUIRK_BROKEN_ADMA_ZEROLEN_DESC,
184 .ops = &tegra_sdhci_ops,
185};
186
Stephen Warren3e44a1a2012-02-01 16:30:55 -0700187static struct sdhci_tegra_soc_data soc_data_tegra20 = {
188 .pdata = &sdhci_tegra20_pdata,
189 .nvquirks = NVQUIRK_FORCE_SDHCI_SPEC_200 |
190 NVQUIRK_ENABLE_BLOCK_GAP_DET,
191};
192#endif
193
194#ifdef CONFIG_ARCH_TEGRA_3x_SOC
195static struct sdhci_pltfm_data sdhci_tegra30_pdata = {
196 .quirks = SDHCI_QUIRK_BROKEN_TIMEOUT_VAL |
197 SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK |
198 SDHCI_QUIRK_SINGLE_POWER_WRITE |
199 SDHCI_QUIRK_NO_HISPD_BIT |
200 SDHCI_QUIRK_BROKEN_ADMA_ZEROLEN_DESC,
201 .ops = &tegra_sdhci_ops,
202};
203
204static struct sdhci_tegra_soc_data soc_data_tegra30 = {
205 .pdata = &sdhci_tegra30_pdata,
Pavan Kunapulica5879d2012-04-18 18:48:02 +0530206 .nvquirks = NVQUIRK_ENABLE_SDHCI_SPEC_300,
Stephen Warren3e44a1a2012-02-01 16:30:55 -0700207};
208#endif
209
Grant Likely275173b2011-08-23 12:15:33 -0600210static const struct of_device_id sdhci_tegra_dt_match[] __devinitdata = {
Stephen Warren3e44a1a2012-02-01 16:30:55 -0700211#ifdef CONFIG_ARCH_TEGRA_3x_SOC
212 { .compatible = "nvidia,tegra30-sdhci", .data = &soc_data_tegra30 },
213#endif
214#ifdef CONFIG_ARCH_TEGRA_2x_SOC
215 { .compatible = "nvidia,tegra20-sdhci", .data = &soc_data_tegra20 },
216#endif
Grant Likely275173b2011-08-23 12:15:33 -0600217 {}
218};
219MODULE_DEVICE_TABLE(of, sdhci_dt_ids);
220
221static struct tegra_sdhci_platform_data * __devinit sdhci_tegra_dt_parse_pdata(
222 struct platform_device *pdev)
223{
224 struct tegra_sdhci_platform_data *plat;
225 struct device_node *np = pdev->dev.of_node;
Stephen Warrenc11bd552012-05-21 16:43:42 -0600226 u32 bus_width;
Grant Likely275173b2011-08-23 12:15:33 -0600227
228 if (!np)
229 return NULL;
230
231 plat = devm_kzalloc(&pdev->dev, sizeof(*plat), GFP_KERNEL);
232 if (!plat) {
233 dev_err(&pdev->dev, "Can't allocate platform data\n");
234 return NULL;
235 }
236
237 plat->cd_gpio = of_get_named_gpio(np, "cd-gpios", 0);
238 plat->wp_gpio = of_get_named_gpio(np, "wp-gpios", 0);
239 plat->power_gpio = of_get_named_gpio(np, "power-gpios", 0);
Stephen Warrenc11bd552012-05-21 16:43:42 -0600240
241 if (of_property_read_u32(np, "bus-width", &bus_width) == 0 &&
242 bus_width == 8)
Stephen Warren55cd65e2011-08-30 13:17:16 -0600243 plat->is_8bit = 1;
Grant Likely275173b2011-08-23 12:15:33 -0600244
245 return plat;
246}
247
Shawn Guo85d65092011-05-27 23:48:12 +0800248static int __devinit sdhci_tegra_probe(struct platform_device *pdev)
Olof Johansson03d2bfc2011-01-01 23:52:56 -0500249{
Stephen Warren3e44a1a2012-02-01 16:30:55 -0700250 const struct of_device_id *match;
251 const struct sdhci_tegra_soc_data *soc_data;
252 struct sdhci_host *host;
Shawn Guo85d65092011-05-27 23:48:12 +0800253 struct sdhci_pltfm_host *pltfm_host;
Olof Johansson03d2bfc2011-01-01 23:52:56 -0500254 struct tegra_sdhci_platform_data *plat;
Stephen Warren3e44a1a2012-02-01 16:30:55 -0700255 struct sdhci_tegra *tegra_host;
Olof Johansson03d2bfc2011-01-01 23:52:56 -0500256 struct clk *clk;
257 int rc;
258
Stephen Warren3e44a1a2012-02-01 16:30:55 -0700259 match = of_match_device(sdhci_tegra_dt_match, &pdev->dev);
Joseph Lob37f9d92012-08-17 15:04:31 +0800260 if (!match)
261 return -EINVAL;
262 soc_data = match->data;
Stephen Warren3e44a1a2012-02-01 16:30:55 -0700263
264 host = sdhci_pltfm_init(pdev, soc_data->pdata);
Shawn Guo85d65092011-05-27 23:48:12 +0800265 if (IS_ERR(host))
266 return PTR_ERR(host);
267
268 pltfm_host = sdhci_priv(host);
269
Olof Johansson03d2bfc2011-01-01 23:52:56 -0500270 plat = pdev->dev.platform_data;
Shawn Guo85d65092011-05-27 23:48:12 +0800271
Grant Likely275173b2011-08-23 12:15:33 -0600272 if (plat == NULL)
273 plat = sdhci_tegra_dt_parse_pdata(pdev);
274
Olof Johansson03d2bfc2011-01-01 23:52:56 -0500275 if (plat == NULL) {
276 dev_err(mmc_dev(host->mmc), "missing platform data\n");
Shawn Guo85d65092011-05-27 23:48:12 +0800277 rc = -ENXIO;
278 goto err_no_plat;
Olof Johansson03d2bfc2011-01-01 23:52:56 -0500279 }
280
Stephen Warren3e44a1a2012-02-01 16:30:55 -0700281 tegra_host = devm_kzalloc(&pdev->dev, sizeof(*tegra_host), GFP_KERNEL);
282 if (!tegra_host) {
283 dev_err(mmc_dev(host->mmc), "failed to allocate tegra_host\n");
284 rc = -ENOMEM;
285 goto err_no_plat;
286 }
287
288 tegra_host->plat = plat;
289 tegra_host->soc_data = soc_data;
290
291 pltfm_host->priv = tegra_host;
Grant Likely275173b2011-08-23 12:15:33 -0600292
Olof Johansson03d2bfc2011-01-01 23:52:56 -0500293 if (gpio_is_valid(plat->power_gpio)) {
294 rc = gpio_request(plat->power_gpio, "sdhci_power");
295 if (rc) {
296 dev_err(mmc_dev(host->mmc),
297 "failed to allocate power gpio\n");
Shawn Guo85d65092011-05-27 23:48:12 +0800298 goto err_power_req;
Olof Johansson03d2bfc2011-01-01 23:52:56 -0500299 }
Olof Johansson03d2bfc2011-01-01 23:52:56 -0500300 gpio_direction_output(plat->power_gpio, 1);
301 }
302
303 if (gpio_is_valid(plat->cd_gpio)) {
304 rc = gpio_request(plat->cd_gpio, "sdhci_cd");
305 if (rc) {
306 dev_err(mmc_dev(host->mmc),
307 "failed to allocate cd gpio\n");
Shawn Guo85d65092011-05-27 23:48:12 +0800308 goto err_cd_req;
Olof Johansson03d2bfc2011-01-01 23:52:56 -0500309 }
Olof Johansson03d2bfc2011-01-01 23:52:56 -0500310 gpio_direction_input(plat->cd_gpio);
311
312 rc = request_irq(gpio_to_irq(plat->cd_gpio), carddetect_irq,
313 IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING,
314 mmc_hostname(host->mmc), host);
315
316 if (rc) {
317 dev_err(mmc_dev(host->mmc), "request irq error\n");
Shawn Guo85d65092011-05-27 23:48:12 +0800318 goto err_cd_irq_req;
Olof Johansson03d2bfc2011-01-01 23:52:56 -0500319 }
320
321 }
322
323 if (gpio_is_valid(plat->wp_gpio)) {
324 rc = gpio_request(plat->wp_gpio, "sdhci_wp");
325 if (rc) {
326 dev_err(mmc_dev(host->mmc),
327 "failed to allocate wp gpio\n");
Shawn Guo85d65092011-05-27 23:48:12 +0800328 goto err_wp_req;
Olof Johansson03d2bfc2011-01-01 23:52:56 -0500329 }
Olof Johansson03d2bfc2011-01-01 23:52:56 -0500330 gpio_direction_input(plat->wp_gpio);
331 }
332
333 clk = clk_get(mmc_dev(host->mmc), NULL);
334 if (IS_ERR(clk)) {
335 dev_err(mmc_dev(host->mmc), "clk err\n");
336 rc = PTR_ERR(clk);
Shawn Guo85d65092011-05-27 23:48:12 +0800337 goto err_clk_get;
Olof Johansson03d2bfc2011-01-01 23:52:56 -0500338 }
Prashant Gaikwad1e674bc2012-06-05 09:59:37 +0530339 clk_prepare_enable(clk);
Olof Johansson03d2bfc2011-01-01 23:52:56 -0500340 pltfm_host->clk = clk;
341
Venkat Raoc7f409e2011-03-25 20:37:47 -0400342 host->mmc->pm_caps = plat->pm_flags;
343
Olof Johansson03d2bfc2011-01-01 23:52:56 -0500344 if (plat->is_8bit)
345 host->mmc->caps |= MMC_CAP_8_BIT_DATA;
346
Shawn Guo85d65092011-05-27 23:48:12 +0800347 rc = sdhci_add_host(host);
348 if (rc)
349 goto err_add_host;
350
Olof Johansson03d2bfc2011-01-01 23:52:56 -0500351 return 0;
352
Shawn Guo85d65092011-05-27 23:48:12 +0800353err_add_host:
Prashant Gaikwad1e674bc2012-06-05 09:59:37 +0530354 clk_disable_unprepare(pltfm_host->clk);
Shawn Guo85d65092011-05-27 23:48:12 +0800355 clk_put(pltfm_host->clk);
356err_clk_get:
Stephen Warren3e215d02012-02-18 01:04:55 -0700357 if (gpio_is_valid(plat->wp_gpio))
Olof Johansson03d2bfc2011-01-01 23:52:56 -0500358 gpio_free(plat->wp_gpio);
Shawn Guo85d65092011-05-27 23:48:12 +0800359err_wp_req:
Wolfram Sang8154b572011-02-10 18:07:30 +0100360 if (gpio_is_valid(plat->cd_gpio))
361 free_irq(gpio_to_irq(plat->cd_gpio), host);
Shawn Guo85d65092011-05-27 23:48:12 +0800362err_cd_irq_req:
Stephen Warren3e215d02012-02-18 01:04:55 -0700363 if (gpio_is_valid(plat->cd_gpio))
Olof Johansson03d2bfc2011-01-01 23:52:56 -0500364 gpio_free(plat->cd_gpio);
Shawn Guo85d65092011-05-27 23:48:12 +0800365err_cd_req:
Stephen Warren3e215d02012-02-18 01:04:55 -0700366 if (gpio_is_valid(plat->power_gpio))
Olof Johansson03d2bfc2011-01-01 23:52:56 -0500367 gpio_free(plat->power_gpio);
Shawn Guo85d65092011-05-27 23:48:12 +0800368err_power_req:
369err_no_plat:
370 sdhci_pltfm_free(pdev);
Olof Johansson03d2bfc2011-01-01 23:52:56 -0500371 return rc;
372}
373
Shawn Guo85d65092011-05-27 23:48:12 +0800374static int __devexit sdhci_tegra_remove(struct platform_device *pdev)
Olof Johansson03d2bfc2011-01-01 23:52:56 -0500375{
Shawn Guo85d65092011-05-27 23:48:12 +0800376 struct sdhci_host *host = platform_get_drvdata(pdev);
Olof Johansson03d2bfc2011-01-01 23:52:56 -0500377 struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
Stephen Warren3e44a1a2012-02-01 16:30:55 -0700378 struct sdhci_tegra *tegra_host = pltfm_host->priv;
379 const struct tegra_sdhci_platform_data *plat = tegra_host->plat;
Shawn Guo85d65092011-05-27 23:48:12 +0800380 int dead = (readl(host->ioaddr + SDHCI_INT_STATUS) == 0xffffffff);
381
382 sdhci_remove_host(host, dead);
Olof Johansson03d2bfc2011-01-01 23:52:56 -0500383
Stephen Warren3e215d02012-02-18 01:04:55 -0700384 if (gpio_is_valid(plat->wp_gpio))
Olof Johansson03d2bfc2011-01-01 23:52:56 -0500385 gpio_free(plat->wp_gpio);
Olof Johansson03d2bfc2011-01-01 23:52:56 -0500386
387 if (gpio_is_valid(plat->cd_gpio)) {
Wolfram Sang8154b572011-02-10 18:07:30 +0100388 free_irq(gpio_to_irq(plat->cd_gpio), host);
Olof Johansson03d2bfc2011-01-01 23:52:56 -0500389 gpio_free(plat->cd_gpio);
390 }
391
Stephen Warren3e215d02012-02-18 01:04:55 -0700392 if (gpio_is_valid(plat->power_gpio))
Olof Johansson03d2bfc2011-01-01 23:52:56 -0500393 gpio_free(plat->power_gpio);
Olof Johansson03d2bfc2011-01-01 23:52:56 -0500394
Prashant Gaikwad1e674bc2012-06-05 09:59:37 +0530395 clk_disable_unprepare(pltfm_host->clk);
Olof Johansson03d2bfc2011-01-01 23:52:56 -0500396 clk_put(pltfm_host->clk);
Shawn Guo85d65092011-05-27 23:48:12 +0800397
398 sdhci_pltfm_free(pdev);
399
400 return 0;
Olof Johansson03d2bfc2011-01-01 23:52:56 -0500401}
402
Shawn Guo85d65092011-05-27 23:48:12 +0800403static struct platform_driver sdhci_tegra_driver = {
404 .driver = {
405 .name = "sdhci-tegra",
406 .owner = THIS_MODULE,
Grant Likely275173b2011-08-23 12:15:33 -0600407 .of_match_table = sdhci_tegra_dt_match,
Manuel Lauss29495aa2011-11-03 11:09:45 +0100408 .pm = SDHCI_PLTFM_PMOPS,
Shawn Guo85d65092011-05-27 23:48:12 +0800409 },
410 .probe = sdhci_tegra_probe,
411 .remove = __devexit_p(sdhci_tegra_remove),
Olof Johansson03d2bfc2011-01-01 23:52:56 -0500412};
413
Axel Lind1f81a62011-11-26 12:55:43 +0800414module_platform_driver(sdhci_tegra_driver);
Shawn Guo85d65092011-05-27 23:48:12 +0800415
416MODULE_DESCRIPTION("SDHCI driver for Tegra");
Stephen Warren3e44a1a2012-02-01 16:30:55 -0700417MODULE_AUTHOR("Google, Inc.");
Shawn Guo85d65092011-05-27 23:48:12 +0800418MODULE_LICENSE("GPL v2");