mac_esp.c 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656
  1. /* mac_esp.c: ESP front-end for Macintosh Quadra systems.
  2. *
  3. * Adapted from jazz_esp.c and the old mac_esp.c.
  4. *
  5. * The pseudo DMA algorithm is based on the one used in NetBSD.
  6. * See sys/arch/mac68k/obio/esp.c for some background information.
  7. *
  8. * Copyright (C) 2007-2008 Finn Thain
  9. */
  10. #include <linux/kernel.h>
  11. #include <linux/types.h>
  12. #include <linux/module.h>
  13. #include <linux/init.h>
  14. #include <linux/interrupt.h>
  15. #include <linux/platform_device.h>
  16. #include <linux/dma-mapping.h>
  17. #include <linux/scatterlist.h>
  18. #include <linux/delay.h>
  19. #include <linux/io.h>
  20. #include <linux/nubus.h>
  21. #include <linux/slab.h>
  22. #include <asm/irq.h>
  23. #include <asm/dma.h>
  24. #include <asm/macints.h>
  25. #include <asm/macintosh.h>
  26. #include <asm/mac_via.h>
  27. #include <scsi/scsi_host.h>
  28. #include "esp_scsi.h"
  29. #define DRV_MODULE_NAME "mac_esp"
  30. #define PFX DRV_MODULE_NAME ": "
  31. #define DRV_VERSION "1.000"
  32. #define DRV_MODULE_RELDATE "Sept 15, 2007"
  33. #define MAC_ESP_IO_BASE 0x50F00000
  34. #define MAC_ESP_REGS_QUADRA (MAC_ESP_IO_BASE + 0x10000)
  35. #define MAC_ESP_REGS_QUADRA2 (MAC_ESP_IO_BASE + 0xF000)
  36. #define MAC_ESP_REGS_QUADRA3 (MAC_ESP_IO_BASE + 0x18000)
  37. #define MAC_ESP_REGS_SPACING 0x402
  38. #define MAC_ESP_PDMA_REG 0xF9800024
  39. #define MAC_ESP_PDMA_REG_SPACING 0x4
  40. #define MAC_ESP_PDMA_IO_OFFSET 0x100
  41. #define esp_read8(REG) mac_esp_read8(esp, REG)
  42. #define esp_write8(VAL, REG) mac_esp_write8(esp, VAL, REG)
  43. struct mac_esp_priv {
  44. struct esp *esp;
  45. void __iomem *pdma_regs;
  46. void __iomem *pdma_io;
  47. int error;
  48. };
  49. static struct esp *esp_chips[2];
  50. static DEFINE_SPINLOCK(esp_chips_lock);
  51. #define MAC_ESP_GET_PRIV(esp) ((struct mac_esp_priv *) \
  52. platform_get_drvdata((struct platform_device *) \
  53. (esp->dev)))
  54. static inline void mac_esp_write8(struct esp *esp, u8 val, unsigned long reg)
  55. {
  56. nubus_writeb(val, esp->regs + reg * 16);
  57. }
  58. static inline u8 mac_esp_read8(struct esp *esp, unsigned long reg)
  59. {
  60. return nubus_readb(esp->regs + reg * 16);
  61. }
  62. /* For pseudo DMA and PIO we need the virtual address
  63. * so this address mapping is the identity mapping.
  64. */
  65. static dma_addr_t mac_esp_map_single(struct esp *esp, void *buf,
  66. size_t sz, int dir)
  67. {
  68. return (dma_addr_t)buf;
  69. }
  70. static int mac_esp_map_sg(struct esp *esp, struct scatterlist *sg,
  71. int num_sg, int dir)
  72. {
  73. int i;
  74. for (i = 0; i < num_sg; i++)
  75. sg[i].dma_address = (u32)sg_virt(&sg[i]);
  76. return num_sg;
  77. }
  78. static void mac_esp_unmap_single(struct esp *esp, dma_addr_t addr,
  79. size_t sz, int dir)
  80. {
  81. /* Nothing to do. */
  82. }
  83. static void mac_esp_unmap_sg(struct esp *esp, struct scatterlist *sg,
  84. int num_sg, int dir)
  85. {
  86. /* Nothing to do. */
  87. }
  88. static void mac_esp_reset_dma(struct esp *esp)
  89. {
  90. /* Nothing to do. */
  91. }
  92. static void mac_esp_dma_drain(struct esp *esp)
  93. {
  94. /* Nothing to do. */
  95. }
  96. static void mac_esp_dma_invalidate(struct esp *esp)
  97. {
  98. /* Nothing to do. */
  99. }
  100. static int mac_esp_dma_error(struct esp *esp)
  101. {
  102. return MAC_ESP_GET_PRIV(esp)->error;
  103. }
  104. static inline int mac_esp_wait_for_empty_fifo(struct esp *esp)
  105. {
  106. struct mac_esp_priv *mep = MAC_ESP_GET_PRIV(esp);
  107. int i = 500000;
  108. do {
  109. if (!(esp_read8(ESP_FFLAGS) & ESP_FF_FBYTES))
  110. return 0;
  111. if (esp_read8(ESP_STATUS) & ESP_STAT_INTR)
  112. return 1;
  113. udelay(2);
  114. } while (--i);
  115. printk(KERN_ERR PFX "FIFO is not empty (sreg %02x)\n",
  116. esp_read8(ESP_STATUS));
  117. mep->error = 1;
  118. return 1;
  119. }
  120. static inline int mac_esp_wait_for_dreq(struct esp *esp)
  121. {
  122. struct mac_esp_priv *mep = MAC_ESP_GET_PRIV(esp);
  123. int i = 500000;
  124. do {
  125. if (mep->pdma_regs == NULL) {
  126. if (via2_scsi_drq_pending())
  127. return 0;
  128. } else {
  129. if (nubus_readl(mep->pdma_regs) & 0x200)
  130. return 0;
  131. }
  132. if (esp_read8(ESP_STATUS) & ESP_STAT_INTR)
  133. return 1;
  134. udelay(2);
  135. } while (--i);
  136. printk(KERN_ERR PFX "PDMA timeout (sreg %02x)\n",
  137. esp_read8(ESP_STATUS));
  138. mep->error = 1;
  139. return 1;
  140. }
  141. #define MAC_ESP_PDMA_LOOP(operands) \
  142. asm volatile ( \
  143. " tstw %1 \n" \
  144. " jbeq 20f \n" \
  145. "1: movew " operands " \n" \
  146. "2: movew " operands " \n" \
  147. "3: movew " operands " \n" \
  148. "4: movew " operands " \n" \
  149. "5: movew " operands " \n" \
  150. "6: movew " operands " \n" \
  151. "7: movew " operands " \n" \
  152. "8: movew " operands " \n" \
  153. "9: movew " operands " \n" \
  154. "10: movew " operands " \n" \
  155. "11: movew " operands " \n" \
  156. "12: movew " operands " \n" \
  157. "13: movew " operands " \n" \
  158. "14: movew " operands " \n" \
  159. "15: movew " operands " \n" \
  160. "16: movew " operands " \n" \
  161. " subqw #1,%1 \n" \
  162. " jbne 1b \n" \
  163. "20: tstw %2 \n" \
  164. " jbeq 30f \n" \
  165. "21: movew " operands " \n" \
  166. " subqw #1,%2 \n" \
  167. " jbne 21b \n" \
  168. "30: tstw %3 \n" \
  169. " jbeq 40f \n" \
  170. "31: moveb " operands " \n" \
  171. "32: nop \n" \
  172. "40: \n" \
  173. " \n" \
  174. " .section __ex_table,\"a\" \n" \
  175. " .align 4 \n" \
  176. " .long 1b,40b \n" \
  177. " .long 2b,40b \n" \
  178. " .long 3b,40b \n" \
  179. " .long 4b,40b \n" \
  180. " .long 5b,40b \n" \
  181. " .long 6b,40b \n" \
  182. " .long 7b,40b \n" \
  183. " .long 8b,40b \n" \
  184. " .long 9b,40b \n" \
  185. " .long 10b,40b \n" \
  186. " .long 11b,40b \n" \
  187. " .long 12b,40b \n" \
  188. " .long 13b,40b \n" \
  189. " .long 14b,40b \n" \
  190. " .long 15b,40b \n" \
  191. " .long 16b,40b \n" \
  192. " .long 21b,40b \n" \
  193. " .long 31b,40b \n" \
  194. " .long 32b,40b \n" \
  195. " .previous \n" \
  196. : "+a" (addr), "+r" (count32), "+r" (count2) \
  197. : "g" (count1), "a" (mep->pdma_io))
  198. static void mac_esp_send_pdma_cmd(struct esp *esp, u32 addr, u32 esp_count,
  199. u32 dma_count, int write, u8 cmd)
  200. {
  201. struct mac_esp_priv *mep = MAC_ESP_GET_PRIV(esp);
  202. mep->error = 0;
  203. if (!write)
  204. scsi_esp_cmd(esp, ESP_CMD_FLUSH);
  205. esp_write8((esp_count >> 0) & 0xFF, ESP_TCLOW);
  206. esp_write8((esp_count >> 8) & 0xFF, ESP_TCMED);
  207. scsi_esp_cmd(esp, cmd);
  208. do {
  209. unsigned int count32 = esp_count >> 5;
  210. unsigned int count2 = (esp_count & 0x1F) >> 1;
  211. unsigned int count1 = esp_count & 1;
  212. unsigned int start_addr = addr;
  213. if (mac_esp_wait_for_dreq(esp))
  214. break;
  215. if (write) {
  216. MAC_ESP_PDMA_LOOP("%4@,%0@+");
  217. esp_count -= addr - start_addr;
  218. } else {
  219. unsigned int n;
  220. MAC_ESP_PDMA_LOOP("%0@+,%4@");
  221. if (mac_esp_wait_for_empty_fifo(esp))
  222. break;
  223. n = (esp_read8(ESP_TCMED) << 8) + esp_read8(ESP_TCLOW);
  224. addr = start_addr + esp_count - n;
  225. esp_count = n;
  226. }
  227. } while (esp_count);
  228. }
  229. /*
  230. * Programmed IO routines follow.
  231. */
  232. static inline unsigned int mac_esp_wait_for_fifo(struct esp *esp)
  233. {
  234. int i = 500000;
  235. do {
  236. unsigned int fbytes = esp_read8(ESP_FFLAGS) & ESP_FF_FBYTES;
  237. if (fbytes)
  238. return fbytes;
  239. udelay(2);
  240. } while (--i);
  241. printk(KERN_ERR PFX "FIFO is empty (sreg %02x)\n",
  242. esp_read8(ESP_STATUS));
  243. return 0;
  244. }
  245. static inline int mac_esp_wait_for_intr(struct esp *esp)
  246. {
  247. struct mac_esp_priv *mep = MAC_ESP_GET_PRIV(esp);
  248. int i = 500000;
  249. do {
  250. esp->sreg = esp_read8(ESP_STATUS);
  251. if (esp->sreg & ESP_STAT_INTR)
  252. return 0;
  253. udelay(2);
  254. } while (--i);
  255. printk(KERN_ERR PFX "IRQ timeout (sreg %02x)\n", esp->sreg);
  256. mep->error = 1;
  257. return 1;
  258. }
  259. #define MAC_ESP_PIO_LOOP(operands, reg1) \
  260. asm volatile ( \
  261. "1: moveb " operands " \n" \
  262. " subqw #1,%1 \n" \
  263. " jbne 1b \n" \
  264. : "+a" (addr), "+r" (reg1) \
  265. : "a" (fifo))
  266. #define MAC_ESP_PIO_FILL(operands, reg1) \
  267. asm volatile ( \
  268. " moveb " operands " \n" \
  269. " moveb " operands " \n" \
  270. " moveb " operands " \n" \
  271. " moveb " operands " \n" \
  272. " moveb " operands " \n" \
  273. " moveb " operands " \n" \
  274. " moveb " operands " \n" \
  275. " moveb " operands " \n" \
  276. " moveb " operands " \n" \
  277. " moveb " operands " \n" \
  278. " moveb " operands " \n" \
  279. " moveb " operands " \n" \
  280. " moveb " operands " \n" \
  281. " moveb " operands " \n" \
  282. " moveb " operands " \n" \
  283. " moveb " operands " \n" \
  284. " subqw #8,%1 \n" \
  285. " subqw #8,%1 \n" \
  286. : "+a" (addr), "+r" (reg1) \
  287. : "a" (fifo))
  288. #define MAC_ESP_FIFO_SIZE 16
  289. static void mac_esp_send_pio_cmd(struct esp *esp, u32 addr, u32 esp_count,
  290. u32 dma_count, int write, u8 cmd)
  291. {
  292. struct mac_esp_priv *mep = MAC_ESP_GET_PRIV(esp);
  293. u8 __iomem *fifo = esp->regs + ESP_FDATA * 16;
  294. u8 phase = esp->sreg & ESP_STAT_PMASK;
  295. cmd &= ~ESP_CMD_DMA;
  296. mep->error = 0;
  297. if (write) {
  298. u8 *dst = (u8 *)addr;
  299. u8 mask = ~(phase == ESP_MIP ? ESP_INTR_FDONE : ESP_INTR_BSERV);
  300. scsi_esp_cmd(esp, cmd);
  301. while (1) {
  302. if (!mac_esp_wait_for_fifo(esp))
  303. break;
  304. *dst++ = esp_read8(ESP_FDATA);
  305. --esp_count;
  306. if (!esp_count)
  307. break;
  308. if (mac_esp_wait_for_intr(esp))
  309. break;
  310. if ((esp->sreg & ESP_STAT_PMASK) != phase)
  311. break;
  312. esp->ireg = esp_read8(ESP_INTRPT);
  313. if (esp->ireg & mask) {
  314. mep->error = 1;
  315. break;
  316. }
  317. if (phase == ESP_MIP)
  318. scsi_esp_cmd(esp, ESP_CMD_MOK);
  319. scsi_esp_cmd(esp, ESP_CMD_TI);
  320. }
  321. } else {
  322. scsi_esp_cmd(esp, ESP_CMD_FLUSH);
  323. if (esp_count >= MAC_ESP_FIFO_SIZE)
  324. MAC_ESP_PIO_FILL("%0@+,%2@", esp_count);
  325. else
  326. MAC_ESP_PIO_LOOP("%0@+,%2@", esp_count);
  327. scsi_esp_cmd(esp, cmd);
  328. while (esp_count) {
  329. unsigned int n;
  330. if (mac_esp_wait_for_intr(esp))
  331. break;
  332. if ((esp->sreg & ESP_STAT_PMASK) != phase)
  333. break;
  334. esp->ireg = esp_read8(ESP_INTRPT);
  335. if (esp->ireg & ~ESP_INTR_BSERV) {
  336. mep->error = 1;
  337. break;
  338. }
  339. n = MAC_ESP_FIFO_SIZE -
  340. (esp_read8(ESP_FFLAGS) & ESP_FF_FBYTES);
  341. if (n > esp_count)
  342. n = esp_count;
  343. if (n == MAC_ESP_FIFO_SIZE) {
  344. MAC_ESP_PIO_FILL("%0@+,%2@", esp_count);
  345. } else {
  346. esp_count -= n;
  347. MAC_ESP_PIO_LOOP("%0@+,%2@", n);
  348. }
  349. scsi_esp_cmd(esp, ESP_CMD_TI);
  350. }
  351. }
  352. esp->send_cmd_residual = esp_count;
  353. }
  354. static int mac_esp_irq_pending(struct esp *esp)
  355. {
  356. if (esp_read8(ESP_STATUS) & ESP_STAT_INTR)
  357. return 1;
  358. return 0;
  359. }
  360. static u32 mac_esp_dma_length_limit(struct esp *esp, u32 dma_addr, u32 dma_len)
  361. {
  362. return dma_len > 0xFFFF ? 0xFFFF : dma_len;
  363. }
  364. static irqreturn_t mac_scsi_esp_intr(int irq, void *dev_id)
  365. {
  366. int got_intr;
  367. /*
  368. * This is an edge triggered IRQ, so we have to be careful to
  369. * avoid missing a transition when it is shared by two ESP devices.
  370. */
  371. do {
  372. got_intr = 0;
  373. if (esp_chips[0] &&
  374. (mac_esp_read8(esp_chips[0], ESP_STATUS) & ESP_STAT_INTR)) {
  375. (void)scsi_esp_intr(irq, esp_chips[0]);
  376. got_intr = 1;
  377. }
  378. if (esp_chips[1] &&
  379. (mac_esp_read8(esp_chips[1], ESP_STATUS) & ESP_STAT_INTR)) {
  380. (void)scsi_esp_intr(irq, esp_chips[1]);
  381. got_intr = 1;
  382. }
  383. } while (got_intr);
  384. return IRQ_HANDLED;
  385. }
  386. static struct esp_driver_ops mac_esp_ops = {
  387. .esp_write8 = mac_esp_write8,
  388. .esp_read8 = mac_esp_read8,
  389. .map_single = mac_esp_map_single,
  390. .map_sg = mac_esp_map_sg,
  391. .unmap_single = mac_esp_unmap_single,
  392. .unmap_sg = mac_esp_unmap_sg,
  393. .irq_pending = mac_esp_irq_pending,
  394. .dma_length_limit = mac_esp_dma_length_limit,
  395. .reset_dma = mac_esp_reset_dma,
  396. .dma_drain = mac_esp_dma_drain,
  397. .dma_invalidate = mac_esp_dma_invalidate,
  398. .send_dma_cmd = mac_esp_send_pdma_cmd,
  399. .dma_error = mac_esp_dma_error,
  400. };
  401. static int esp_mac_probe(struct platform_device *dev)
  402. {
  403. struct scsi_host_template *tpnt = &scsi_esp_template;
  404. struct Scsi_Host *host;
  405. struct esp *esp;
  406. int err;
  407. struct mac_esp_priv *mep;
  408. if (!MACH_IS_MAC)
  409. return -ENODEV;
  410. if (dev->id > 1)
  411. return -ENODEV;
  412. host = scsi_host_alloc(tpnt, sizeof(struct esp));
  413. err = -ENOMEM;
  414. if (!host)
  415. goto fail;
  416. host->max_id = 8;
  417. host->use_clustering = DISABLE_CLUSTERING;
  418. esp = shost_priv(host);
  419. esp->host = host;
  420. esp->dev = dev;
  421. esp->command_block = kzalloc(16, GFP_KERNEL);
  422. if (!esp->command_block)
  423. goto fail_unlink;
  424. esp->command_block_dma = (dma_addr_t)esp->command_block;
  425. esp->scsi_id = 7;
  426. host->this_id = esp->scsi_id;
  427. esp->scsi_id_mask = 1 << esp->scsi_id;
  428. mep = kzalloc(sizeof(struct mac_esp_priv), GFP_KERNEL);
  429. if (!mep)
  430. goto fail_free_command_block;
  431. mep->esp = esp;
  432. platform_set_drvdata(dev, mep);
  433. switch (macintosh_config->scsi_type) {
  434. case MAC_SCSI_QUADRA:
  435. esp->cfreq = 16500000;
  436. esp->regs = (void __iomem *)MAC_ESP_REGS_QUADRA;
  437. mep->pdma_io = esp->regs + MAC_ESP_PDMA_IO_OFFSET;
  438. mep->pdma_regs = NULL;
  439. break;
  440. case MAC_SCSI_QUADRA2:
  441. esp->cfreq = 25000000;
  442. esp->regs = (void __iomem *)(MAC_ESP_REGS_QUADRA2 +
  443. dev->id * MAC_ESP_REGS_SPACING);
  444. mep->pdma_io = esp->regs + MAC_ESP_PDMA_IO_OFFSET;
  445. mep->pdma_regs = (void __iomem *)(MAC_ESP_PDMA_REG +
  446. dev->id * MAC_ESP_PDMA_REG_SPACING);
  447. nubus_writel(0x1d1, mep->pdma_regs);
  448. break;
  449. case MAC_SCSI_QUADRA3:
  450. /* These quadras have a real DMA controller (the PSC) but we
  451. * don't know how to drive it so we must use PIO instead.
  452. */
  453. esp->cfreq = 25000000;
  454. esp->regs = (void __iomem *)MAC_ESP_REGS_QUADRA3;
  455. mep->pdma_io = NULL;
  456. mep->pdma_regs = NULL;
  457. break;
  458. }
  459. esp->ops = &mac_esp_ops;
  460. if (mep->pdma_io == NULL) {
  461. printk(KERN_INFO PFX "using PIO for controller %d\n", dev->id);
  462. esp_write8(0, ESP_TCLOW);
  463. esp_write8(0, ESP_TCMED);
  464. esp->flags = ESP_FLAG_DISABLE_SYNC;
  465. mac_esp_ops.send_dma_cmd = mac_esp_send_pio_cmd;
  466. } else {
  467. printk(KERN_INFO PFX "using PDMA for controller %d\n", dev->id);
  468. }
  469. host->irq = IRQ_MAC_SCSI;
  470. /* The request_irq() call is intended to succeed for the first device
  471. * and fail for the second device.
  472. */
  473. err = request_irq(host->irq, mac_scsi_esp_intr, 0, "ESP", NULL);
  474. spin_lock(&esp_chips_lock);
  475. if (err < 0 && esp_chips[!dev->id] == NULL) {
  476. spin_unlock(&esp_chips_lock);
  477. goto fail_free_priv;
  478. }
  479. esp_chips[dev->id] = esp;
  480. spin_unlock(&esp_chips_lock);
  481. err = scsi_esp_register(esp, &dev->dev);
  482. if (err)
  483. goto fail_free_irq;
  484. return 0;
  485. fail_free_irq:
  486. spin_lock(&esp_chips_lock);
  487. esp_chips[dev->id] = NULL;
  488. if (esp_chips[!dev->id] == NULL) {
  489. spin_unlock(&esp_chips_lock);
  490. free_irq(host->irq, NULL);
  491. } else
  492. spin_unlock(&esp_chips_lock);
  493. fail_free_priv:
  494. kfree(mep);
  495. fail_free_command_block:
  496. kfree(esp->command_block);
  497. fail_unlink:
  498. scsi_host_put(host);
  499. fail:
  500. return err;
  501. }
  502. static int esp_mac_remove(struct platform_device *dev)
  503. {
  504. struct mac_esp_priv *mep = platform_get_drvdata(dev);
  505. struct esp *esp = mep->esp;
  506. unsigned int irq = esp->host->irq;
  507. scsi_esp_unregister(esp);
  508. spin_lock(&esp_chips_lock);
  509. esp_chips[dev->id] = NULL;
  510. if (esp_chips[!dev->id] == NULL) {
  511. spin_unlock(&esp_chips_lock);
  512. free_irq(irq, NULL);
  513. } else
  514. spin_unlock(&esp_chips_lock);
  515. kfree(mep);
  516. kfree(esp->command_block);
  517. scsi_host_put(esp->host);
  518. return 0;
  519. }
  520. static struct platform_driver esp_mac_driver = {
  521. .probe = esp_mac_probe,
  522. .remove = esp_mac_remove,
  523. .driver = {
  524. .name = DRV_MODULE_NAME,
  525. },
  526. };
  527. static int __init mac_esp_init(void)
  528. {
  529. return platform_driver_register(&esp_mac_driver);
  530. }
  531. static void __exit mac_esp_exit(void)
  532. {
  533. platform_driver_unregister(&esp_mac_driver);
  534. }
  535. MODULE_DESCRIPTION("Mac ESP SCSI driver");
  536. MODULE_AUTHOR("Finn Thain");
  537. MODULE_LICENSE("GPL v2");
  538. MODULE_VERSION(DRV_VERSION);
  539. MODULE_ALIAS("platform:" DRV_MODULE_NAME);
  540. module_init(mac_esp_init);
  541. module_exit(mac_esp_exit);