sdhci-pci.c 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701
  1. /* linux/drivers/mmc/host/sdhci-pci.c - SDHCI on PCI bus interface
  2. *
  3. * Copyright (C) 2005-2008 Pierre Ossman, All Rights Reserved.
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation; either version 2 of the License, or (at
  8. * your option) any later version.
  9. *
  10. * Thanks to the following companies for their support:
  11. *
  12. * - JMicron (hardware and technical support)
  13. */
  14. #include <linux/delay.h>
  15. #include <linux/highmem.h>
  16. #include <linux/pci.h>
  17. #include <linux/dma-mapping.h>
  18. #include <linux/mmc/host.h>
  19. #include <asm/scatterlist.h>
  20. #include <asm/io.h>
  21. #include "sdhci.h"
  22. /*
  23. * PCI registers
  24. */
  25. #define PCI_SDHCI_IFPIO 0x00
  26. #define PCI_SDHCI_IFDMA 0x01
  27. #define PCI_SDHCI_IFVENDOR 0x02
  28. #define PCI_SLOT_INFO 0x40 /* 8 bits */
  29. #define PCI_SLOT_INFO_SLOTS(x) ((x >> 4) & 7)
  30. #define PCI_SLOT_INFO_FIRST_BAR_MASK 0x07
  31. #define MAX_SLOTS 8
  32. struct sdhci_pci_chip;
  33. struct sdhci_pci_slot;
  34. struct sdhci_pci_fixes {
  35. unsigned int quirks;
  36. int (*probe)(struct sdhci_pci_chip*);
  37. int (*probe_slot)(struct sdhci_pci_slot*);
  38. void (*remove_slot)(struct sdhci_pci_slot*);
  39. int (*suspend)(struct sdhci_pci_chip*,
  40. pm_message_t);
  41. int (*resume)(struct sdhci_pci_chip*);
  42. };
  43. struct sdhci_pci_slot {
  44. struct sdhci_pci_chip *chip;
  45. struct sdhci_host *host;
  46. int pci_bar;
  47. };
  48. struct sdhci_pci_chip {
  49. struct pci_dev *pdev;
  50. unsigned int quirks;
  51. const struct sdhci_pci_fixes *fixes;
  52. int num_slots; /* Slots on controller */
  53. struct sdhci_pci_slot *slots[MAX_SLOTS]; /* Pointers to host slots */
  54. };
  55. /*****************************************************************************\
  56. * *
  57. * Hardware specific quirk handling *
  58. * *
  59. \*****************************************************************************/
  60. static int ricoh_probe(struct sdhci_pci_chip *chip)
  61. {
  62. if (chip->pdev->subsystem_vendor == PCI_VENDOR_ID_IBM)
  63. chip->quirks |= SDHCI_QUIRK_CLOCK_BEFORE_RESET;
  64. if (chip->pdev->subsystem_vendor == PCI_VENDOR_ID_SAMSUNG)
  65. chip->quirks |= SDHCI_QUIRK_NO_CARD_NO_RESET;
  66. return 0;
  67. }
  68. static const struct sdhci_pci_fixes sdhci_ricoh = {
  69. .probe = ricoh_probe,
  70. };
  71. static const struct sdhci_pci_fixes sdhci_ene_712 = {
  72. .quirks = SDHCI_QUIRK_SINGLE_POWER_WRITE |
  73. SDHCI_QUIRK_BROKEN_DMA,
  74. };
  75. static const struct sdhci_pci_fixes sdhci_ene_714 = {
  76. .quirks = SDHCI_QUIRK_SINGLE_POWER_WRITE |
  77. SDHCI_QUIRK_RESET_CMD_DATA_ON_IOS |
  78. SDHCI_QUIRK_BROKEN_DMA,
  79. };
  80. static const struct sdhci_pci_fixes sdhci_cafe = {
  81. .quirks = SDHCI_QUIRK_NO_SIMULT_VDD_AND_POWER |
  82. SDHCI_QUIRK_BROKEN_TIMEOUT_VAL,
  83. };
  84. static int jmicron_pmos(struct sdhci_pci_chip *chip, int on)
  85. {
  86. u8 scratch;
  87. int ret;
  88. ret = pci_read_config_byte(chip->pdev, 0xAE, &scratch);
  89. if (ret)
  90. return ret;
  91. /*
  92. * Turn PMOS on [bit 0], set over current detection to 2.4 V
  93. * [bit 1:2] and enable over current debouncing [bit 6].
  94. */
  95. if (on)
  96. scratch |= 0x47;
  97. else
  98. scratch &= ~0x47;
  99. ret = pci_write_config_byte(chip->pdev, 0xAE, scratch);
  100. if (ret)
  101. return ret;
  102. return 0;
  103. }
  104. static int jmicron_probe(struct sdhci_pci_chip *chip)
  105. {
  106. int ret;
  107. /*
  108. * JMicron chips can have two interfaces to the same hardware
  109. * in order to work around limitations in Microsoft's driver.
  110. * We need to make sure we only bind to one of them.
  111. *
  112. * This code assumes two things:
  113. *
  114. * 1. The PCI code adds subfunctions in order.
  115. *
  116. * 2. The MMC interface has a lower subfunction number
  117. * than the SD interface.
  118. */
  119. if (chip->pdev->device == PCI_DEVICE_ID_JMICRON_JMB38X_SD) {
  120. struct pci_dev *sd_dev;
  121. sd_dev = NULL;
  122. while ((sd_dev = pci_get_device(PCI_VENDOR_ID_JMICRON,
  123. PCI_DEVICE_ID_JMICRON_JMB38X_MMC, sd_dev)) != NULL) {
  124. if ((PCI_SLOT(chip->pdev->devfn) ==
  125. PCI_SLOT(sd_dev->devfn)) &&
  126. (chip->pdev->bus == sd_dev->bus))
  127. break;
  128. }
  129. if (sd_dev) {
  130. pci_dev_put(sd_dev);
  131. dev_info(&chip->pdev->dev, "Refusing to bind to "
  132. "secondary interface.\n");
  133. return -ENODEV;
  134. }
  135. }
  136. /*
  137. * JMicron chips need a bit of a nudge to enable the power
  138. * output pins.
  139. */
  140. ret = jmicron_pmos(chip, 1);
  141. if (ret) {
  142. dev_err(&chip->pdev->dev, "Failure enabling card power\n");
  143. return ret;
  144. }
  145. return 0;
  146. }
  147. static void jmicron_enable_mmc(struct sdhci_host *host, int on)
  148. {
  149. u8 scratch;
  150. scratch = readb(host->ioaddr + 0xC0);
  151. if (on)
  152. scratch |= 0x01;
  153. else
  154. scratch &= ~0x01;
  155. writeb(scratch, host->ioaddr + 0xC0);
  156. }
  157. static int jmicron_probe_slot(struct sdhci_pci_slot *slot)
  158. {
  159. /*
  160. * The secondary interface requires a bit set to get the
  161. * interrupts.
  162. */
  163. if (slot->chip->pdev->device == PCI_DEVICE_ID_JMICRON_JMB38X_MMC)
  164. jmicron_enable_mmc(slot->host, 1);
  165. return 0;
  166. }
  167. static void jmicron_remove_slot(struct sdhci_pci_slot *slot)
  168. {
  169. if (slot->chip->pdev->device == PCI_DEVICE_ID_JMICRON_JMB38X_MMC)
  170. jmicron_enable_mmc(slot->host, 0);
  171. }
  172. static int jmicron_suspend(struct sdhci_pci_chip *chip, pm_message_t state)
  173. {
  174. int i;
  175. if (chip->pdev->device == PCI_DEVICE_ID_JMICRON_JMB38X_MMC) {
  176. for (i = 0;i < chip->num_slots;i++)
  177. jmicron_enable_mmc(chip->slots[i]->host, 0);
  178. }
  179. return 0;
  180. }
  181. static int jmicron_resume(struct sdhci_pci_chip *chip)
  182. {
  183. int ret, i;
  184. if (chip->pdev->device == PCI_DEVICE_ID_JMICRON_JMB38X_MMC) {
  185. for (i = 0;i < chip->num_slots;i++)
  186. jmicron_enable_mmc(chip->slots[i]->host, 1);
  187. }
  188. ret = jmicron_pmos(chip, 1);
  189. if (ret) {
  190. dev_err(&chip->pdev->dev, "Failure enabling card power\n");
  191. return ret;
  192. }
  193. return 0;
  194. }
  195. static const struct sdhci_pci_fixes sdhci_jmicron = {
  196. .quirks = SDHCI_QUIRK_32BIT_DMA_ADDR |
  197. SDHCI_QUIRK_32BIT_DMA_SIZE |
  198. SDHCI_QUIRK_RESET_AFTER_REQUEST,
  199. .probe = jmicron_probe,
  200. .probe_slot = jmicron_probe_slot,
  201. .remove_slot = jmicron_remove_slot,
  202. .suspend = jmicron_suspend,
  203. .resume = jmicron_resume,
  204. };
  205. static const struct pci_device_id pci_ids[] __devinitdata = {
  206. {
  207. .vendor = PCI_VENDOR_ID_RICOH,
  208. .device = PCI_DEVICE_ID_RICOH_R5C822,
  209. .subvendor = PCI_ANY_ID,
  210. .subdevice = PCI_ANY_ID,
  211. .driver_data = (kernel_ulong_t)&sdhci_ricoh,
  212. },
  213. {
  214. .vendor = PCI_VENDOR_ID_ENE,
  215. .device = PCI_DEVICE_ID_ENE_CB712_SD,
  216. .subvendor = PCI_ANY_ID,
  217. .subdevice = PCI_ANY_ID,
  218. .driver_data = (kernel_ulong_t)&sdhci_ene_712,
  219. },
  220. {
  221. .vendor = PCI_VENDOR_ID_ENE,
  222. .device = PCI_DEVICE_ID_ENE_CB712_SD_2,
  223. .subvendor = PCI_ANY_ID,
  224. .subdevice = PCI_ANY_ID,
  225. .driver_data = (kernel_ulong_t)&sdhci_ene_712,
  226. },
  227. {
  228. .vendor = PCI_VENDOR_ID_ENE,
  229. .device = PCI_DEVICE_ID_ENE_CB714_SD,
  230. .subvendor = PCI_ANY_ID,
  231. .subdevice = PCI_ANY_ID,
  232. .driver_data = (kernel_ulong_t)&sdhci_ene_714,
  233. },
  234. {
  235. .vendor = PCI_VENDOR_ID_ENE,
  236. .device = PCI_DEVICE_ID_ENE_CB714_SD_2,
  237. .subvendor = PCI_ANY_ID,
  238. .subdevice = PCI_ANY_ID,
  239. .driver_data = (kernel_ulong_t)&sdhci_ene_714,
  240. },
  241. {
  242. .vendor = PCI_VENDOR_ID_MARVELL,
  243. .device = PCI_DEVICE_ID_MARVELL_CAFE_SD,
  244. .subvendor = PCI_ANY_ID,
  245. .subdevice = PCI_ANY_ID,
  246. .driver_data = (kernel_ulong_t)&sdhci_cafe,
  247. },
  248. {
  249. .vendor = PCI_VENDOR_ID_JMICRON,
  250. .device = PCI_DEVICE_ID_JMICRON_JMB38X_SD,
  251. .subvendor = PCI_ANY_ID,
  252. .subdevice = PCI_ANY_ID,
  253. .driver_data = (kernel_ulong_t)&sdhci_jmicron,
  254. },
  255. {
  256. .vendor = PCI_VENDOR_ID_JMICRON,
  257. .device = PCI_DEVICE_ID_JMICRON_JMB38X_MMC,
  258. .subvendor = PCI_ANY_ID,
  259. .subdevice = PCI_ANY_ID,
  260. .driver_data = (kernel_ulong_t)&sdhci_jmicron,
  261. },
  262. { /* Generic SD host controller */
  263. PCI_DEVICE_CLASS((PCI_CLASS_SYSTEM_SDHCI << 8), 0xFFFF00)
  264. },
  265. { /* end: all zeroes */ },
  266. };
  267. MODULE_DEVICE_TABLE(pci, pci_ids);
  268. /*****************************************************************************\
  269. * *
  270. * SDHCI core callbacks *
  271. * *
  272. \*****************************************************************************/
  273. static int sdhci_pci_enable_dma(struct sdhci_host *host)
  274. {
  275. struct sdhci_pci_slot *slot;
  276. struct pci_dev *pdev;
  277. int ret;
  278. slot = sdhci_priv(host);
  279. pdev = slot->chip->pdev;
  280. if (((pdev->class & 0xFFFF00) == (PCI_CLASS_SYSTEM_SDHCI << 8)) &&
  281. ((pdev->class & 0x0000FF) != PCI_SDHCI_IFDMA) &&
  282. (host->flags & SDHCI_USE_DMA)) {
  283. dev_warn(&pdev->dev, "Will use DMA mode even though HW "
  284. "doesn't fully claim to support it.\n");
  285. }
  286. ret = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
  287. if (ret)
  288. return ret;
  289. pci_set_master(pdev);
  290. return 0;
  291. }
  292. static struct sdhci_ops sdhci_pci_ops = {
  293. .enable_dma = sdhci_pci_enable_dma,
  294. };
  295. /*****************************************************************************\
  296. * *
  297. * Suspend/resume *
  298. * *
  299. \*****************************************************************************/
  300. #ifdef CONFIG_PM
  301. static int sdhci_pci_suspend (struct pci_dev *pdev, pm_message_t state)
  302. {
  303. struct sdhci_pci_chip *chip;
  304. struct sdhci_pci_slot *slot;
  305. int i, ret;
  306. chip = pci_get_drvdata(pdev);
  307. if (!chip)
  308. return 0;
  309. for (i = 0;i < chip->num_slots;i++) {
  310. slot = chip->slots[i];
  311. if (!slot)
  312. continue;
  313. ret = sdhci_suspend_host(slot->host, state);
  314. if (ret) {
  315. for (i--;i >= 0;i--)
  316. sdhci_resume_host(chip->slots[i]->host);
  317. return ret;
  318. }
  319. }
  320. if (chip->fixes && chip->fixes->suspend) {
  321. ret = chip->fixes->suspend(chip, state);
  322. if (ret) {
  323. for (i = chip->num_slots - 1;i >= 0;i--)
  324. sdhci_resume_host(chip->slots[i]->host);
  325. return ret;
  326. }
  327. }
  328. pci_save_state(pdev);
  329. pci_enable_wake(pdev, pci_choose_state(pdev, state), 0);
  330. pci_disable_device(pdev);
  331. pci_set_power_state(pdev, pci_choose_state(pdev, state));
  332. return 0;
  333. }
  334. static int sdhci_pci_resume (struct pci_dev *pdev)
  335. {
  336. struct sdhci_pci_chip *chip;
  337. struct sdhci_pci_slot *slot;
  338. int i, ret;
  339. chip = pci_get_drvdata(pdev);
  340. if (!chip)
  341. return 0;
  342. pci_set_power_state(pdev, PCI_D0);
  343. pci_restore_state(pdev);
  344. ret = pci_enable_device(pdev);
  345. if (ret)
  346. return ret;
  347. if (chip->fixes && chip->fixes->resume) {
  348. ret = chip->fixes->resume(chip);
  349. if (ret)
  350. return ret;
  351. }
  352. for (i = 0;i < chip->num_slots;i++) {
  353. slot = chip->slots[i];
  354. if (!slot)
  355. continue;
  356. ret = sdhci_resume_host(slot->host);
  357. if (ret)
  358. return ret;
  359. }
  360. return 0;
  361. }
  362. #else /* CONFIG_PM */
  363. #define sdhci_pci_suspend NULL
  364. #define sdhci_pci_resume NULL
  365. #endif /* CONFIG_PM */
  366. /*****************************************************************************\
  367. * *
  368. * Device probing/removal *
  369. * *
  370. \*****************************************************************************/
  371. static struct sdhci_pci_slot * __devinit sdhci_pci_probe_slot(
  372. struct pci_dev *pdev, struct sdhci_pci_chip *chip, int bar)
  373. {
  374. struct sdhci_pci_slot *slot;
  375. struct sdhci_host *host;
  376. resource_size_t addr;
  377. int ret;
  378. if (!(pci_resource_flags(pdev, bar) & IORESOURCE_MEM)) {
  379. dev_err(&pdev->dev, "BAR %d is not iomem. Aborting.\n", bar);
  380. return ERR_PTR(-ENODEV);
  381. }
  382. if (pci_resource_len(pdev, bar) != 0x100) {
  383. dev_err(&pdev->dev, "Invalid iomem size. You may "
  384. "experience problems.\n");
  385. }
  386. if ((pdev->class & 0x0000FF) == PCI_SDHCI_IFVENDOR) {
  387. dev_err(&pdev->dev, "Vendor specific interface. Aborting.\n");
  388. return ERR_PTR(-ENODEV);
  389. }
  390. if ((pdev->class & 0x0000FF) > PCI_SDHCI_IFVENDOR) {
  391. dev_err(&pdev->dev, "Unknown interface. Aborting.\n");
  392. return ERR_PTR(-ENODEV);
  393. }
  394. host = sdhci_alloc_host(&pdev->dev, sizeof(struct sdhci_pci_slot));
  395. if (IS_ERR(host)) {
  396. ret = PTR_ERR(host);
  397. goto unmap;
  398. }
  399. slot = sdhci_priv(host);
  400. slot->chip = chip;
  401. slot->host = host;
  402. slot->pci_bar = bar;
  403. host->hw_name = "PCI";
  404. host->ops = &sdhci_pci_ops;
  405. host->quirks = chip->quirks;
  406. host->irq = pdev->irq;
  407. ret = pci_request_region(pdev, bar, mmc_hostname(host->mmc));
  408. if (ret) {
  409. dev_err(&pdev->dev, "cannot request region\n");
  410. return ERR_PTR(ret);
  411. }
  412. addr = pci_resource_start(pdev, bar);
  413. host->ioaddr = ioremap_nocache(addr, pci_resource_len(pdev, bar));
  414. if (!host->ioaddr) {
  415. dev_err(&pdev->dev, "failed to remap registers\n");
  416. goto release;
  417. }
  418. if (chip->fixes && chip->fixes->probe_slot) {
  419. ret = chip->fixes->probe_slot(slot);
  420. if (ret)
  421. goto unmap;
  422. }
  423. ret = sdhci_add_host(host);
  424. if (ret)
  425. goto remove;
  426. return slot;
  427. remove:
  428. if (chip->fixes && chip->fixes->remove_slot)
  429. chip->fixes->remove_slot(slot);
  430. unmap:
  431. iounmap(host->ioaddr);
  432. release:
  433. pci_release_region(pdev, bar);
  434. sdhci_free_host(host);
  435. return ERR_PTR(ret);
  436. }
  437. static void sdhci_pci_remove_slot(struct sdhci_pci_slot *slot)
  438. {
  439. sdhci_remove_host(slot->host);
  440. if (slot->chip->fixes && slot->chip->fixes->remove_slot)
  441. slot->chip->fixes->remove_slot(slot);
  442. pci_release_region(slot->chip->pdev, slot->pci_bar);
  443. sdhci_free_host(slot->host);
  444. }
  445. static int __devinit sdhci_pci_probe(struct pci_dev *pdev,
  446. const struct pci_device_id *ent)
  447. {
  448. struct sdhci_pci_chip *chip;
  449. struct sdhci_pci_slot *slot;
  450. u8 slots, rev, first_bar;
  451. int ret, i;
  452. BUG_ON(pdev == NULL);
  453. BUG_ON(ent == NULL);
  454. pci_read_config_byte(pdev, PCI_CLASS_REVISION, &rev);
  455. dev_info(&pdev->dev, "SDHCI controller found [%04x:%04x] (rev %x)\n",
  456. (int)pdev->vendor, (int)pdev->device, (int)rev);
  457. ret = pci_read_config_byte(pdev, PCI_SLOT_INFO, &slots);
  458. if (ret)
  459. return ret;
  460. slots = PCI_SLOT_INFO_SLOTS(slots) + 1;
  461. dev_dbg(&pdev->dev, "found %d slot(s)\n", slots);
  462. if (slots == 0)
  463. return -ENODEV;
  464. BUG_ON(slots > MAX_SLOTS);
  465. ret = pci_read_config_byte(pdev, PCI_SLOT_INFO, &first_bar);
  466. if (ret)
  467. return ret;
  468. first_bar &= PCI_SLOT_INFO_FIRST_BAR_MASK;
  469. if (first_bar > 5) {
  470. dev_err(&pdev->dev, "Invalid first BAR. Aborting.\n");
  471. return -ENODEV;
  472. }
  473. ret = pci_enable_device(pdev);
  474. if (ret)
  475. return ret;
  476. chip = kzalloc(sizeof(struct sdhci_pci_chip), GFP_KERNEL);
  477. if (!chip) {
  478. ret = -ENOMEM;
  479. goto err;
  480. }
  481. chip->pdev = pdev;
  482. chip->fixes = (const struct sdhci_pci_fixes*)ent->driver_data;
  483. if (chip->fixes)
  484. chip->quirks = chip->fixes->quirks;
  485. chip->num_slots = slots;
  486. pci_set_drvdata(pdev, chip);
  487. if (chip->fixes && chip->fixes->probe) {
  488. ret = chip->fixes->probe(chip);
  489. if (ret)
  490. goto free;
  491. }
  492. for (i = 0;i < slots;i++) {
  493. slot = sdhci_pci_probe_slot(pdev, chip, first_bar + i);
  494. if (IS_ERR(slot)) {
  495. for (i--;i >= 0;i--)
  496. sdhci_pci_remove_slot(chip->slots[i]);
  497. ret = PTR_ERR(slot);
  498. goto free;
  499. }
  500. chip->slots[i] = slot;
  501. }
  502. return 0;
  503. free:
  504. pci_set_drvdata(pdev, NULL);
  505. kfree(chip);
  506. err:
  507. pci_disable_device(pdev);
  508. return ret;
  509. }
  510. static void __devexit sdhci_pci_remove(struct pci_dev *pdev)
  511. {
  512. int i;
  513. struct sdhci_pci_chip *chip;
  514. chip = pci_get_drvdata(pdev);
  515. if (chip) {
  516. for (i = 0;i < chip->num_slots; i++)
  517. sdhci_pci_remove_slot(chip->slots[i]);
  518. pci_set_drvdata(pdev, NULL);
  519. kfree(chip);
  520. }
  521. pci_disable_device(pdev);
  522. }
  523. static struct pci_driver sdhci_driver = {
  524. .name = "sdhci-pci",
  525. .id_table = pci_ids,
  526. .probe = sdhci_pci_probe,
  527. .remove = __devexit_p(sdhci_pci_remove),
  528. .suspend = sdhci_pci_suspend,
  529. .resume = sdhci_pci_resume,
  530. };
  531. /*****************************************************************************\
  532. * *
  533. * Driver init/exit *
  534. * *
  535. \*****************************************************************************/
  536. static int __init sdhci_drv_init(void)
  537. {
  538. return pci_register_driver(&sdhci_driver);
  539. }
  540. static void __exit sdhci_drv_exit(void)
  541. {
  542. pci_unregister_driver(&sdhci_driver);
  543. }
  544. module_init(sdhci_drv_init);
  545. module_exit(sdhci_drv_exit);
  546. MODULE_AUTHOR("Pierre Ossman <drzeus@drzeus.cx>");
  547. MODULE_DESCRIPTION("Secure Digital Host Controller Interface PCI driver");
  548. MODULE_LICENSE("GPL");