pdc202xx_new.c 15 KB

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