Viresh KUMAR | c63b3cb | 2010-05-26 14:42:10 -0700 | [diff] [blame] | 1 | /* |
| 2 | * drivers/mmc/host/sdhci-spear.c |
| 3 | * |
| 4 | * Support of SDHCI platform devices for spear soc family |
| 5 | * |
| 6 | * Copyright (C) 2010 ST Microelectronics |
Viresh Kumar | 10d8935 | 2012-06-20 12:53:02 -0700 | [diff] [blame] | 7 | * Viresh Kumar <viresh.linux@gmail.com> |
Viresh KUMAR | c63b3cb | 2010-05-26 14:42:10 -0700 | [diff] [blame] | 8 | * |
| 9 | * Inspired by sdhci-pltfm.c |
| 10 | * |
| 11 | * This file is licensed under the terms of the GNU General Public |
| 12 | * License version 2. This program is licensed "as is" without any |
| 13 | * warranty of any kind, whether express or implied. |
| 14 | */ |
| 15 | |
| 16 | #include <linux/clk.h> |
| 17 | #include <linux/delay.h> |
| 18 | #include <linux/gpio.h> |
| 19 | #include <linux/highmem.h> |
Paul Gortmaker | 88b4767 | 2011-07-03 15:15:51 -0400 | [diff] [blame] | 20 | #include <linux/module.h> |
Viresh KUMAR | c63b3cb | 2010-05-26 14:42:10 -0700 | [diff] [blame] | 21 | #include <linux/interrupt.h> |
| 22 | #include <linux/irq.h> |
Viresh Kumar | 067bf74 | 2012-09-28 15:58:22 +0530 | [diff] [blame] | 23 | #include <linux/of.h> |
| 24 | #include <linux/of_gpio.h> |
Viresh KUMAR | c63b3cb | 2010-05-26 14:42:10 -0700 | [diff] [blame] | 25 | #include <linux/platform_device.h> |
Viresh Kumar | b70a7fa | 2011-11-15 16:24:40 +0530 | [diff] [blame] | 26 | #include <linux/pm.h> |
Viresh KUMAR | c63b3cb | 2010-05-26 14:42:10 -0700 | [diff] [blame] | 27 | #include <linux/slab.h> |
| 28 | #include <linux/mmc/host.h> |
| 29 | #include <linux/mmc/sdhci-spear.h> |
| 30 | #include <linux/io.h> |
| 31 | #include "sdhci.h" |
| 32 | |
| 33 | struct spear_sdhci { |
| 34 | struct clk *clk; |
| 35 | struct sdhci_plat_data *data; |
| 36 | }; |
| 37 | |
| 38 | /* sdhci ops */ |
| 39 | static struct sdhci_ops sdhci_pltfm_ops = { |
| 40 | /* Nothing to do for now. */ |
| 41 | }; |
| 42 | |
| 43 | /* gpio card detection interrupt handler */ |
| 44 | static irqreturn_t sdhci_gpio_irq(int irq, void *dev_id) |
| 45 | { |
| 46 | struct platform_device *pdev = dev_id; |
| 47 | struct sdhci_host *host = platform_get_drvdata(pdev); |
| 48 | struct spear_sdhci *sdhci = dev_get_platdata(&pdev->dev); |
| 49 | unsigned long gpio_irq_type; |
| 50 | int val; |
| 51 | |
| 52 | val = gpio_get_value(sdhci->data->card_int_gpio); |
| 53 | |
| 54 | /* val == 1 -> card removed, val == 0 -> card inserted */ |
| 55 | /* if card removed - set irq for low level, else vice versa */ |
| 56 | gpio_irq_type = val ? IRQF_TRIGGER_LOW : IRQF_TRIGGER_HIGH; |
Thomas Gleixner | dced35a | 2011-03-28 17:49:12 +0200 | [diff] [blame] | 57 | irq_set_irq_type(irq, gpio_irq_type); |
Viresh KUMAR | c63b3cb | 2010-05-26 14:42:10 -0700 | [diff] [blame] | 58 | |
| 59 | if (sdhci->data->card_power_gpio >= 0) { |
| 60 | if (!sdhci->data->power_always_enb) { |
| 61 | /* if card inserted, give power, otherwise remove it */ |
| 62 | val = sdhci->data->power_active_high ? !val : val ; |
| 63 | gpio_set_value(sdhci->data->card_power_gpio, val); |
| 64 | } |
| 65 | } |
| 66 | |
| 67 | /* inform sdhci driver about card insertion/removal */ |
| 68 | tasklet_schedule(&host->card_tasklet); |
| 69 | |
| 70 | return IRQ_HANDLED; |
| 71 | } |
| 72 | |
Viresh Kumar | 067bf74 | 2012-09-28 15:58:22 +0530 | [diff] [blame] | 73 | #ifdef CONFIG_OF |
| 74 | static struct sdhci_plat_data * __devinit |
| 75 | sdhci_probe_config_dt(struct platform_device *pdev) |
| 76 | { |
| 77 | struct device_node *np = pdev->dev.of_node; |
| 78 | struct sdhci_plat_data *pdata = NULL; |
| 79 | int cd_gpio; |
| 80 | |
| 81 | cd_gpio = of_get_named_gpio(np, "cd-gpios", 0); |
| 82 | if (!gpio_is_valid(cd_gpio)) |
| 83 | cd_gpio = -1; |
| 84 | |
| 85 | /* If pdata is required */ |
| 86 | if (cd_gpio != -1) { |
| 87 | pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL); |
| 88 | if (!pdata) { |
| 89 | dev_err(&pdev->dev, "DT: kzalloc failed\n"); |
| 90 | return ERR_PTR(-ENOMEM); |
| 91 | } |
| 92 | } |
| 93 | |
| 94 | pdata->card_int_gpio = cd_gpio; |
| 95 | |
| 96 | return pdata; |
| 97 | } |
| 98 | #else |
| 99 | static struct sdhci_plat_data * __devinit |
| 100 | sdhci_probe_config_dt(struct platform_device *pdev) |
| 101 | { |
| 102 | return ERR_PTR(-ENOSYS); |
| 103 | } |
| 104 | #endif |
| 105 | |
Viresh KUMAR | c63b3cb | 2010-05-26 14:42:10 -0700 | [diff] [blame] | 106 | static int __devinit sdhci_probe(struct platform_device *pdev) |
| 107 | { |
Viresh Kumar | 067bf74 | 2012-09-28 15:58:22 +0530 | [diff] [blame] | 108 | struct device_node *np = pdev->dev.of_node; |
Viresh KUMAR | c63b3cb | 2010-05-26 14:42:10 -0700 | [diff] [blame] | 109 | struct sdhci_host *host; |
| 110 | struct resource *iomem; |
| 111 | struct spear_sdhci *sdhci; |
| 112 | int ret; |
| 113 | |
Viresh KUMAR | c63b3cb | 2010-05-26 14:42:10 -0700 | [diff] [blame] | 114 | iomem = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
| 115 | if (!iomem) { |
| 116 | ret = -ENOMEM; |
| 117 | dev_dbg(&pdev->dev, "memory resource not defined\n"); |
| 118 | goto err; |
| 119 | } |
| 120 | |
Viresh Kumar | 6ebaf8f | 2012-03-27 08:40:35 +0530 | [diff] [blame] | 121 | if (!devm_request_mem_region(&pdev->dev, iomem->start, |
| 122 | resource_size(iomem), "spear-sdhci")) { |
Viresh KUMAR | c63b3cb | 2010-05-26 14:42:10 -0700 | [diff] [blame] | 123 | ret = -EBUSY; |
| 124 | dev_dbg(&pdev->dev, "cannot request region\n"); |
| 125 | goto err; |
| 126 | } |
| 127 | |
Viresh Kumar | 6ebaf8f | 2012-03-27 08:40:35 +0530 | [diff] [blame] | 128 | sdhci = devm_kzalloc(&pdev->dev, sizeof(*sdhci), GFP_KERNEL); |
Viresh KUMAR | c63b3cb | 2010-05-26 14:42:10 -0700 | [diff] [blame] | 129 | if (!sdhci) { |
| 130 | ret = -ENOMEM; |
| 131 | dev_dbg(&pdev->dev, "cannot allocate memory for sdhci\n"); |
Viresh Kumar | 6ebaf8f | 2012-03-27 08:40:35 +0530 | [diff] [blame] | 132 | goto err; |
Viresh KUMAR | c63b3cb | 2010-05-26 14:42:10 -0700 | [diff] [blame] | 133 | } |
| 134 | |
| 135 | /* clk enable */ |
| 136 | sdhci->clk = clk_get(&pdev->dev, NULL); |
| 137 | if (IS_ERR(sdhci->clk)) { |
| 138 | ret = PTR_ERR(sdhci->clk); |
| 139 | dev_dbg(&pdev->dev, "Error getting clock\n"); |
Viresh Kumar | 6ebaf8f | 2012-03-27 08:40:35 +0530 | [diff] [blame] | 140 | goto err; |
Viresh KUMAR | c63b3cb | 2010-05-26 14:42:10 -0700 | [diff] [blame] | 141 | } |
| 142 | |
Viresh Kumar | da764f9 | 2012-09-28 15:58:23 +0530 | [diff] [blame] | 143 | ret = clk_prepare_enable(sdhci->clk); |
Viresh KUMAR | c63b3cb | 2010-05-26 14:42:10 -0700 | [diff] [blame] | 144 | if (ret) { |
| 145 | dev_dbg(&pdev->dev, "Error enabling clock\n"); |
Viresh Kumar | 6ebaf8f | 2012-03-27 08:40:35 +0530 | [diff] [blame] | 146 | goto put_clk; |
Viresh KUMAR | c63b3cb | 2010-05-26 14:42:10 -0700 | [diff] [blame] | 147 | } |
| 148 | |
Vipul Kumar Samar | 257f9df | 2012-11-08 20:39:09 +0530 | [diff] [blame^] | 149 | ret = clk_set_rate(sdhci->clk, 50000000); |
| 150 | if (ret) |
| 151 | dev_dbg(&pdev->dev, "Error setting desired clk, clk=%lu\n", |
| 152 | clk_get_rate(sdhci->clk)); |
| 153 | |
Viresh Kumar | 067bf74 | 2012-09-28 15:58:22 +0530 | [diff] [blame] | 154 | if (np) { |
| 155 | sdhci->data = sdhci_probe_config_dt(pdev); |
| 156 | if (IS_ERR(sdhci->data)) { |
| 157 | dev_err(&pdev->dev, "DT: Failed to get pdata\n"); |
| 158 | return -ENODEV; |
| 159 | } |
| 160 | } else { |
| 161 | sdhci->data = dev_get_platdata(&pdev->dev); |
| 162 | } |
| 163 | |
Viresh KUMAR | c63b3cb | 2010-05-26 14:42:10 -0700 | [diff] [blame] | 164 | pdev->dev.platform_data = sdhci; |
| 165 | |
| 166 | if (pdev->dev.parent) |
| 167 | host = sdhci_alloc_host(pdev->dev.parent, 0); |
| 168 | else |
| 169 | host = sdhci_alloc_host(&pdev->dev, 0); |
| 170 | |
| 171 | if (IS_ERR(host)) { |
| 172 | ret = PTR_ERR(host); |
| 173 | dev_dbg(&pdev->dev, "error allocating host\n"); |
Viresh Kumar | 6ebaf8f | 2012-03-27 08:40:35 +0530 | [diff] [blame] | 174 | goto disable_clk; |
Viresh KUMAR | c63b3cb | 2010-05-26 14:42:10 -0700 | [diff] [blame] | 175 | } |
| 176 | |
| 177 | host->hw_name = "sdhci"; |
| 178 | host->ops = &sdhci_pltfm_ops; |
| 179 | host->irq = platform_get_irq(pdev, 0); |
| 180 | host->quirks = SDHCI_QUIRK_BROKEN_ADMA; |
| 181 | |
Viresh Kumar | 6ebaf8f | 2012-03-27 08:40:35 +0530 | [diff] [blame] | 182 | host->ioaddr = devm_ioremap(&pdev->dev, iomem->start, |
| 183 | resource_size(iomem)); |
Viresh KUMAR | c63b3cb | 2010-05-26 14:42:10 -0700 | [diff] [blame] | 184 | if (!host->ioaddr) { |
| 185 | ret = -ENOMEM; |
| 186 | dev_dbg(&pdev->dev, "failed to remap registers\n"); |
Viresh Kumar | 6ebaf8f | 2012-03-27 08:40:35 +0530 | [diff] [blame] | 187 | goto free_host; |
Viresh KUMAR | c63b3cb | 2010-05-26 14:42:10 -0700 | [diff] [blame] | 188 | } |
| 189 | |
| 190 | ret = sdhci_add_host(host); |
| 191 | if (ret) { |
| 192 | dev_dbg(&pdev->dev, "error adding host\n"); |
Viresh Kumar | 6ebaf8f | 2012-03-27 08:40:35 +0530 | [diff] [blame] | 193 | goto free_host; |
Viresh KUMAR | c63b3cb | 2010-05-26 14:42:10 -0700 | [diff] [blame] | 194 | } |
| 195 | |
| 196 | platform_set_drvdata(pdev, host); |
| 197 | |
| 198 | /* |
| 199 | * It is optional to use GPIOs for sdhci Power control & sdhci card |
| 200 | * interrupt detection. If sdhci->data is NULL, then use original sdhci |
| 201 | * lines otherwise GPIO lines. |
| 202 | * If GPIO is selected for power control, then power should be disabled |
| 203 | * after card removal and should be enabled when card insertion |
| 204 | * interrupt occurs |
| 205 | */ |
| 206 | if (!sdhci->data) |
| 207 | return 0; |
| 208 | |
| 209 | if (sdhci->data->card_power_gpio >= 0) { |
| 210 | int val = 0; |
| 211 | |
Viresh Kumar | 6ebaf8f | 2012-03-27 08:40:35 +0530 | [diff] [blame] | 212 | ret = devm_gpio_request(&pdev->dev, |
| 213 | sdhci->data->card_power_gpio, "sdhci"); |
Viresh KUMAR | c63b3cb | 2010-05-26 14:42:10 -0700 | [diff] [blame] | 214 | if (ret < 0) { |
| 215 | dev_dbg(&pdev->dev, "gpio request fail: %d\n", |
| 216 | sdhci->data->card_power_gpio); |
Viresh Kumar | 6ebaf8f | 2012-03-27 08:40:35 +0530 | [diff] [blame] | 217 | goto set_drvdata; |
Viresh KUMAR | c63b3cb | 2010-05-26 14:42:10 -0700 | [diff] [blame] | 218 | } |
| 219 | |
| 220 | if (sdhci->data->power_always_enb) |
| 221 | val = sdhci->data->power_active_high; |
| 222 | else |
| 223 | val = !sdhci->data->power_active_high; |
| 224 | |
| 225 | ret = gpio_direction_output(sdhci->data->card_power_gpio, val); |
| 226 | if (ret) { |
| 227 | dev_dbg(&pdev->dev, "gpio set direction fail: %d\n", |
| 228 | sdhci->data->card_power_gpio); |
Viresh Kumar | 6ebaf8f | 2012-03-27 08:40:35 +0530 | [diff] [blame] | 229 | goto set_drvdata; |
Viresh KUMAR | c63b3cb | 2010-05-26 14:42:10 -0700 | [diff] [blame] | 230 | } |
Viresh KUMAR | c63b3cb | 2010-05-26 14:42:10 -0700 | [diff] [blame] | 231 | } |
| 232 | |
| 233 | if (sdhci->data->card_int_gpio >= 0) { |
Viresh Kumar | 6ebaf8f | 2012-03-27 08:40:35 +0530 | [diff] [blame] | 234 | ret = devm_gpio_request(&pdev->dev, sdhci->data->card_int_gpio, |
| 235 | "sdhci"); |
Viresh KUMAR | c63b3cb | 2010-05-26 14:42:10 -0700 | [diff] [blame] | 236 | if (ret < 0) { |
| 237 | dev_dbg(&pdev->dev, "gpio request fail: %d\n", |
| 238 | sdhci->data->card_int_gpio); |
Viresh Kumar | 6ebaf8f | 2012-03-27 08:40:35 +0530 | [diff] [blame] | 239 | goto set_drvdata; |
Viresh KUMAR | c63b3cb | 2010-05-26 14:42:10 -0700 | [diff] [blame] | 240 | } |
| 241 | |
| 242 | ret = gpio_direction_input(sdhci->data->card_int_gpio); |
| 243 | if (ret) { |
| 244 | dev_dbg(&pdev->dev, "gpio set direction fail: %d\n", |
| 245 | sdhci->data->card_int_gpio); |
Viresh Kumar | 6ebaf8f | 2012-03-27 08:40:35 +0530 | [diff] [blame] | 246 | goto set_drvdata; |
Viresh KUMAR | c63b3cb | 2010-05-26 14:42:10 -0700 | [diff] [blame] | 247 | } |
Viresh Kumar | 6ebaf8f | 2012-03-27 08:40:35 +0530 | [diff] [blame] | 248 | ret = devm_request_irq(&pdev->dev, |
| 249 | gpio_to_irq(sdhci->data->card_int_gpio), |
Viresh KUMAR | c63b3cb | 2010-05-26 14:42:10 -0700 | [diff] [blame] | 250 | sdhci_gpio_irq, IRQF_TRIGGER_LOW, |
| 251 | mmc_hostname(host->mmc), pdev); |
| 252 | if (ret) { |
| 253 | dev_dbg(&pdev->dev, "gpio request irq fail: %d\n", |
| 254 | sdhci->data->card_int_gpio); |
Viresh Kumar | 6ebaf8f | 2012-03-27 08:40:35 +0530 | [diff] [blame] | 255 | goto set_drvdata; |
Viresh KUMAR | c63b3cb | 2010-05-26 14:42:10 -0700 | [diff] [blame] | 256 | } |
| 257 | |
| 258 | } |
| 259 | |
| 260 | return 0; |
| 261 | |
Viresh Kumar | 6ebaf8f | 2012-03-27 08:40:35 +0530 | [diff] [blame] | 262 | set_drvdata: |
Viresh KUMAR | c63b3cb | 2010-05-26 14:42:10 -0700 | [diff] [blame] | 263 | platform_set_drvdata(pdev, NULL); |
| 264 | sdhci_remove_host(host, 1); |
Viresh Kumar | 6ebaf8f | 2012-03-27 08:40:35 +0530 | [diff] [blame] | 265 | free_host: |
Viresh KUMAR | c63b3cb | 2010-05-26 14:42:10 -0700 | [diff] [blame] | 266 | sdhci_free_host(host); |
Viresh Kumar | 6ebaf8f | 2012-03-27 08:40:35 +0530 | [diff] [blame] | 267 | disable_clk: |
Viresh Kumar | da764f9 | 2012-09-28 15:58:23 +0530 | [diff] [blame] | 268 | clk_disable_unprepare(sdhci->clk); |
Viresh Kumar | 6ebaf8f | 2012-03-27 08:40:35 +0530 | [diff] [blame] | 269 | put_clk: |
Viresh KUMAR | c63b3cb | 2010-05-26 14:42:10 -0700 | [diff] [blame] | 270 | clk_put(sdhci->clk); |
Viresh KUMAR | c63b3cb | 2010-05-26 14:42:10 -0700 | [diff] [blame] | 271 | err: |
| 272 | dev_err(&pdev->dev, "spear-sdhci probe failed: %d\n", ret); |
| 273 | return ret; |
| 274 | } |
| 275 | |
| 276 | static int __devexit sdhci_remove(struct platform_device *pdev) |
| 277 | { |
| 278 | struct sdhci_host *host = platform_get_drvdata(pdev); |
Viresh KUMAR | c63b3cb | 2010-05-26 14:42:10 -0700 | [diff] [blame] | 279 | struct spear_sdhci *sdhci = dev_get_platdata(&pdev->dev); |
Viresh Kumar | 6ebaf8f | 2012-03-27 08:40:35 +0530 | [diff] [blame] | 280 | int dead = 0; |
Viresh KUMAR | c63b3cb | 2010-05-26 14:42:10 -0700 | [diff] [blame] | 281 | u32 scratch; |
| 282 | |
Viresh KUMAR | c63b3cb | 2010-05-26 14:42:10 -0700 | [diff] [blame] | 283 | platform_set_drvdata(pdev, NULL); |
Viresh KUMAR | c63b3cb | 2010-05-26 14:42:10 -0700 | [diff] [blame] | 284 | scratch = readl(host->ioaddr + SDHCI_INT_STATUS); |
| 285 | if (scratch == (u32)-1) |
| 286 | dead = 1; |
| 287 | |
| 288 | sdhci_remove_host(host, dead); |
Viresh KUMAR | c63b3cb | 2010-05-26 14:42:10 -0700 | [diff] [blame] | 289 | sdhci_free_host(host); |
Viresh Kumar | da764f9 | 2012-09-28 15:58:23 +0530 | [diff] [blame] | 290 | clk_disable_unprepare(sdhci->clk); |
Viresh KUMAR | c63b3cb | 2010-05-26 14:42:10 -0700 | [diff] [blame] | 291 | clk_put(sdhci->clk); |
Viresh KUMAR | c63b3cb | 2010-05-26 14:42:10 -0700 | [diff] [blame] | 292 | |
| 293 | return 0; |
| 294 | } |
| 295 | |
Viresh Kumar | b70a7fa | 2011-11-15 16:24:40 +0530 | [diff] [blame] | 296 | #ifdef CONFIG_PM |
| 297 | static int sdhci_suspend(struct device *dev) |
| 298 | { |
| 299 | struct sdhci_host *host = dev_get_drvdata(dev); |
| 300 | struct spear_sdhci *sdhci = dev_get_platdata(dev); |
Viresh Kumar | b70a7fa | 2011-11-15 16:24:40 +0530 | [diff] [blame] | 301 | int ret; |
| 302 | |
Viresh Kumar | 984589e | 2012-01-04 11:48:42 +0530 | [diff] [blame] | 303 | ret = sdhci_suspend_host(host); |
Viresh Kumar | b70a7fa | 2011-11-15 16:24:40 +0530 | [diff] [blame] | 304 | if (!ret) |
Viresh Kumar | da764f9 | 2012-09-28 15:58:23 +0530 | [diff] [blame] | 305 | clk_disable_unprepare(sdhci->clk); |
Viresh Kumar | b70a7fa | 2011-11-15 16:24:40 +0530 | [diff] [blame] | 306 | |
| 307 | return ret; |
| 308 | } |
| 309 | |
| 310 | static int sdhci_resume(struct device *dev) |
| 311 | { |
| 312 | struct sdhci_host *host = dev_get_drvdata(dev); |
| 313 | struct spear_sdhci *sdhci = dev_get_platdata(dev); |
| 314 | int ret; |
| 315 | |
Viresh Kumar | da764f9 | 2012-09-28 15:58:23 +0530 | [diff] [blame] | 316 | ret = clk_prepare_enable(sdhci->clk); |
Viresh Kumar | b70a7fa | 2011-11-15 16:24:40 +0530 | [diff] [blame] | 317 | if (ret) { |
| 318 | dev_dbg(dev, "Resume: Error enabling clock\n"); |
| 319 | return ret; |
| 320 | } |
| 321 | |
| 322 | return sdhci_resume_host(host); |
| 323 | } |
Viresh Kumar | b70a7fa | 2011-11-15 16:24:40 +0530 | [diff] [blame] | 324 | #endif |
| 325 | |
Shiraz Hashim | 4b1a617 | 2012-02-24 11:55:35 +0530 | [diff] [blame] | 326 | static SIMPLE_DEV_PM_OPS(sdhci_pm_ops, sdhci_suspend, sdhci_resume); |
| 327 | |
Viresh Kumar | 067bf74 | 2012-09-28 15:58:22 +0530 | [diff] [blame] | 328 | #ifdef CONFIG_OF |
| 329 | static const struct of_device_id sdhci_spear_id_table[] = { |
| 330 | { .compatible = "st,spear300-sdhci" }, |
| 331 | {} |
| 332 | }; |
| 333 | MODULE_DEVICE_TABLE(of, sdhci_spear_id_table); |
| 334 | #endif |
| 335 | |
Viresh KUMAR | c63b3cb | 2010-05-26 14:42:10 -0700 | [diff] [blame] | 336 | static struct platform_driver sdhci_driver = { |
| 337 | .driver = { |
| 338 | .name = "sdhci", |
| 339 | .owner = THIS_MODULE, |
Viresh Kumar | b70a7fa | 2011-11-15 16:24:40 +0530 | [diff] [blame] | 340 | .pm = &sdhci_pm_ops, |
Viresh Kumar | 067bf74 | 2012-09-28 15:58:22 +0530 | [diff] [blame] | 341 | .of_match_table = of_match_ptr(sdhci_spear_id_table), |
Viresh KUMAR | c63b3cb | 2010-05-26 14:42:10 -0700 | [diff] [blame] | 342 | }, |
| 343 | .probe = sdhci_probe, |
| 344 | .remove = __devexit_p(sdhci_remove), |
| 345 | }; |
| 346 | |
Axel Lin | d1f81a6 | 2011-11-26 12:55:43 +0800 | [diff] [blame] | 347 | module_platform_driver(sdhci_driver); |
Viresh KUMAR | c63b3cb | 2010-05-26 14:42:10 -0700 | [diff] [blame] | 348 | |
| 349 | MODULE_DESCRIPTION("SPEAr Secure Digital Host Controller Interface driver"); |
Viresh Kumar | 10d8935 | 2012-06-20 12:53:02 -0700 | [diff] [blame] | 350 | MODULE_AUTHOR("Viresh Kumar <viresh.linux@gmail.com>"); |
Viresh KUMAR | c63b3cb | 2010-05-26 14:42:10 -0700 | [diff] [blame] | 351 | MODULE_LICENSE("GPL v2"); |