blob: e21e490fedb04dc40b215a8715e93a9ffdb1cc7c [file] [log] [blame]
Alex Dubov4020f2d2006-10-04 02:15:37 -07001/*
2 * tifm_7xx1.c - TI FlashMedia driver
3 *
4 * Copyright (C) 2006 Alex Dubov <oakad@yahoo.com>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 */
11
12#include <linux/tifm.h>
13#include <linux/dma-mapping.h>
Alex Dubov7146f0d2006-12-18 14:20:06 +110014#include <linux/freezer.h>
Alex Dubov4020f2d2006-10-04 02:15:37 -070015
16#define DRIVER_NAME "tifm_7xx1"
Alex Dubov50743f42006-12-11 01:55:30 +110017#define DRIVER_VERSION "0.7"
Alex Dubov4020f2d2006-10-04 02:15:37 -070018
19static void tifm_7xx1_eject(struct tifm_adapter *fm, struct tifm_dev *sock)
20{
Alex Dubov4020f2d2006-10-04 02:15:37 -070021 unsigned long flags;
22
23 spin_lock_irqsave(&fm->lock, flags);
Alex Dubov7146f0d2006-12-18 14:20:06 +110024 fm->socket_change_set |= 1 << sock->socket_id;
25 wake_up_all(&fm->change_set_notify);
Alex Dubov4020f2d2006-10-04 02:15:37 -070026 spin_unlock_irqrestore(&fm->lock, flags);
27}
28
David Howells7d12e782006-10-05 14:55:46 +010029static irqreturn_t tifm_7xx1_isr(int irq, void *dev_id)
Alex Dubov4020f2d2006-10-04 02:15:37 -070030{
31 struct tifm_adapter *fm = dev_id;
Alex Dubov217334d2006-12-11 01:55:31 +110032 struct tifm_dev *sock;
Alex Dubov4020f2d2006-10-04 02:15:37 -070033 unsigned int irq_status;
34 unsigned int sock_irq_status, cnt;
35
36 spin_lock(&fm->lock);
37 irq_status = readl(fm->addr + FM_INTERRUPT_STATUS);
38 if (irq_status == 0 || irq_status == (~0)) {
39 spin_unlock(&fm->lock);
40 return IRQ_NONE;
41 }
42
43 if (irq_status & TIFM_IRQ_ENABLE) {
44 writel(TIFM_IRQ_ENABLE, fm->addr + FM_CLEAR_INTERRUPT_ENABLE);
45
Alex Dubov8b40ada2006-12-11 01:55:36 +110046 for (cnt = 0; cnt < fm->num_sockets; cnt++) {
Alex Dubov217334d2006-12-11 01:55:31 +110047 sock = fm->sockets[cnt];
Alex Dubov6412d922006-12-11 01:55:33 +110048 sock_irq_status = (irq_status >> cnt)
49 & (TIFM_IRQ_FIFOMASK(1)
50 | TIFM_IRQ_CARDMASK(1));
Alex Dubov4020f2d2006-10-04 02:15:37 -070051
Alex Dubov6412d922006-12-11 01:55:33 +110052 if (sock && sock_irq_status)
53 sock->signal_irq(sock, sock_irq_status);
Alex Dubov4020f2d2006-10-04 02:15:37 -070054 }
Alex Dubov6412d922006-12-11 01:55:33 +110055
Alex Dubov8b40ada2006-12-11 01:55:36 +110056 fm->socket_change_set |= irq_status
57 & ((1 << fm->num_sockets) - 1);
Alex Dubov4020f2d2006-10-04 02:15:37 -070058 }
59 writel(irq_status, fm->addr + FM_INTERRUPT_STATUS);
60
Alex Dubov7146f0d2006-12-18 14:20:06 +110061 if (!fm->socket_change_set)
62 writel(TIFM_IRQ_ENABLE, fm->addr + FM_SET_INTERRUPT_ENABLE);
63 else
64 wake_up_all(&fm->change_set_notify);
Alex Dubov4020f2d2006-10-04 02:15:37 -070065
66 spin_unlock(&fm->lock);
67 return IRQ_HANDLED;
68}
69
Alex Dubov8b40ada2006-12-11 01:55:36 +110070static tifm_media_id tifm_7xx1_toggle_sock_power(char __iomem *sock_addr,
71 int is_x2)
Alex Dubov4020f2d2006-10-04 02:15:37 -070072{
73 unsigned int s_state;
74 int cnt;
75
76 writel(0x0e00, sock_addr + SOCK_CONTROL);
77
78 for (cnt = 0; cnt < 100; cnt++) {
Alex Dubov8b40ada2006-12-11 01:55:36 +110079 if (!(TIFM_SOCK_STATE_POWERED
80 & readl(sock_addr + SOCK_PRESENT_STATE)))
Alex Dubov4020f2d2006-10-04 02:15:37 -070081 break;
82 msleep(10);
83 }
84
85 s_state = readl(sock_addr + SOCK_PRESENT_STATE);
86 if (!(TIFM_SOCK_STATE_OCCUPIED & s_state))
87 return FM_NULL;
88
89 if (is_x2) {
90 writel((s_state & 7) | 0x0c00, sock_addr + SOCK_CONTROL);
91 } else {
92 // SmartMedia cards need extra 40 msec
93 if (((readl(sock_addr + SOCK_PRESENT_STATE) >> 4) & 7) == 1)
94 msleep(40);
95 writel(readl(sock_addr + SOCK_CONTROL) | TIFM_CTRL_LED,
96 sock_addr + SOCK_CONTROL);
97 msleep(10);
98 writel((s_state & 0x7) | 0x0c00 | TIFM_CTRL_LED,
99 sock_addr + SOCK_CONTROL);
100 }
101
102 for (cnt = 0; cnt < 100; cnt++) {
Alex Dubov8b40ada2006-12-11 01:55:36 +1100103 if ((TIFM_SOCK_STATE_POWERED
104 & readl(sock_addr + SOCK_PRESENT_STATE)))
Alex Dubov4020f2d2006-10-04 02:15:37 -0700105 break;
106 msleep(10);
107 }
108
109 if (!is_x2)
110 writel(readl(sock_addr + SOCK_CONTROL) & (~TIFM_CTRL_LED),
111 sock_addr + SOCK_CONTROL);
112
113 return (readl(sock_addr + SOCK_PRESENT_STATE) >> 4) & 7;
114}
115
Al Viroe069d792006-10-09 20:29:43 +0100116inline static char __iomem *
117tifm_7xx1_sock_addr(char __iomem *base_addr, unsigned int sock_num)
Alex Dubov4020f2d2006-10-04 02:15:37 -0700118{
119 return base_addr + ((sock_num + 1) << 10);
120}
121
Alex Dubov7146f0d2006-12-18 14:20:06 +1100122static int tifm_7xx1_switch_media(void *data)
Alex Dubov4020f2d2006-10-04 02:15:37 -0700123{
Alex Dubov7146f0d2006-12-18 14:20:06 +1100124 struct tifm_adapter *fm = data;
Alex Dubov4020f2d2006-10-04 02:15:37 -0700125 unsigned long flags;
126 tifm_media_id media_id;
127 char *card_name = "xx";
Alex Dubov7146f0d2006-12-18 14:20:06 +1100128 int cnt, rc;
Alex Dubov6412d922006-12-11 01:55:33 +1100129 struct tifm_dev *sock;
130 unsigned int socket_change_set;
Alex Dubov4020f2d2006-10-04 02:15:37 -0700131
Alex Dubov6412d922006-12-11 01:55:33 +1100132 while (1) {
Alex Dubov7146f0d2006-12-18 14:20:06 +1100133 rc = wait_event_interruptible(fm->change_set_notify,
134 fm->socket_change_set);
135 if (rc == -ERESTARTSYS)
136 try_to_freeze();
137
Alex Dubov6412d922006-12-11 01:55:33 +1100138 spin_lock_irqsave(&fm->lock, flags);
139 socket_change_set = fm->socket_change_set;
140 fm->socket_change_set = 0;
141
142 dev_dbg(fm->dev, "checking media set %x\n",
143 socket_change_set);
144
Alex Dubov7146f0d2006-12-18 14:20:06 +1100145 if (kthread_should_stop())
Alex Dubov6412d922006-12-11 01:55:33 +1100146 socket_change_set = (1 << fm->num_sockets) - 1;
Alex Dubov4020f2d2006-10-04 02:15:37 -0700147 spin_unlock_irqrestore(&fm->lock, flags);
Alex Dubov4020f2d2006-10-04 02:15:37 -0700148
Alex Dubov6412d922006-12-11 01:55:33 +1100149 if (!socket_change_set)
Alex Dubov7146f0d2006-12-18 14:20:06 +1100150 continue;
Alex Dubov4020f2d2006-10-04 02:15:37 -0700151
Alex Dubov6412d922006-12-11 01:55:33 +1100152 spin_lock_irqsave(&fm->lock, flags);
153 for (cnt = 0; cnt < fm->num_sockets; cnt++) {
154 if (!(socket_change_set & (1 << cnt)))
155 continue;
156 sock = fm->sockets[cnt];
157 if (sock) {
Alex Dubov4020f2d2006-10-04 02:15:37 -0700158 printk(KERN_INFO DRIVER_NAME
Alex Dubov6412d922006-12-11 01:55:33 +1100159 ": demand removing card from socket %d\n",
160 cnt);
161 fm->sockets[cnt] = NULL;
Alex Dubov4020f2d2006-10-04 02:15:37 -0700162 spin_unlock_irqrestore(&fm->lock, flags);
Alex Dubov6412d922006-12-11 01:55:33 +1100163 device_unregister(&sock->dev);
164 spin_lock_irqsave(&fm->lock, flags);
165 writel(0x0e00,
166 tifm_7xx1_sock_addr(fm->addr, cnt)
167 + SOCK_CONTROL);
168 }
Alex Dubov7146f0d2006-12-18 14:20:06 +1100169 if (kthread_should_stop())
Alex Dubov6412d922006-12-11 01:55:33 +1100170 continue;
171
172 spin_unlock_irqrestore(&fm->lock, flags);
173 media_id = tifm_7xx1_toggle_sock_power(
174 tifm_7xx1_sock_addr(fm->addr, cnt),
175 fm->num_sockets == 2);
176 if (media_id) {
177 sock = tifm_alloc_device(fm);
178 if (sock) {
179 sock->addr = tifm_7xx1_sock_addr(fm->addr,
Alex Dubov8b40ada2006-12-11 01:55:36 +1100180 cnt);
Alex Dubov6412d922006-12-11 01:55:33 +1100181 sock->media_id = media_id;
182 sock->socket_id = cnt;
183 switch (media_id) {
184 case 1:
185 card_name = "xd";
186 break;
187 case 2:
188 card_name = "ms";
189 break;
190 case 3:
191 card_name = "sd";
192 break;
193 default:
194 tifm_free_device(&sock->dev);
195 spin_lock_irqsave(&fm->lock, flags);
196 continue;
197 }
198 snprintf(sock->dev.bus_id, BUS_ID_SIZE,
Alex Dubov8b40ada2006-12-11 01:55:36 +1100199 "tifm_%s%u:%u", card_name,
200 fm->id, cnt);
Alex Dubov6412d922006-12-11 01:55:33 +1100201 printk(KERN_INFO DRIVER_NAME
Alex Dubov8b40ada2006-12-11 01:55:36 +1100202 ": %s card detected in socket %d\n",
203 card_name, cnt);
Alex Dubov6412d922006-12-11 01:55:33 +1100204 if (!device_register(&sock->dev)) {
205 spin_lock_irqsave(&fm->lock, flags);
206 if (!fm->sockets[cnt]) {
207 fm->sockets[cnt] = sock;
208 sock = NULL;
209 }
210 spin_unlock_irqrestore(&fm->lock, flags);
211 }
212 if (sock)
213 tifm_free_device(&sock->dev);
Alex Dubov4020f2d2006-10-04 02:15:37 -0700214 }
Alex Dubov6412d922006-12-11 01:55:33 +1100215 spin_lock_irqsave(&fm->lock, flags);
Alex Dubov4020f2d2006-10-04 02:15:37 -0700216 }
217 }
Alex Dubov4020f2d2006-10-04 02:15:37 -0700218
Alex Dubov7146f0d2006-12-18 14:20:06 +1100219 if (!kthread_should_stop()) {
Alex Dubov6412d922006-12-11 01:55:33 +1100220 writel(TIFM_IRQ_FIFOMASK(socket_change_set)
221 | TIFM_IRQ_CARDMASK(socket_change_set),
222 fm->addr + FM_CLEAR_INTERRUPT_ENABLE);
223 writel(TIFM_IRQ_FIFOMASK(socket_change_set)
224 | TIFM_IRQ_CARDMASK(socket_change_set),
225 fm->addr + FM_SET_INTERRUPT_ENABLE);
226 writel(TIFM_IRQ_ENABLE,
227 fm->addr + FM_SET_INTERRUPT_ENABLE);
228 spin_unlock_irqrestore(&fm->lock, flags);
Alex Dubov6412d922006-12-11 01:55:33 +1100229 } else {
230 for (cnt = 0; cnt < fm->num_sockets; cnt++) {
231 if (fm->sockets[cnt])
232 fm->socket_change_set |= 1 << cnt;
233 }
234 if (!fm->socket_change_set) {
235 spin_unlock_irqrestore(&fm->lock, flags);
Alex Dubov7146f0d2006-12-18 14:20:06 +1100236 return 0;
Alex Dubov6412d922006-12-11 01:55:33 +1100237 } else {
238 spin_unlock_irqrestore(&fm->lock, flags);
239 }
240 }
241 }
Alex Dubov7146f0d2006-12-18 14:20:06 +1100242 return 0;
Alex Dubov4020f2d2006-10-04 02:15:37 -0700243}
244
Alex Dubov7146f0d2006-12-18 14:20:06 +1100245#ifdef CONFIG_PM
246
Alex Dubov4020f2d2006-10-04 02:15:37 -0700247static int tifm_7xx1_suspend(struct pci_dev *dev, pm_message_t state)
248{
Alex Dubov7146f0d2006-12-18 14:20:06 +1100249 dev_dbg(&dev->dev, "suspending host\n");
Alex Dubov4020f2d2006-10-04 02:15:37 -0700250
Alex Dubov7146f0d2006-12-18 14:20:06 +1100251 pci_save_state(dev);
252 pci_enable_wake(dev, pci_choose_state(dev, state), 0);
253 pci_disable_device(dev);
254 pci_set_power_state(dev, pci_choose_state(dev, state));
Alex Dubov4020f2d2006-10-04 02:15:37 -0700255 return 0;
256}
257
258static int tifm_7xx1_resume(struct pci_dev *dev)
259{
260 struct tifm_adapter *fm = pci_get_drvdata(dev);
Alex Dubov7146f0d2006-12-18 14:20:06 +1100261 int cnt, rc;
Alex Dubov4020f2d2006-10-04 02:15:37 -0700262 unsigned long flags;
Alex Dubov7146f0d2006-12-18 14:20:06 +1100263 tifm_media_id new_ids[fm->num_sockets];
Alex Dubov4020f2d2006-10-04 02:15:37 -0700264
Alex Dubov7146f0d2006-12-18 14:20:06 +1100265 pci_set_power_state(dev, PCI_D0);
Alex Dubov4020f2d2006-10-04 02:15:37 -0700266 pci_restore_state(dev);
Alex Dubov7146f0d2006-12-18 14:20:06 +1100267 rc = pci_enable_device(dev);
268 if (rc)
269 return rc;
270 pci_set_master(dev);
271
272 dev_dbg(&dev->dev, "resuming host\n");
273
274 for (cnt = 0; cnt < fm->num_sockets; cnt++)
275 new_ids[cnt] = tifm_7xx1_toggle_sock_power(
276 tifm_7xx1_sock_addr(fm->addr, cnt),
277 fm->num_sockets == 2);
278 spin_lock_irqsave(&fm->lock, flags);
279 fm->socket_change_set = 0;
280 for (cnt = 0; cnt < fm->num_sockets; cnt++) {
281 if (fm->sockets[cnt]) {
282 if (fm->sockets[cnt]->media_id == new_ids[cnt])
283 fm->socket_change_set |= 1 << cnt;
284
285 fm->sockets[cnt]->media_id = new_ids[cnt];
286 }
287 }
288
289 writel(TIFM_IRQ_ENABLE | TIFM_IRQ_SOCKMASK((1 << fm->num_sockets) - 1),
290 fm->addr + FM_SET_INTERRUPT_ENABLE);
291 if (!fm->socket_change_set) {
292 spin_unlock_irqrestore(&fm->lock, flags);
293 return 0;
294 } else {
295 fm->socket_change_set = 0;
296 spin_unlock_irqrestore(&fm->lock, flags);
297 }
298
299 wait_event_timeout(fm->change_set_notify, fm->socket_change_set, HZ);
Alex Dubov4020f2d2006-10-04 02:15:37 -0700300
301 spin_lock_irqsave(&fm->lock, flags);
Alex Dubov7146f0d2006-12-18 14:20:06 +1100302 writel(TIFM_IRQ_FIFOMASK(fm->socket_change_set)
303 | TIFM_IRQ_CARDMASK(fm->socket_change_set),
304 fm->addr + FM_CLEAR_INTERRUPT_ENABLE);
305 writel(TIFM_IRQ_FIFOMASK(fm->socket_change_set)
306 | TIFM_IRQ_CARDMASK(fm->socket_change_set),
307 fm->addr + FM_SET_INTERRUPT_ENABLE);
308 writel(TIFM_IRQ_ENABLE,
309 fm->addr + FM_SET_INTERRUPT_ENABLE);
310 fm->socket_change_set = 0;
311
Alex Dubov4020f2d2006-10-04 02:15:37 -0700312 spin_unlock_irqrestore(&fm->lock, flags);
313 return 0;
314}
315
Alex Dubov7146f0d2006-12-18 14:20:06 +1100316#else
317
318#define tifm_7xx1_suspend NULL
319#define tifm_7xx1_resume NULL
320
321#endif /* CONFIG_PM */
322
Alex Dubov4020f2d2006-10-04 02:15:37 -0700323static int tifm_7xx1_probe(struct pci_dev *dev,
Alex Dubov8b40ada2006-12-11 01:55:36 +1100324 const struct pci_device_id *dev_id)
Alex Dubov4020f2d2006-10-04 02:15:37 -0700325{
326 struct tifm_adapter *fm;
327 int pci_dev_busy = 0;
328 int rc;
329
330 rc = pci_set_dma_mask(dev, DMA_32BIT_MASK);
331 if (rc)
332 return rc;
333
334 rc = pci_enable_device(dev);
335 if (rc)
336 return rc;
337
338 pci_set_master(dev);
339
340 rc = pci_request_regions(dev, DRIVER_NAME);
341 if (rc) {
342 pci_dev_busy = 1;
343 goto err_out;
344 }
345
346 pci_intx(dev, 1);
347
348 fm = tifm_alloc_adapter();
349 if (!fm) {
350 rc = -ENOMEM;
351 goto err_out_int;
352 }
353
354 fm->dev = &dev->dev;
Alex Dubovb5ad6762006-12-11 01:55:35 +1100355 fm->num_sockets = (dev->device == PCI_DEVICE_ID_TI_XX21_XX11_FM)
356 ? 4 : 2;
Alex Dubov6412d922006-12-11 01:55:33 +1100357 fm->sockets = kzalloc(sizeof(struct tifm_dev*) * fm->num_sockets,
Alex Dubov8b40ada2006-12-11 01:55:36 +1100358 GFP_KERNEL);
Alex Dubov4020f2d2006-10-04 02:15:37 -0700359 if (!fm->sockets)
360 goto err_out_free;
361
Alex Dubov4020f2d2006-10-04 02:15:37 -0700362 fm->eject = tifm_7xx1_eject;
363 pci_set_drvdata(dev, fm);
364
365 fm->addr = ioremap(pci_resource_start(dev, 0),
Alex Dubov8b40ada2006-12-11 01:55:36 +1100366 pci_resource_len(dev, 0));
Alex Dubov4020f2d2006-10-04 02:15:37 -0700367 if (!fm->addr)
368 goto err_out_free;
369
370 rc = request_irq(dev->irq, tifm_7xx1_isr, SA_SHIRQ, DRIVER_NAME, fm);
371 if (rc)
372 goto err_out_unmap;
373
Alex Dubov7146f0d2006-12-18 14:20:06 +1100374 init_waitqueue_head(&fm->change_set_notify);
375 rc = tifm_add_adapter(fm, tifm_7xx1_switch_media);
Alex Dubov4020f2d2006-10-04 02:15:37 -0700376 if (rc)
377 goto err_out_irq;
378
379 writel(TIFM_IRQ_SETALL, fm->addr + FM_CLEAR_INTERRUPT_ENABLE);
Alex Dubov6412d922006-12-11 01:55:33 +1100380 writel(TIFM_IRQ_ENABLE | TIFM_IRQ_SOCKMASK((1 << fm->num_sockets) - 1),
Alex Dubov8b40ada2006-12-11 01:55:36 +1100381 fm->addr + FM_SET_INTERRUPT_ENABLE);
Alex Dubov7146f0d2006-12-18 14:20:06 +1100382 wake_up_process(fm->media_switcher);
Alex Dubov4020f2d2006-10-04 02:15:37 -0700383 return 0;
384
385err_out_irq:
386 free_irq(dev->irq, fm);
387err_out_unmap:
388 iounmap(fm->addr);
389err_out_free:
390 pci_set_drvdata(dev, NULL);
391 tifm_free_adapter(fm);
392err_out_int:
393 pci_intx(dev, 0);
394 pci_release_regions(dev);
395err_out:
396 if (!pci_dev_busy)
397 pci_disable_device(dev);
398 return rc;
399}
400
401static void tifm_7xx1_remove(struct pci_dev *dev)
402{
403 struct tifm_adapter *fm = pci_get_drvdata(dev);
404 unsigned long flags;
405
Alex Dubov7146f0d2006-12-18 14:20:06 +1100406 writel(TIFM_IRQ_SETALL, fm->addr + FM_CLEAR_INTERRUPT_ENABLE);
407 mmiowb();
408 free_irq(dev->irq, fm);
409
Alex Dubov4020f2d2006-10-04 02:15:37 -0700410 spin_lock_irqsave(&fm->lock, flags);
Alex Dubov7146f0d2006-12-18 14:20:06 +1100411 fm->socket_change_set = (1 << fm->num_sockets) - 1;
Alex Dubov4020f2d2006-10-04 02:15:37 -0700412 spin_unlock_irqrestore(&fm->lock, flags);
413
Alex Dubov7146f0d2006-12-18 14:20:06 +1100414 kthread_stop(fm->media_switcher);
Alex Dubov4020f2d2006-10-04 02:15:37 -0700415
416 tifm_remove_adapter(fm);
417
Al Viroe069d792006-10-09 20:29:43 +0100418 pci_set_drvdata(dev, NULL);
Alex Dubov4020f2d2006-10-04 02:15:37 -0700419
420 iounmap(fm->addr);
421 pci_intx(dev, 0);
422 pci_release_regions(dev);
423
424 pci_disable_device(dev);
425 tifm_free_adapter(fm);
426}
427
428static struct pci_device_id tifm_7xx1_pci_tbl [] = {
Alex Dubovb5ad6762006-12-11 01:55:35 +1100429 { PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_XX21_XX11_FM, PCI_ANY_ID,
430 PCI_ANY_ID, 0, 0, 0 }, /* xx21 - the one I have */
431 { PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_XX12_FM, PCI_ANY_ID,
432 PCI_ANY_ID, 0, 0, 0 },
433 { PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_XX20_FM, PCI_ANY_ID,
434 PCI_ANY_ID, 0, 0, 0 },
Alex Dubov4020f2d2006-10-04 02:15:37 -0700435 { }
436};
437
438static struct pci_driver tifm_7xx1_driver = {
439 .name = DRIVER_NAME,
440 .id_table = tifm_7xx1_pci_tbl,
441 .probe = tifm_7xx1_probe,
442 .remove = tifm_7xx1_remove,
443 .suspend = tifm_7xx1_suspend,
444 .resume = tifm_7xx1_resume,
445};
446
447static int __init tifm_7xx1_init(void)
448{
449 return pci_register_driver(&tifm_7xx1_driver);
450}
451
452static void __exit tifm_7xx1_exit(void)
453{
454 pci_unregister_driver(&tifm_7xx1_driver);
455}
456
457MODULE_AUTHOR("Alex Dubov");
458MODULE_DESCRIPTION("TI FlashMedia host driver");
459MODULE_LICENSE("GPL");
460MODULE_DEVICE_TABLE(pci, tifm_7xx1_pci_tbl);
461MODULE_VERSION(DRIVER_VERSION);
462
463module_init(tifm_7xx1_init);
464module_exit(tifm_7xx1_exit);