blob: 58fc6533d2500e35de96f13d10d67fbe68e6ea6e [file] [log] [blame]
Wolfram Sang95f25ef2010-10-15 12:21:04 +02001/*
2 * Freescale eSDHC i.MX controller driver for the platform bus.
3 *
4 * derived from the OF-version.
5 *
6 * Copyright (c) 2010 Pengutronix e.K.
7 * Author: Wolfram Sang <w.sang@pengutronix.de>
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License.
12 */
13
14#include <linux/io.h>
15#include <linux/delay.h>
16#include <linux/err.h>
17#include <linux/clk.h>
Wolfram Sang0c6d49c2011-02-26 14:44:39 +010018#include <linux/gpio.h>
Richard Zhue1498602011-03-25 09:18:27 -040019#include <linux/slab.h>
Wolfram Sang95f25ef2010-10-15 12:21:04 +020020#include <linux/mmc/host.h>
Richard Zhu58ac8172011-03-21 13:22:16 +080021#include <linux/mmc/mmc.h>
22#include <linux/mmc/sdio.h>
Eric Bénard37865fe2010-10-23 01:57:21 +020023#include <mach/hardware.h>
Wolfram Sang0c6d49c2011-02-26 14:44:39 +010024#include <mach/esdhc.h>
Wolfram Sang95f25ef2010-10-15 12:21:04 +020025#include "sdhci-pltfm.h"
26#include "sdhci-esdhc.h"
27
Richard Zhu58ac8172011-03-21 13:22:16 +080028/* VENDOR SPEC register */
29#define SDHCI_VENDOR_SPEC 0xC0
30#define SDHCI_VENDOR_SPEC_SDIO_QUIRK 0x00000002
31
Richard Zhu58ac8172011-03-21 13:22:16 +080032/*
33 * The CMDTYPE of the CMD register (offset 0xE) should be set to
34 * "11" when the STOP CMD12 is issued on imx53 to abort one
35 * open ended multi-blk IO. Otherwise the TC INT wouldn't
36 * be generated.
37 * In exact block transfer, the controller doesn't complete the
38 * operations automatically as required at the end of the
39 * transfer and remains on hold if the abort command is not sent.
40 * As a result, the TC flag is not asserted and SW received timeout
41 * exeception. Bit1 of Vendor Spec registor is used to fix it.
42 */
43#define ESDHC_FLAG_MULTIBLK_NO_INT (1 << 1)
Richard Zhue1498602011-03-25 09:18:27 -040044
45struct pltfm_imx_data {
46 int flags;
47 u32 scratchpad;
Shawn Guo842afc02011-07-06 22:57:48 +080048 struct esdhc_platform_data boarddata;
Richard Zhue1498602011-03-25 09:18:27 -040049};
50
Wolfram Sang95f25ef2010-10-15 12:21:04 +020051static inline void esdhc_clrset_le(struct sdhci_host *host, u32 mask, u32 val, int reg)
52{
53 void __iomem *base = host->ioaddr + (reg & ~0x3);
54 u32 shift = (reg & 0x3) * 8;
55
56 writel(((readl(base) & ~(mask << shift)) | (val << shift)), base);
57}
58
Wolfram Sang7e29c302011-02-26 14:44:41 +010059static u32 esdhc_readl_le(struct sdhci_host *host, int reg)
60{
Shawn Guo842afc02011-07-06 22:57:48 +080061 struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
62 struct pltfm_imx_data *imx_data = pltfm_host->priv;
63 struct esdhc_platform_data *boarddata = &imx_data->boarddata;
Richard Zhue1498602011-03-25 09:18:27 -040064
Shawn Guo913413c2011-06-21 22:41:51 +080065 /* fake CARD_PRESENT flag */
Wolfram Sang7e29c302011-02-26 14:44:41 +010066 u32 val = readl(host->ioaddr + reg);
67
Richard Zhue1498602011-03-25 09:18:27 -040068 if (unlikely((reg == SDHCI_PRESENT_STATE)
Shawn Guo913413c2011-06-21 22:41:51 +080069 && gpio_is_valid(boarddata->cd_gpio))) {
70 if (gpio_get_value(boarddata->cd_gpio))
Wolfram Sang7e29c302011-02-26 14:44:41 +010071 /* no card, if a valid gpio says so... */
Shawn Guo803862a2011-06-21 22:41:49 +080072 val &= ~SDHCI_CARD_PRESENT;
Wolfram Sang7e29c302011-02-26 14:44:41 +010073 else
74 /* ... in all other cases assume card is present */
75 val |= SDHCI_CARD_PRESENT;
76 }
77
78 return val;
79}
80
81static void esdhc_writel_le(struct sdhci_host *host, u32 val, int reg)
82{
Richard Zhue1498602011-03-25 09:18:27 -040083 struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
84 struct pltfm_imx_data *imx_data = pltfm_host->priv;
Shawn Guo842afc02011-07-06 22:57:48 +080085 struct esdhc_platform_data *boarddata = &imx_data->boarddata;
Richard Zhue1498602011-03-25 09:18:27 -040086
87 if (unlikely((reg == SDHCI_INT_ENABLE || reg == SDHCI_SIGNAL_ENABLE)
Shawn Guo913413c2011-06-21 22:41:51 +080088 && (boarddata->cd_type == ESDHC_CD_GPIO)))
Wolfram Sang7e29c302011-02-26 14:44:41 +010089 /*
90 * these interrupts won't work with a custom card_detect gpio
Wolfram Sang7e29c302011-02-26 14:44:41 +010091 */
92 val &= ~(SDHCI_INT_CARD_REMOVE | SDHCI_INT_CARD_INSERT);
93
Richard Zhu58ac8172011-03-21 13:22:16 +080094 if (unlikely((imx_data->flags & ESDHC_FLAG_MULTIBLK_NO_INT)
95 && (reg == SDHCI_INT_STATUS)
96 && (val & SDHCI_INT_DATA_END))) {
97 u32 v;
98 v = readl(host->ioaddr + SDHCI_VENDOR_SPEC);
99 v &= ~SDHCI_VENDOR_SPEC_SDIO_QUIRK;
100 writel(v, host->ioaddr + SDHCI_VENDOR_SPEC);
101 }
102
Wolfram Sang7e29c302011-02-26 14:44:41 +0100103 writel(val, host->ioaddr + reg);
104}
105
Wolfram Sang95f25ef2010-10-15 12:21:04 +0200106static u16 esdhc_readw_le(struct sdhci_host *host, int reg)
107{
108 if (unlikely(reg == SDHCI_HOST_VERSION))
109 reg ^= 2;
110
111 return readw(host->ioaddr + reg);
112}
113
114static void esdhc_writew_le(struct sdhci_host *host, u16 val, int reg)
115{
116 struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
Richard Zhue1498602011-03-25 09:18:27 -0400117 struct pltfm_imx_data *imx_data = pltfm_host->priv;
Wolfram Sang95f25ef2010-10-15 12:21:04 +0200118
119 switch (reg) {
120 case SDHCI_TRANSFER_MODE:
121 /*
122 * Postpone this write, we must do it together with a
123 * command write that is down below.
124 */
Richard Zhu58ac8172011-03-21 13:22:16 +0800125 if ((imx_data->flags & ESDHC_FLAG_MULTIBLK_NO_INT)
126 && (host->cmd->opcode == SD_IO_RW_EXTENDED)
127 && (host->cmd->data->blocks > 1)
128 && (host->cmd->data->flags & MMC_DATA_READ)) {
129 u32 v;
130 v = readl(host->ioaddr + SDHCI_VENDOR_SPEC);
131 v |= SDHCI_VENDOR_SPEC_SDIO_QUIRK;
132 writel(v, host->ioaddr + SDHCI_VENDOR_SPEC);
133 }
Richard Zhue1498602011-03-25 09:18:27 -0400134 imx_data->scratchpad = val;
Wolfram Sang95f25ef2010-10-15 12:21:04 +0200135 return;
136 case SDHCI_COMMAND:
Richard Zhu58ac8172011-03-21 13:22:16 +0800137 if ((host->cmd->opcode == MMC_STOP_TRANSMISSION)
138 && (imx_data->flags & ESDHC_FLAG_MULTIBLK_NO_INT))
139 val |= SDHCI_CMD_ABORTCMD;
Richard Zhue1498602011-03-25 09:18:27 -0400140 writel(val << 16 | imx_data->scratchpad,
Wolfram Sang95f25ef2010-10-15 12:21:04 +0200141 host->ioaddr + SDHCI_TRANSFER_MODE);
142 return;
143 case SDHCI_BLOCK_SIZE:
144 val &= ~SDHCI_MAKE_BLKSZ(0x7, 0);
145 break;
146 }
147 esdhc_clrset_le(host, 0xffff, val, reg);
148}
149
150static void esdhc_writeb_le(struct sdhci_host *host, u8 val, int reg)
151{
152 u32 new_val;
153
154 switch (reg) {
155 case SDHCI_POWER_CONTROL:
156 /*
157 * FSL put some DMA bits here
158 * If your board has a regulator, code should be here
159 */
160 return;
161 case SDHCI_HOST_CONTROL:
162 /* FSL messed up here, so we can just keep those two */
163 new_val = val & (SDHCI_CTRL_LED | SDHCI_CTRL_4BITBUS);
164 /* ensure the endianess */
165 new_val |= ESDHC_HOST_CONTROL_LE;
166 /* DMA mode bits are shifted */
167 new_val |= (val & SDHCI_CTRL_DMA_MASK) << 5;
168
169 esdhc_clrset_le(host, 0xffff, new_val, reg);
170 return;
171 }
172 esdhc_clrset_le(host, 0xff, val, reg);
Shawn Guo913413c2011-06-21 22:41:51 +0800173
174 /*
175 * The esdhc has a design violation to SDHC spec which tells
176 * that software reset should not affect card detection circuit.
177 * But esdhc clears its SYSCTL register bits [0..2] during the
178 * software reset. This will stop those clocks that card detection
179 * circuit relies on. To work around it, we turn the clocks on back
180 * to keep card detection circuit functional.
181 */
182 if ((reg == SDHCI_SOFTWARE_RESET) && (val & 1))
183 esdhc_clrset_le(host, 0x7, 0x7, ESDHC_SYSTEM_CONTROL);
Wolfram Sang95f25ef2010-10-15 12:21:04 +0200184}
185
186static unsigned int esdhc_pltfm_get_max_clock(struct sdhci_host *host)
187{
188 struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
189
190 return clk_get_rate(pltfm_host->clk);
191}
192
193static unsigned int esdhc_pltfm_get_min_clock(struct sdhci_host *host)
194{
195 struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
196
197 return clk_get_rate(pltfm_host->clk) / 256 / 16;
198}
199
Shawn Guo913413c2011-06-21 22:41:51 +0800200static unsigned int esdhc_pltfm_get_ro(struct sdhci_host *host)
201{
Shawn Guo842afc02011-07-06 22:57:48 +0800202 struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
203 struct pltfm_imx_data *imx_data = pltfm_host->priv;
204 struct esdhc_platform_data *boarddata = &imx_data->boarddata;
Shawn Guo913413c2011-06-21 22:41:51 +0800205
206 switch (boarddata->wp_type) {
207 case ESDHC_WP_GPIO:
208 if (gpio_is_valid(boarddata->wp_gpio))
209 return gpio_get_value(boarddata->wp_gpio);
210 case ESDHC_WP_CONTROLLER:
211 return !(readl(host->ioaddr + SDHCI_PRESENT_STATE) &
212 SDHCI_WRITE_PROTECT);
213 case ESDHC_WP_NONE:
214 break;
215 }
216
217 return -ENOSYS;
218}
219
Wolfram Sang0c6d49c2011-02-26 14:44:39 +0100220static struct sdhci_ops sdhci_esdhc_ops = {
Richard Zhue1498602011-03-25 09:18:27 -0400221 .read_l = esdhc_readl_le,
Wolfram Sang0c6d49c2011-02-26 14:44:39 +0100222 .read_w = esdhc_readw_le,
Richard Zhue1498602011-03-25 09:18:27 -0400223 .write_l = esdhc_writel_le,
Wolfram Sang0c6d49c2011-02-26 14:44:39 +0100224 .write_w = esdhc_writew_le,
225 .write_b = esdhc_writeb_le,
226 .set_clock = esdhc_set_clock,
227 .get_max_clock = esdhc_pltfm_get_max_clock,
228 .get_min_clock = esdhc_pltfm_get_min_clock,
Shawn Guo913413c2011-06-21 22:41:51 +0800229 .get_ro = esdhc_pltfm_get_ro,
Wolfram Sang0c6d49c2011-02-26 14:44:39 +0100230};
231
Shawn Guo85d65092011-05-27 23:48:12 +0800232static struct sdhci_pltfm_data sdhci_esdhc_imx_pdata = {
233 .quirks = ESDHC_DEFAULT_QUIRKS | SDHCI_QUIRK_BROKEN_ADMA
234 | SDHCI_QUIRK_BROKEN_CARD_DETECTION,
235 /* ADMA has issues. Might be fixable */
236 .ops = &sdhci_esdhc_ops,
237};
238
Wolfram Sang7e29c302011-02-26 14:44:41 +0100239static irqreturn_t cd_irq(int irq, void *data)
240{
241 struct sdhci_host *sdhost = (struct sdhci_host *)data;
242
243 tasklet_schedule(&sdhost->card_tasklet);
244 return IRQ_HANDLED;
245};
246
Shawn Guo85d65092011-05-27 23:48:12 +0800247static int __devinit sdhci_esdhc_imx_probe(struct platform_device *pdev)
Wolfram Sang95f25ef2010-10-15 12:21:04 +0200248{
Shawn Guo85d65092011-05-27 23:48:12 +0800249 struct sdhci_pltfm_host *pltfm_host;
250 struct sdhci_host *host;
251 struct esdhc_platform_data *boarddata;
Wolfram Sang95f25ef2010-10-15 12:21:04 +0200252 struct clk *clk;
Wolfram Sang0c6d49c2011-02-26 14:44:39 +0100253 int err;
Richard Zhue1498602011-03-25 09:18:27 -0400254 struct pltfm_imx_data *imx_data;
Wolfram Sang95f25ef2010-10-15 12:21:04 +0200255
Shawn Guo85d65092011-05-27 23:48:12 +0800256 host = sdhci_pltfm_init(pdev, &sdhci_esdhc_imx_pdata);
257 if (IS_ERR(host))
258 return PTR_ERR(host);
259
260 pltfm_host = sdhci_priv(host);
261
262 imx_data = kzalloc(sizeof(struct pltfm_imx_data), GFP_KERNEL);
263 if (!imx_data)
264 return -ENOMEM;
265 pltfm_host->priv = imx_data;
266
Wolfram Sang95f25ef2010-10-15 12:21:04 +0200267 clk = clk_get(mmc_dev(host->mmc), NULL);
268 if (IS_ERR(clk)) {
269 dev_err(mmc_dev(host->mmc), "clk err\n");
Shawn Guo85d65092011-05-27 23:48:12 +0800270 err = PTR_ERR(clk);
271 goto err_clk_get;
Wolfram Sang95f25ef2010-10-15 12:21:04 +0200272 }
273 clk_enable(clk);
274 pltfm_host->clk = clk;
275
Richard Zhue1498602011-03-25 09:18:27 -0400276 if (!cpu_is_mx25())
Eric Bénard37865fe2010-10-23 01:57:21 +0200277 host->quirks |= SDHCI_QUIRK_BROKEN_TIMEOUT_VAL;
278
Shawn Guo913413c2011-06-21 22:41:51 +0800279 if (cpu_is_mx25() || cpu_is_mx35())
Wolfram Sang0c6d49c2011-02-26 14:44:39 +0100280 /* Fix errata ENGcm07207 present on i.MX25 and i.MX35 */
Eric Bénard16a790b2010-10-23 01:57:22 +0200281 host->quirks |= SDHCI_QUIRK_NO_MULTIBLOCK;
Wolfram Sang0c6d49c2011-02-26 14:44:39 +0100282
Richard Zhu58ac8172011-03-21 13:22:16 +0800283 if (!(cpu_is_mx25() || cpu_is_mx35() || cpu_is_mx51()))
284 imx_data->flags |= ESDHC_FLAG_MULTIBLK_NO_INT;
285
Shawn Guo842afc02011-07-06 22:57:48 +0800286 if (!host->mmc->parent->platform_data) {
Shawn Guo913413c2011-06-21 22:41:51 +0800287 dev_err(mmc_dev(host->mmc), "no board data!\n");
288 err = -EINVAL;
289 goto no_board_data;
290 }
Shawn Guo842afc02011-07-06 22:57:48 +0800291 imx_data->boarddata = *((struct esdhc_platform_data *)
292 host->mmc->parent->platform_data);
293 boarddata = &imx_data->boarddata;
Shawn Guo913413c2011-06-21 22:41:51 +0800294
295 /* write_protect */
296 if (boarddata->wp_type == ESDHC_WP_GPIO) {
Wolfram Sang0c6d49c2011-02-26 14:44:39 +0100297 err = gpio_request_one(boarddata->wp_gpio, GPIOF_IN, "ESDHC_WP");
298 if (err) {
299 dev_warn(mmc_dev(host->mmc),
Shawn Guo913413c2011-06-21 22:41:51 +0800300 "no write-protect pin available!\n");
301 boarddata->wp_gpio = -EINVAL;
Wolfram Sang0c6d49c2011-02-26 14:44:39 +0100302 }
Shawn Guo913413c2011-06-21 22:41:51 +0800303 } else {
304 boarddata->wp_gpio = -EINVAL;
305 }
Wolfram Sang7e29c302011-02-26 14:44:41 +0100306
Shawn Guo913413c2011-06-21 22:41:51 +0800307 /* card_detect */
308 if (boarddata->cd_type != ESDHC_CD_GPIO)
309 boarddata->cd_gpio = -EINVAL;
310
311 switch (boarddata->cd_type) {
312 case ESDHC_CD_GPIO:
Wolfram Sang7e29c302011-02-26 14:44:41 +0100313 err = gpio_request_one(boarddata->cd_gpio, GPIOF_IN, "ESDHC_CD");
314 if (err) {
Shawn Guo913413c2011-06-21 22:41:51 +0800315 dev_err(mmc_dev(host->mmc),
Wolfram Sang7e29c302011-02-26 14:44:41 +0100316 "no card-detect pin available!\n");
317 goto no_card_detect_pin;
318 }
319
Wolfram Sang7e29c302011-02-26 14:44:41 +0100320 err = request_irq(gpio_to_irq(boarddata->cd_gpio), cd_irq,
321 IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING,
322 mmc_hostname(host->mmc), host);
323 if (err) {
Shawn Guo913413c2011-06-21 22:41:51 +0800324 dev_err(mmc_dev(host->mmc), "request irq error\n");
Wolfram Sang7e29c302011-02-26 14:44:41 +0100325 goto no_card_detect_irq;
326 }
Shawn Guo913413c2011-06-21 22:41:51 +0800327 /* fall through */
Wolfram Sang7e29c302011-02-26 14:44:41 +0100328
Shawn Guo913413c2011-06-21 22:41:51 +0800329 case ESDHC_CD_CONTROLLER:
330 /* we have a working card_detect back */
Wolfram Sang7e29c302011-02-26 14:44:41 +0100331 host->quirks &= ~SDHCI_QUIRK_BROKEN_CARD_DETECTION;
Shawn Guo913413c2011-06-21 22:41:51 +0800332 break;
333
334 case ESDHC_CD_PERMANENT:
335 host->mmc->caps = MMC_CAP_NONREMOVABLE;
336 break;
337
338 case ESDHC_CD_NONE:
339 break;
Wolfram Sang0c6d49c2011-02-26 14:44:39 +0100340 }
Eric Bénard16a790b2010-10-23 01:57:22 +0200341
Shawn Guo85d65092011-05-27 23:48:12 +0800342 err = sdhci_add_host(host);
343 if (err)
344 goto err_add_host;
345
Wolfram Sang95f25ef2010-10-15 12:21:04 +0200346 return 0;
Wolfram Sang7e29c302011-02-26 14:44:41 +0100347
Shawn Guo913413c2011-06-21 22:41:51 +0800348err_add_host:
349 if (gpio_is_valid(boarddata->cd_gpio))
350 free_irq(gpio_to_irq(boarddata->cd_gpio), host);
351no_card_detect_irq:
352 if (gpio_is_valid(boarddata->cd_gpio))
353 gpio_free(boarddata->cd_gpio);
354 if (gpio_is_valid(boarddata->wp_gpio))
355 gpio_free(boarddata->wp_gpio);
356no_card_detect_pin:
357no_board_data:
Shawn Guo85d65092011-05-27 23:48:12 +0800358 clk_disable(pltfm_host->clk);
359 clk_put(pltfm_host->clk);
Shawn Guo913413c2011-06-21 22:41:51 +0800360err_clk_get:
361 kfree(imx_data);
Shawn Guo85d65092011-05-27 23:48:12 +0800362 sdhci_pltfm_free(pdev);
363 return err;
Wolfram Sang95f25ef2010-10-15 12:21:04 +0200364}
365
Shawn Guo85d65092011-05-27 23:48:12 +0800366static int __devexit sdhci_esdhc_imx_remove(struct platform_device *pdev)
Wolfram Sang95f25ef2010-10-15 12:21:04 +0200367{
Shawn Guo85d65092011-05-27 23:48:12 +0800368 struct sdhci_host *host = platform_get_drvdata(pdev);
Wolfram Sang95f25ef2010-10-15 12:21:04 +0200369 struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
Richard Zhue1498602011-03-25 09:18:27 -0400370 struct pltfm_imx_data *imx_data = pltfm_host->priv;
Shawn Guo842afc02011-07-06 22:57:48 +0800371 struct esdhc_platform_data *boarddata = &imx_data->boarddata;
Shawn Guo85d65092011-05-27 23:48:12 +0800372 int dead = (readl(host->ioaddr + SDHCI_INT_STATUS) == 0xffffffff);
373
374 sdhci_remove_host(host, dead);
Wolfram Sang0c6d49c2011-02-26 14:44:39 +0100375
Shawn Guo913413c2011-06-21 22:41:51 +0800376 if (gpio_is_valid(boarddata->wp_gpio))
Wolfram Sang0c6d49c2011-02-26 14:44:39 +0100377 gpio_free(boarddata->wp_gpio);
Wolfram Sang95f25ef2010-10-15 12:21:04 +0200378
Shawn Guo913413c2011-06-21 22:41:51 +0800379 if (gpio_is_valid(boarddata->cd_gpio)) {
380 free_irq(gpio_to_irq(boarddata->cd_gpio), host);
Wolfram Sang7e29c302011-02-26 14:44:41 +0100381 gpio_free(boarddata->cd_gpio);
Wolfram Sang7e29c302011-02-26 14:44:41 +0100382 }
383
Wolfram Sang95f25ef2010-10-15 12:21:04 +0200384 clk_disable(pltfm_host->clk);
385 clk_put(pltfm_host->clk);
Richard Zhue1498602011-03-25 09:18:27 -0400386 kfree(imx_data);
Shawn Guo85d65092011-05-27 23:48:12 +0800387
388 sdhci_pltfm_free(pdev);
389
390 return 0;
Wolfram Sang95f25ef2010-10-15 12:21:04 +0200391}
392
Shawn Guo85d65092011-05-27 23:48:12 +0800393static struct platform_driver sdhci_esdhc_imx_driver = {
394 .driver = {
395 .name = "sdhci-esdhc-imx",
396 .owner = THIS_MODULE,
397 },
398 .probe = sdhci_esdhc_imx_probe,
399 .remove = __devexit_p(sdhci_esdhc_imx_remove),
400#ifdef CONFIG_PM
401 .suspend = sdhci_pltfm_suspend,
402 .resume = sdhci_pltfm_resume,
403#endif
Wolfram Sang95f25ef2010-10-15 12:21:04 +0200404};
Shawn Guo85d65092011-05-27 23:48:12 +0800405
406static int __init sdhci_esdhc_imx_init(void)
407{
408 return platform_driver_register(&sdhci_esdhc_imx_driver);
409}
410module_init(sdhci_esdhc_imx_init);
411
412static void __exit sdhci_esdhc_imx_exit(void)
413{
414 platform_driver_unregister(&sdhci_esdhc_imx_driver);
415}
416module_exit(sdhci_esdhc_imx_exit);
417
418MODULE_DESCRIPTION("SDHCI driver for Freescale i.MX eSDHC");
419MODULE_AUTHOR("Wolfram Sang <w.sang@pengutronix.de>");
420MODULE_LICENSE("GPL v2");