pdc202xx_new.c 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587
  1. /*
  2. * Promise TX2/TX4/TX2000/133 IDE driver
  3. *
  4. * This program is free software; you can redistribute it and/or
  5. * modify it under the terms of the GNU General Public License
  6. * as published by the Free Software Foundation; either version
  7. * 2 of the License, or (at your option) any later version.
  8. *
  9. * Split from:
  10. * linux/drivers/ide/pdc202xx.c Version 0.35 Mar. 30, 2002
  11. * Copyright (C) 1998-2002 Andre Hedrick <andre@linux-ide.org>
  12. * Copyright (C) 2005-2007 MontaVista Software, Inc.
  13. * Portions Copyright (C) 1999 Promise Technology, Inc.
  14. * Author: Frank Tiernan (frankt@promise.com)
  15. * Released under terms of General Public License
  16. */
  17. #include <linux/module.h>
  18. #include <linux/types.h>
  19. #include <linux/kernel.h>
  20. #include <linux/delay.h>
  21. #include <linux/hdreg.h>
  22. #include <linux/pci.h>
  23. #include <linux/init.h>
  24. #include <linux/ide.h>
  25. #include <asm/io.h>
  26. #ifdef CONFIG_PPC_PMAC
  27. #include <asm/prom.h>
  28. #include <asm/pci-bridge.h>
  29. #endif
  30. #define DRV_NAME "pdc202xx_new"
  31. #undef DEBUG
  32. #ifdef DEBUG
  33. #define DBG(fmt, args...) printk("%s: " fmt, __func__, ## args)
  34. #else
  35. #define DBG(fmt, args...)
  36. #endif
  37. static const char *pdc_quirk_drives[] = {
  38. "QUANTUM FIREBALLlct08 08",
  39. "QUANTUM FIREBALLP KA6.4",
  40. "QUANTUM FIREBALLP KA9.1",
  41. "QUANTUM FIREBALLP LM20.4",
  42. "QUANTUM FIREBALLP KX13.6",
  43. "QUANTUM FIREBALLP KX20.5",
  44. "QUANTUM FIREBALLP KX27.3",
  45. "QUANTUM FIREBALLP LM20.5",
  46. NULL
  47. };
  48. static u8 max_dma_rate(struct pci_dev *pdev)
  49. {
  50. u8 mode;
  51. switch(pdev->device) {
  52. case PCI_DEVICE_ID_PROMISE_20277:
  53. case PCI_DEVICE_ID_PROMISE_20276:
  54. case PCI_DEVICE_ID_PROMISE_20275:
  55. case PCI_DEVICE_ID_PROMISE_20271:
  56. case PCI_DEVICE_ID_PROMISE_20269:
  57. mode = 4;
  58. break;
  59. case PCI_DEVICE_ID_PROMISE_20270:
  60. case PCI_DEVICE_ID_PROMISE_20268:
  61. mode = 3;
  62. break;
  63. default:
  64. return 0;
  65. }
  66. return mode;
  67. }
  68. /**
  69. * get_indexed_reg - Get indexed register
  70. * @hwif: for the port address
  71. * @index: index of the indexed register
  72. */
  73. static u8 get_indexed_reg(ide_hwif_t *hwif, u8 index)
  74. {
  75. u8 value;
  76. outb(index, hwif->dma_base + 1);
  77. value = inb(hwif->dma_base + 3);
  78. DBG("index[%02X] value[%02X]\n", index, value);
  79. return value;
  80. }
  81. /**
  82. * set_indexed_reg - Set indexed register
  83. * @hwif: for the port address
  84. * @index: index of the indexed register
  85. */
  86. static void set_indexed_reg(ide_hwif_t *hwif, u8 index, u8 value)
  87. {
  88. outb(index, hwif->dma_base + 1);
  89. outb(value, hwif->dma_base + 3);
  90. DBG("index[%02X] value[%02X]\n", index, value);
  91. }
  92. /*
  93. * ATA Timing Tables based on 133 MHz PLL output clock.
  94. *
  95. * If the PLL outputs 100 MHz clock, the ASIC hardware will set
  96. * the timing registers automatically when "set features" command is
  97. * issued to the device. However, if the PLL output clock is 133 MHz,
  98. * the following tables must be used.
  99. */
  100. static struct pio_timing {
  101. u8 reg0c, reg0d, reg13;
  102. } pio_timings [] = {
  103. { 0xfb, 0x2b, 0xac }, /* PIO mode 0, IORDY off, Prefetch off */
  104. { 0x46, 0x29, 0xa4 }, /* PIO mode 1, IORDY off, Prefetch off */
  105. { 0x23, 0x26, 0x64 }, /* PIO mode 2, IORDY off, Prefetch off */
  106. { 0x27, 0x0d, 0x35 }, /* PIO mode 3, IORDY on, Prefetch off */
  107. { 0x23, 0x09, 0x25 }, /* PIO mode 4, IORDY on, Prefetch off */
  108. };
  109. static struct mwdma_timing {
  110. u8 reg0e, reg0f;
  111. } mwdma_timings [] = {
  112. { 0xdf, 0x5f }, /* MWDMA mode 0 */
  113. { 0x6b, 0x27 }, /* MWDMA mode 1 */
  114. { 0x69, 0x25 }, /* MWDMA mode 2 */
  115. };
  116. static struct udma_timing {
  117. u8 reg10, reg11, reg12;
  118. } udma_timings [] = {
  119. { 0x4a, 0x0f, 0xd5 }, /* UDMA mode 0 */
  120. { 0x3a, 0x0a, 0xd0 }, /* UDMA mode 1 */
  121. { 0x2a, 0x07, 0xcd }, /* UDMA mode 2 */
  122. { 0x1a, 0x05, 0xcd }, /* UDMA mode 3 */
  123. { 0x1a, 0x03, 0xcd }, /* UDMA mode 4 */
  124. { 0x1a, 0x02, 0xcb }, /* UDMA mode 5 */
  125. { 0x1a, 0x01, 0xcb }, /* UDMA mode 6 */
  126. };
  127. static void pdcnew_set_dma_mode(ide_drive_t *drive, const u8 speed)
  128. {
  129. ide_hwif_t *hwif = HWIF(drive);
  130. struct pci_dev *dev = to_pci_dev(hwif->dev);
  131. u8 adj = (drive->dn & 1) ? 0x08 : 0x00;
  132. /*
  133. * IDE core issues SETFEATURES_XFER to the drive first (thanks to
  134. * IDE_HFLAG_POST_SET_MODE in ->host_flags). PDC202xx hardware will
  135. * automatically set the timing registers based on 100 MHz PLL output.
  136. *
  137. * As we set up the PLL to output 133 MHz for UltraDMA/133 capable
  138. * chips, we must override the default register settings...
  139. */
  140. if (max_dma_rate(dev) == 4) {
  141. u8 mode = speed & 0x07;
  142. if (speed >= XFER_UDMA_0) {
  143. set_indexed_reg(hwif, 0x10 + adj,
  144. udma_timings[mode].reg10);
  145. set_indexed_reg(hwif, 0x11 + adj,
  146. udma_timings[mode].reg11);
  147. set_indexed_reg(hwif, 0x12 + adj,
  148. udma_timings[mode].reg12);
  149. } else {
  150. set_indexed_reg(hwif, 0x0e + adj,
  151. mwdma_timings[mode].reg0e);
  152. set_indexed_reg(hwif, 0x0f + adj,
  153. mwdma_timings[mode].reg0f);
  154. }
  155. } else if (speed == XFER_UDMA_2) {
  156. /* Set tHOLD bit to 0 if using UDMA mode 2 */
  157. u8 tmp = get_indexed_reg(hwif, 0x10 + adj);
  158. set_indexed_reg(hwif, 0x10 + adj, tmp & 0x7f);
  159. }
  160. }
  161. static void pdcnew_set_pio_mode(ide_drive_t *drive, const u8 pio)
  162. {
  163. ide_hwif_t *hwif = drive->hwif;
  164. struct pci_dev *dev = to_pci_dev(hwif->dev);
  165. u8 adj = (drive->dn & 1) ? 0x08 : 0x00;
  166. if (max_dma_rate(dev) == 4) {
  167. set_indexed_reg(hwif, 0x0c + adj, pio_timings[pio].reg0c);
  168. set_indexed_reg(hwif, 0x0d + adj, pio_timings[pio].reg0d);
  169. set_indexed_reg(hwif, 0x13 + adj, pio_timings[pio].reg13);
  170. }
  171. }
  172. static u8 pdcnew_cable_detect(ide_hwif_t *hwif)
  173. {
  174. if (get_indexed_reg(hwif, 0x0b) & 0x04)
  175. return ATA_CBL_PATA40;
  176. else
  177. return ATA_CBL_PATA80;
  178. }
  179. static void pdcnew_quirkproc(ide_drive_t *drive)
  180. {
  181. const char **list, *model = drive->id->model;
  182. for (list = pdc_quirk_drives; *list != NULL; list++)
  183. if (strstr(model, *list) != NULL) {
  184. drive->quirk_list = 2;
  185. return;
  186. }
  187. drive->quirk_list = 0;
  188. }
  189. static void pdcnew_reset(ide_drive_t *drive)
  190. {
  191. /*
  192. * Deleted this because it is redundant from the caller.
  193. */
  194. printk(KERN_WARNING "pdc202xx_new: %s channel reset.\n",
  195. HWIF(drive)->channel ? "Secondary" : "Primary");
  196. }
  197. /**
  198. * read_counter - Read the byte count registers
  199. * @dma_base: for the port address
  200. */
  201. static long __devinit read_counter(u32 dma_base)
  202. {
  203. u32 pri_dma_base = dma_base, sec_dma_base = dma_base + 0x08;
  204. u8 cnt0, cnt1, cnt2, cnt3;
  205. long count = 0, last;
  206. int retry = 3;
  207. do {
  208. last = count;
  209. /* Read the current count */
  210. outb(0x20, pri_dma_base + 0x01);
  211. cnt0 = inb(pri_dma_base + 0x03);
  212. outb(0x21, pri_dma_base + 0x01);
  213. cnt1 = inb(pri_dma_base + 0x03);
  214. outb(0x20, sec_dma_base + 0x01);
  215. cnt2 = inb(sec_dma_base + 0x03);
  216. outb(0x21, sec_dma_base + 0x01);
  217. cnt3 = inb(sec_dma_base + 0x03);
  218. count = (cnt3 << 23) | (cnt2 << 15) | (cnt1 << 8) | cnt0;
  219. /*
  220. * The 30-bit decrementing counter is read in 4 pieces.
  221. * Incorrect value may be read when the most significant bytes
  222. * are changing...
  223. */
  224. } while (retry-- && (((last ^ count) & 0x3fff8000) || last < count));
  225. DBG("cnt0[%02X] cnt1[%02X] cnt2[%02X] cnt3[%02X]\n",
  226. cnt0, cnt1, cnt2, cnt3);
  227. return count;
  228. }
  229. /**
  230. * detect_pll_input_clock - Detect the PLL input clock in Hz.
  231. * @dma_base: for the port address
  232. * E.g. 16949000 on 33 MHz PCI bus, i.e. half of the PCI clock.
  233. */
  234. static long __devinit detect_pll_input_clock(unsigned long dma_base)
  235. {
  236. struct timeval start_time, end_time;
  237. long start_count, end_count;
  238. long pll_input, usec_elapsed;
  239. u8 scr1;
  240. start_count = read_counter(dma_base);
  241. do_gettimeofday(&start_time);
  242. /* Start the test mode */
  243. outb(0x01, dma_base + 0x01);
  244. scr1 = inb(dma_base + 0x03);
  245. DBG("scr1[%02X]\n", scr1);
  246. outb(scr1 | 0x40, dma_base + 0x03);
  247. /* Let the counter run for 10 ms. */
  248. mdelay(10);
  249. end_count = read_counter(dma_base);
  250. do_gettimeofday(&end_time);
  251. /* Stop the test mode */
  252. outb(0x01, dma_base + 0x01);
  253. scr1 = inb(dma_base + 0x03);
  254. DBG("scr1[%02X]\n", scr1);
  255. outb(scr1 & ~0x40, dma_base + 0x03);
  256. /*
  257. * Calculate the input clock in Hz
  258. * (the clock counter is 30 bit wide and counts down)
  259. */
  260. usec_elapsed = (end_time.tv_sec - start_time.tv_sec) * 1000000 +
  261. (end_time.tv_usec - start_time.tv_usec);
  262. pll_input = ((start_count - end_count) & 0x3fffffff) / 10 *
  263. (10000000 / usec_elapsed);
  264. DBG("start[%ld] end[%ld]\n", start_count, end_count);
  265. return pll_input;
  266. }
  267. #ifdef CONFIG_PPC_PMAC
  268. static void __devinit apple_kiwi_init(struct pci_dev *pdev)
  269. {
  270. struct device_node *np = pci_device_to_OF_node(pdev);
  271. u8 conf;
  272. if (np == NULL || !of_device_is_compatible(np, "kiwi-root"))
  273. return;
  274. if (pdev->revision >= 0x03) {
  275. /* Setup chip magic config stuff (from darwin) */
  276. pci_read_config_byte (pdev, 0x40, &conf);
  277. pci_write_config_byte(pdev, 0x40, (conf | 0x01));
  278. }
  279. }
  280. #endif /* CONFIG_PPC_PMAC */
  281. static unsigned int __devinit init_chipset_pdcnew(struct pci_dev *dev)
  282. {
  283. const char *name = DRV_NAME;
  284. unsigned long dma_base = pci_resource_start(dev, 4);
  285. unsigned long sec_dma_base = dma_base + 0x08;
  286. long pll_input, pll_output, ratio;
  287. int f, r;
  288. u8 pll_ctl0, pll_ctl1;
  289. if (dma_base == 0)
  290. return -EFAULT;
  291. #ifdef CONFIG_PPC_PMAC
  292. apple_kiwi_init(dev);
  293. #endif
  294. /* Calculate the required PLL output frequency */
  295. switch(max_dma_rate(dev)) {
  296. case 4: /* it's 133 MHz for Ultra133 chips */
  297. pll_output = 133333333;
  298. break;
  299. case 3: /* and 100 MHz for Ultra100 chips */
  300. default:
  301. pll_output = 100000000;
  302. break;
  303. }
  304. /*
  305. * Detect PLL input clock.
  306. * On some systems, where PCI bus is running at non-standard clock rate
  307. * (e.g. 25 or 40 MHz), we have to adjust the cycle time.
  308. * PDC20268 and newer chips employ PLL circuit to help correct timing
  309. * registers setting.
  310. */
  311. pll_input = detect_pll_input_clock(dma_base);
  312. printk(KERN_INFO "%s %s: PLL input clock is %ld kHz\n",
  313. name, pci_name(dev), pll_input / 1000);
  314. /* Sanity check */
  315. if (unlikely(pll_input < 5000000L || pll_input > 70000000L)) {
  316. printk(KERN_ERR "%s %s: Bad PLL input clock %ld Hz, giving up!"
  317. "\n", name, pci_name(dev), pll_input);
  318. goto out;
  319. }
  320. #ifdef DEBUG
  321. DBG("pll_output is %ld Hz\n", pll_output);
  322. /* Show the current clock value of PLL control register
  323. * (maybe already configured by the BIOS)
  324. */
  325. outb(0x02, sec_dma_base + 0x01);
  326. pll_ctl0 = inb(sec_dma_base + 0x03);
  327. outb(0x03, sec_dma_base + 0x01);
  328. pll_ctl1 = inb(sec_dma_base + 0x03);
  329. DBG("pll_ctl[%02X][%02X]\n", pll_ctl0, pll_ctl1);
  330. #endif
  331. /*
  332. * Calculate the ratio of F, R and NO
  333. * POUT = (F + 2) / (( R + 2) * NO)
  334. */
  335. ratio = pll_output / (pll_input / 1000);
  336. if (ratio < 8600L) { /* 8.6x */
  337. /* Using NO = 0x01, R = 0x0d */
  338. r = 0x0d;
  339. } else if (ratio < 12900L) { /* 12.9x */
  340. /* Using NO = 0x01, R = 0x08 */
  341. r = 0x08;
  342. } else if (ratio < 16100L) { /* 16.1x */
  343. /* Using NO = 0x01, R = 0x06 */
  344. r = 0x06;
  345. } else if (ratio < 64000L) { /* 64x */
  346. r = 0x00;
  347. } else {
  348. /* Invalid ratio */
  349. printk(KERN_ERR "%s %s: Bad ratio %ld, giving up!\n",
  350. name, pci_name(dev), ratio);
  351. goto out;
  352. }
  353. f = (ratio * (r + 2)) / 1000 - 2;
  354. DBG("F[%d] R[%d] ratio*1000[%ld]\n", f, r, ratio);
  355. if (unlikely(f < 0 || f > 127)) {
  356. /* Invalid F */
  357. printk(KERN_ERR "%s %s: F[%d] invalid!\n",
  358. name, pci_name(dev), f);
  359. goto out;
  360. }
  361. pll_ctl0 = (u8) f;
  362. pll_ctl1 = (u8) r;
  363. DBG("Writing pll_ctl[%02X][%02X]\n", pll_ctl0, pll_ctl1);
  364. outb(0x02, sec_dma_base + 0x01);
  365. outb(pll_ctl0, sec_dma_base + 0x03);
  366. outb(0x03, sec_dma_base + 0x01);
  367. outb(pll_ctl1, sec_dma_base + 0x03);
  368. /* Wait the PLL circuit to be stable */
  369. mdelay(30);
  370. #ifdef DEBUG
  371. /*
  372. * Show the current clock value of PLL control register
  373. */
  374. outb(0x02, sec_dma_base + 0x01);
  375. pll_ctl0 = inb(sec_dma_base + 0x03);
  376. outb(0x03, sec_dma_base + 0x01);
  377. pll_ctl1 = inb(sec_dma_base + 0x03);
  378. DBG("pll_ctl[%02X][%02X]\n", pll_ctl0, pll_ctl1);
  379. #endif
  380. out:
  381. return dev->irq;
  382. }
  383. static struct pci_dev * __devinit pdc20270_get_dev2(struct pci_dev *dev)
  384. {
  385. struct pci_dev *dev2;
  386. dev2 = pci_get_slot(dev->bus, PCI_DEVFN(PCI_SLOT(dev->devfn) + 1,
  387. PCI_FUNC(dev->devfn)));
  388. if (dev2 &&
  389. dev2->vendor == dev->vendor &&
  390. dev2->device == dev->device) {
  391. if (dev2->irq != dev->irq) {
  392. dev2->irq = dev->irq;
  393. printk(KERN_INFO DRV_NAME " %s: PCI config space "
  394. "interrupt fixed\n", pci_name(dev));
  395. }
  396. return dev2;
  397. }
  398. return NULL;
  399. }
  400. static const struct ide_port_ops pdcnew_port_ops = {
  401. .set_pio_mode = pdcnew_set_pio_mode,
  402. .set_dma_mode = pdcnew_set_dma_mode,
  403. .quirkproc = pdcnew_quirkproc,
  404. .resetproc = pdcnew_reset,
  405. .cable_detect = pdcnew_cable_detect,
  406. };
  407. #define DECLARE_PDCNEW_DEV(udma) \
  408. { \
  409. .name = DRV_NAME, \
  410. .init_chipset = init_chipset_pdcnew, \
  411. .port_ops = &pdcnew_port_ops, \
  412. .host_flags = IDE_HFLAG_POST_SET_MODE | \
  413. IDE_HFLAG_ERROR_STOPS_FIFO | \
  414. IDE_HFLAG_OFF_BOARD, \
  415. .pio_mask = ATA_PIO4, \
  416. .mwdma_mask = ATA_MWDMA2, \
  417. .udma_mask = udma, \
  418. }
  419. static const struct ide_port_info pdcnew_chipsets[] __devinitdata = {
  420. /* 0: PDC202{68,70} */ DECLARE_PDCNEW_DEV(ATA_UDMA5),
  421. /* 1: PDC202{69,71,75,76,77} */ DECLARE_PDCNEW_DEV(ATA_UDMA6),
  422. };
  423. /**
  424. * pdc202new_init_one - called when a pdc202xx is found
  425. * @dev: the pdc202new device
  426. * @id: the matching pci id
  427. *
  428. * Called when the PCI registration layer (or the IDE initialization)
  429. * finds a device matching our IDE device tables.
  430. */
  431. static int __devinit pdc202new_init_one(struct pci_dev *dev, const struct pci_device_id *id)
  432. {
  433. const struct ide_port_info *d = &pdcnew_chipsets[id->driver_data];
  434. struct pci_dev *bridge = dev->bus->self;
  435. if (dev->device == PCI_DEVICE_ID_PROMISE_20270 && bridge &&
  436. bridge->vendor == PCI_VENDOR_ID_DEC &&
  437. bridge->device == PCI_DEVICE_ID_DEC_21150) {
  438. struct pci_dev *dev2;
  439. if (PCI_SLOT(dev->devfn) & 2)
  440. return -ENODEV;
  441. dev2 = pdc20270_get_dev2(dev);
  442. if (dev2) {
  443. int ret = ide_pci_init_two(dev, dev2, d, NULL);
  444. if (ret < 0)
  445. pci_dev_put(dev2);
  446. return ret;
  447. }
  448. }
  449. if (dev->device == PCI_DEVICE_ID_PROMISE_20276 && bridge &&
  450. bridge->vendor == PCI_VENDOR_ID_INTEL &&
  451. (bridge->device == PCI_DEVICE_ID_INTEL_I960 ||
  452. bridge->device == PCI_DEVICE_ID_INTEL_I960RM)) {
  453. printk(KERN_INFO DRV_NAME " %s: attached to I2O RAID controller,"
  454. " skipping\n", pci_name(dev));
  455. return -ENODEV;
  456. }
  457. return ide_pci_init_one(dev, d, NULL);
  458. }
  459. static void __devexit pdc202new_remove(struct pci_dev *dev)
  460. {
  461. struct ide_host *host = pci_get_drvdata(dev);
  462. struct pci_dev *dev2 = host->dev[1] ? to_pci_dev(host->dev[1]) : NULL;
  463. ide_pci_remove(dev);
  464. pci_dev_put(dev2);
  465. }
  466. static const struct pci_device_id pdc202new_pci_tbl[] = {
  467. { PCI_VDEVICE(PROMISE, PCI_DEVICE_ID_PROMISE_20268), 0 },
  468. { PCI_VDEVICE(PROMISE, PCI_DEVICE_ID_PROMISE_20269), 1 },
  469. { PCI_VDEVICE(PROMISE, PCI_DEVICE_ID_PROMISE_20270), 0 },
  470. { PCI_VDEVICE(PROMISE, PCI_DEVICE_ID_PROMISE_20271), 1 },
  471. { PCI_VDEVICE(PROMISE, PCI_DEVICE_ID_PROMISE_20275), 1 },
  472. { PCI_VDEVICE(PROMISE, PCI_DEVICE_ID_PROMISE_20276), 1 },
  473. { PCI_VDEVICE(PROMISE, PCI_DEVICE_ID_PROMISE_20277), 1 },
  474. { 0, },
  475. };
  476. MODULE_DEVICE_TABLE(pci, pdc202new_pci_tbl);
  477. static struct pci_driver driver = {
  478. .name = "Promise_IDE",
  479. .id_table = pdc202new_pci_tbl,
  480. .probe = pdc202new_init_one,
  481. .remove = __devexit_p(pdc202new_remove),
  482. };
  483. static int __init pdc202new_ide_init(void)
  484. {
  485. return ide_pci_register_driver(&driver);
  486. }
  487. static void __exit pdc202new_ide_exit(void)
  488. {
  489. pci_unregister_driver(&driver);
  490. }
  491. module_init(pdc202new_ide_init);
  492. module_exit(pdc202new_ide_exit);
  493. MODULE_AUTHOR("Andre Hedrick, Frank Tiernan");
  494. MODULE_DESCRIPTION("PCI driver module for Promise PDC20268 and higher");
  495. MODULE_LICENSE("GPL");