OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [linux/] [linux-2.4/] [drivers/] [pcmcia/] [vrc4173_cardu.c] - Blame information for rev 1774

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1275 phoenix
/*
2
 * FILE NAME
3
 *      drivers/pcmcia/vrc4173_cardu.c
4
 *
5
 * BRIEF MODULE DESCRIPTION
6
 *      NEC VRC4173 CARDU driver for Socket Services
7
 *      (This device doesn't support CardBus. it is supporting only 16bit PC Card.)
8
 *
9
 * Copyright 2002,2003 Yoichi Yuasa <yuasa@hh.iij4u.or.jp>
10
 *
11
 *  This program is free software; you can redistribute it and/or modify it
12
 *  under the terms of the GNU General Public License as published by the
13
 *  Free Software Foundation; either version 2 of the License, or (at your
14
 *  option) any later version.
15
 *
16
 *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
17
 *  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
18
 *  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
19
 *  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
20
 *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
21
 *  BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
22
 *  OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23
 *  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
24
 *  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
25
 *  USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26
 *
27
 *  You should have received a copy of the GNU General Public License along
28
 *  with this program; if not, write to the Free Software Foundation, Inc.,
29
 *  675 Mass Ave, Cambridge, MA 02139, USA.
30
 */
31
#include <linux/init.h>
32
#include <linux/module.h>
33
#include <linux/pci.h>
34
#include <linux/spinlock.h>
35
#include <linux/types.h>
36
 
37
#include <asm/io.h>
38
 
39
#include <pcmcia/ss.h>
40
 
41
#include "vrc4173_cardu.h"
42
 
43
MODULE_DESCRIPTION("NEC VRC4173 CARDU driver for Socket Services");
44
MODULE_AUTHOR("Yoichi Yuasa <yuasa@hh.iij4u.or.jp>");
45
MODULE_LICENSE("GPL");
46
 
47
static int vrc4173_cardu_slots;
48
 
49
static vrc4173_socket_t cardu_sockets[CARDU_MAX_SOCKETS];
50
 
51
extern struct socket_info_t *pcmcia_register_socket (int slot,
52
                                                     struct pccard_operations *vtable,
53
                                                     int use_bus_pm);
54
extern void pcmcia_unregister_socket(struct socket_info_t *s);
55
 
56
static inline uint8_t exca_readb(vrc4173_socket_t *socket, uint16_t offset)
57
{
58
        return readb(socket->base + EXCA_REGS_BASE + offset);
59
}
60
 
61
static inline uint16_t exca_readw(vrc4173_socket_t *socket, uint16_t offset)
62
{
63
        uint16_t val;
64
 
65
        val = readb(socket->base + EXCA_REGS_BASE + offset);
66
        val |= (u16)readb(socket->base + EXCA_REGS_BASE + offset + 1) << 8;
67
 
68
        return val;
69
}
70
 
71
static inline void exca_writeb(vrc4173_socket_t *socket, uint16_t offset, uint8_t val)
72
{
73
        writeb(val, socket->base + EXCA_REGS_BASE + offset);
74
}
75
 
76
static inline void exca_writew(vrc4173_socket_t *socket, uint8_t offset, uint16_t val)
77
{
78
        writeb((u8)val, socket->base + EXCA_REGS_BASE + offset);
79
        writeb((u8)(val >> 8), socket->base + EXCA_REGS_BASE + offset + 1);
80
}
81
 
82
static inline uint32_t cardbus_socket_readl(vrc4173_socket_t *socket, u16 offset)
83
{
84
        return readl(socket->base + CARDBUS_SOCKET_REGS_BASE + offset);
85
}
86
 
87
static inline void cardbus_socket_writel(vrc4173_socket_t *socket, u16 offset, uint32_t val)
88
{
89
        writel(val, socket->base + CARDBUS_SOCKET_REGS_BASE + offset);
90
}
91
 
92
static void cardu_pciregs_init(struct pci_dev *dev)
93
{
94
        u32 syscnt;
95
        u16 brgcnt;
96
        u8 devcnt;
97
 
98
        pci_write_config_dword(dev, 0x1c, 0x10000000);
99
        pci_write_config_dword(dev, 0x20, 0x17fff000);
100
        pci_write_config_dword(dev, 0x2c, 0);
101
        pci_write_config_dword(dev, 0x30, 0xfffc);
102
 
103
        pci_read_config_word(dev, BRGCNT, &brgcnt);
104
        brgcnt &= ~IREQ_INT;
105
        pci_write_config_word(dev, BRGCNT, brgcnt);
106
 
107
        pci_read_config_dword(dev, SYSCNT, &syscnt);
108
        syscnt &= ~(BAD_VCC_REQ_DISB|PCPCI_EN|CH_ASSIGN_MASK|SUB_ID_WR_EN|PCI_CLK_RIN);
109
        syscnt |= (CH_ASSIGN_NODMA|ASYN_INT_MODE);
110
        pci_write_config_dword(dev, SYSCNT, syscnt);
111
 
112
        pci_read_config_byte(dev, DEVCNT, &devcnt);
113
        devcnt &= ~(ZOOM_VIDEO_EN|SR_PCI_INT_SEL_MASK|PCI_INT_MODE|IRQ_MODE);
114
        devcnt |= (SR_PCI_INT_SEL_NONE|IFG);
115
        pci_write_config_byte(dev, DEVCNT, devcnt);
116
 
117
        pci_write_config_byte(dev, CHIPCNT, S_PREF_DISB);
118
 
119
        pci_write_config_byte(dev, SERRDIS, 0);
120
}
121
 
122
static int cardu_init(unsigned int slot)
123
{
124
        vrc4173_socket_t *socket = &cardu_sockets[slot];
125
 
126
        cardu_pciregs_init(socket->dev);
127
 
128
        /* CARD_SC bits are cleared by reading CARD_SC. */
129
        exca_writeb(socket, GLO_CNT, 0);
130
 
131
        socket->cap.features |= SS_CAP_PCCARD | SS_CAP_PAGE_REGS;
132
        socket->cap.irq_mask = 0;
133
        socket->cap.map_size = 0x1000;
134
        socket->cap.pci_irq  = socket->dev->irq;
135
        socket->events = 0;
136
        spin_lock_init(socket->event_lock);
137
 
138
        /* Enable PC Card status interrupts */
139
        exca_writeb(socket, CARD_SCI, CARD_DT_EN|RDY_EN|BAT_WAR_EN|BAT_DEAD_EN);
140
 
141
        return 0;
142
}
143
 
144
static int cardu_suspend(unsigned int slot)
145
{
146
        return -EINVAL;
147
}
148
 
149
static int cardu_register_callback(unsigned int sock,
150
                                           void (*handler)(void *, unsigned int),
151
                                           void * info)
152
{
153
        vrc4173_socket_t *socket = &cardu_sockets[sock];
154
 
155
        socket->handler = handler;
156
        socket->info = info;
157
 
158
        if (handler)
159
                MOD_INC_USE_COUNT;
160
        else
161
                MOD_DEC_USE_COUNT;
162
 
163
        return 0;
164
}
165
 
166
static int cardu_inquire_socket(unsigned int sock, socket_cap_t *cap)
167
{
168
        vrc4173_socket_t *socket = &cardu_sockets[sock];
169
 
170
        *cap = socket->cap;
171
 
172
        return 0;
173
}
174
 
175
static int cardu_get_status(unsigned int sock, u_int *value)
176
{
177
        vrc4173_socket_t *socket = &cardu_sockets[sock];
178
        uint32_t state;
179
        uint8_t status;
180
        u_int val = 0;
181
 
182
        status = exca_readb(socket, IF_STATUS);
183
        if (status & CARD_PWR) val |= SS_POWERON;
184
        if (status & READY) val |= SS_READY;
185
        if (status & CARD_WP) val |= SS_WRPROT;
186
        if ((status & (CARD_DETECT1|CARD_DETECT2)) == (CARD_DETECT1|CARD_DETECT2))
187
                val |= SS_DETECT;
188
        if (exca_readb(socket, INT_GEN_CNT) & CARD_TYPE_IO) {
189
                if (status & STSCHG) val |= SS_STSCHG;
190
        } else {
191
                status &= BV_DETECT_MASK;
192
                if (status != BV_DETECT_GOOD) {
193
                        if (status == BV_DETECT_WARN) val |= SS_BATWARN;
194
                        else val |= SS_BATDEAD;
195
                }
196
        }
197
 
198
        state = cardbus_socket_readl(socket, SKT_PRE_STATE);
199
        if (state & VOL_3V_CARD_DT) val |= SS_3VCARD;
200
        if (state & VOL_XV_CARD_DT) val |= SS_XVCARD;
201
        if (state & CB_CARD_DT) val |= SS_CARDBUS;
202
        if (!(state &
203
              (VOL_YV_CARD_DT|VOL_XV_CARD_DT|VOL_3V_CARD_DT|VOL_5V_CARD_DT|CCD20|CCD10)))
204
                val |= SS_PENDING;
205
 
206
        *value = val;
207
 
208
        return 0;
209
}
210
 
211
static inline u_char get_Vcc_value(uint8_t val)
212
{
213
        switch (val & VCC_MASK) {
214
        case VCC_3V:
215
                return 33;
216
        case VCC_5V:
217
                return 50;
218
        }
219
 
220
        return 0;
221
}
222
 
223
static inline u_char get_Vpp_value(uint8_t val)
224
{
225
        switch (val & VPP_MASK) {
226
        case VPP_12V:
227
                return 120;
228
        case VPP_VCC:
229
                return get_Vcc_value(val);
230
        }
231
 
232
        return 0;
233
}
234
 
235
static int cardu_get_socket(unsigned int sock, socket_state_t *state)
236
{
237
        vrc4173_socket_t *socket = &cardu_sockets[sock];
238
        uint8_t val;
239
 
240
        val = exca_readb(socket, PWR_CNT);
241
        state->Vcc = get_Vcc_value(val);
242
        state->Vpp = get_Vpp_value(val);
243
        state->flags = 0;
244
        if (val & CARD_OUT_EN) state->flags |= SS_OUTPUT_ENA;
245
 
246
        val = exca_readb(socket, INT_GEN_CNT);
247
        if (!(val & CARD_REST0)) state->flags |= SS_RESET;
248
        if (val & CARD_TYPE_IO) state->flags |= SS_IOCARD;
249
 
250
        return 0;
251
}
252
 
253
static inline uint8_t set_Vcc_value(u_char Vcc)
254
{
255
        switch (Vcc) {
256
        case 33:
257
                return VCC_3V;
258
        case 50:
259
                return VCC_5V;
260
        }
261
 
262
        return VCC_0V;
263
}
264
 
265
static inline uint8_t set_Vpp_value(u_char Vpp)
266
{
267
        switch (Vpp) {
268
        case 33:
269
        case 50:
270
                return VPP_VCC;
271
        case 120:
272
                return VPP_12V;
273
        }
274
 
275
        return VPP_0V;
276
}
277
 
278
static int cardu_set_socket(unsigned int sock, socket_state_t *state)
279
{
280
        vrc4173_socket_t *socket = &cardu_sockets[sock];
281
        uint8_t val;
282
 
283
        if (((state->Vpp == 33) || (state->Vpp == 50)) && (state->Vpp != state->Vcc))
284
                        return -EINVAL;
285
 
286
        val = set_Vcc_value(state->Vcc);
287
        val |= set_Vpp_value(state->Vpp);
288
        if (state->flags & SS_OUTPUT_ENA) val |= CARD_OUT_EN;
289
        exca_writeb(socket, PWR_CNT, val);
290
 
291
        val = exca_readb(socket, INT_GEN_CNT) & CARD_REST0;
292
        if (state->flags & SS_RESET) val &= ~CARD_REST0;
293
        else val |= CARD_REST0;
294
        if (state->flags & SS_IOCARD) val |= CARD_TYPE_IO;
295
        exca_writeb(socket, INT_GEN_CNT, val);
296
 
297
        return 0;
298
}
299
 
300
static int cardu_get_io_map(unsigned int sock, struct pccard_io_map *io)
301
{
302
        vrc4173_socket_t *socket = &cardu_sockets[sock];
303
        uint8_t ioctl, window;
304
        u_char map;
305
 
306
        map = io->map;
307
        if (map > 1)
308
                return -EINVAL;
309
 
310
        io->start = exca_readw(socket, IO_WIN_SA(map));
311
        io->stop = exca_readw(socket, IO_WIN_EA(map));
312
 
313
        ioctl = exca_readb(socket, IO_WIN_CNT);
314
        window = exca_readb(socket, ADR_WIN_EN);
315
        io->flags  = (window & IO_WIN_EN(map)) ? MAP_ACTIVE : 0;
316
        if (ioctl & IO_WIN_DATA_AUTOSZ(map))
317
                io->flags |= MAP_AUTOSZ;
318
        else if (ioctl & IO_WIN_DATA_16BIT(map))
319
                io->flags |= MAP_16BIT;
320
 
321
        return 0;
322
}
323
 
324
static int cardu_set_io_map(unsigned int sock, struct pccard_io_map *io)
325
{
326
        vrc4173_socket_t *socket = &cardu_sockets[sock];
327
        uint16_t ioctl;
328
        uint8_t window, enable;
329
        u_char map;
330
 
331
        map = io->map;
332
        if (map > 1)
333
                return -EINVAL;
334
 
335
        window = exca_readb(socket, ADR_WIN_EN);
336
        enable = IO_WIN_EN(map);
337
 
338
        if (window & enable) {
339
                window &= ~enable;
340
                exca_writeb(socket, ADR_WIN_EN, window);
341
        }
342
 
343
        exca_writew(socket, IO_WIN_SA(map), io->start);
344
        exca_writew(socket, IO_WIN_EA(map), io->stop);
345
 
346
        ioctl = exca_readb(socket, IO_WIN_CNT) & ~IO_WIN_CNT_MASK(map);
347
        if (io->flags & MAP_AUTOSZ) ioctl |= IO_WIN_DATA_AUTOSZ(map);
348
        else if (io->flags & MAP_16BIT) ioctl |= IO_WIN_DATA_16BIT(map);
349
        exca_writeb(socket, IO_WIN_CNT, ioctl);
350
 
351
        if (io->flags & MAP_ACTIVE)
352
                exca_writeb(socket, ADR_WIN_EN, window | enable);
353
 
354
        return 0;
355
}
356
 
357
static int cardu_get_mem_map(unsigned int sock, struct pccard_mem_map *mem)
358
{
359
        vrc4173_socket_t *socket = &cardu_sockets[sock];
360
        uint32_t start, stop, offset, page;
361
        uint8_t window;
362
        u_char map;
363
 
364
        map = mem->map;
365
        if (map > 4)
366
                return -EINVAL;
367
 
368
        window = exca_readb(socket, ADR_WIN_EN);
369
        mem->flags = (window & MEM_WIN_EN(map)) ? MAP_ACTIVE : 0;
370
 
371
        start = exca_readw(socket, MEM_WIN_SA(map));
372
        mem->flags |= (start & MEM_WIN_DSIZE) ? MAP_16BIT : 0;
373
        start = (start & 0x0fff) << 12;
374
 
375
        stop = exca_readw(socket, MEM_WIN_EA(map));
376
        stop = ((stop & 0x0fff) << 12) + 0x0fff;
377
 
378
        offset = exca_readw(socket, MEM_WIN_OA(map));
379
        mem->flags |= (offset & MEM_WIN_WP) ? MAP_WRPROT : 0;
380
        mem->flags |= (offset & MEM_WIN_REGSET) ? MAP_ATTRIB : 0;
381
        offset = ((offset & 0x3fff) << 12) + start;
382
        mem->card_start = offset & 0x03ffffff;
383
 
384
        page = exca_readb(socket, MEM_WIN_SAU(map)) << 24;
385
        mem->sys_start = start + page;
386
        mem->sys_stop = start + page;
387
 
388
        return 0;
389
}
390
 
391
static int cardu_set_mem_map(unsigned int sock, struct pccard_mem_map *mem)
392
{
393
        vrc4173_socket_t *socket = &cardu_sockets[sock];
394
        uint16_t value;
395
        uint8_t window, enable;
396
        u_long sys_start, sys_stop, card_start;
397
        u_char map;
398
 
399
        map = mem->map;
400
        sys_start = mem->sys_start;
401
        sys_stop = mem->sys_stop;
402
        card_start = mem->card_start;
403
 
404
        if (map > 4 || sys_start > sys_stop || ((sys_start ^ sys_stop) >> 24) ||
405
            (card_start >> 26))
406
                return -EINVAL;
407
 
408
        window = exca_readb(socket, ADR_WIN_EN);
409
        enable = MEM_WIN_EN(map);
410
        if (window & enable) {
411
                window &= ~enable;
412
                exca_writeb(socket, ADR_WIN_EN, window);
413
        }
414
 
415
        exca_writeb(socket, MEM_WIN_SAU(map), sys_start >> 24);
416
 
417
        value = (sys_start >> 12) & 0x0fff;
418
        if (mem->flags & MAP_16BIT) value |= MEM_WIN_DSIZE;
419
        exca_writew(socket, MEM_WIN_SA(map), value);
420
 
421
        value = (sys_stop >> 12) & 0x0fff;
422
        exca_writew(socket, MEM_WIN_EA(map), value);
423
 
424
        value = ((card_start - sys_start) >> 12) & 0x3fff;
425
        if (mem->flags & MAP_WRPROT) value |= MEM_WIN_WP;
426
        if (mem->flags & MAP_ATTRIB) value |= MEM_WIN_REGSET;
427
        exca_writew(socket, MEM_WIN_OA(map), value);
428
 
429
        if (mem->flags & MAP_ACTIVE)
430
                exca_writeb(socket, ADR_WIN_EN, window | enable);
431
 
432
        return 0;
433
}
434
 
435
static void cardu_proc_setup(unsigned int sock, struct proc_dir_entry *base)
436
{
437
}
438
 
439
static struct pccard_operations cardu_operations = {
440
        .init                   = cardu_init,
441
        .suspend                = cardu_suspend,
442
        .register_callback      = cardu_register_callback,
443
        .inquire_socket         = cardu_inquire_socket,
444
        .get_status             = cardu_get_status,
445
        .get_socket             = cardu_get_socket,
446
        .set_socket             = cardu_set_socket,
447
        .get_io_map             = cardu_get_io_map,
448
        .set_io_map             = cardu_set_io_map,
449
        .get_mem_map            = cardu_get_mem_map,
450
        .set_mem_map            = cardu_set_mem_map,
451
        .proc_setup             = cardu_proc_setup,
452
};
453
 
454
static void cardu_bh(void *data)
455
{
456
        vrc4173_socket_t *socket = (vrc4173_socket_t *)data;
457
        uint16_t events;
458
 
459
        spin_lock_irq(&socket->event_lock);
460
        events = socket->events;
461
        socket->events = 0;
462
        spin_unlock_irq(&socket->event_lock);
463
 
464
        if (socket->handler)
465
                socket->handler(socket->info, events);
466
}
467
 
468
static uint16_t get_events(vrc4173_socket_t *socket)
469
{
470
        uint16_t events = 0;
471
        uint8_t csc, status;
472
 
473
        status = exca_readb(socket, IF_STATUS);
474
        csc = exca_readb(socket, CARD_SC);
475
        if ((csc & CARD_DT_CHG) &&
476
            ((status & (CARD_DETECT1|CARD_DETECT2)) == (CARD_DETECT1|CARD_DETECT2)))
477
                events |= SS_DETECT;
478
 
479
        if ((csc & RDY_CHG) && (status & READY))
480
                events |= SS_READY;
481
 
482
        if (exca_readb(socket, INT_GEN_CNT) & CARD_TYPE_IO) {
483
                if ((csc & BAT_DEAD_ST_CHG) && (status & STSCHG))
484
                        events |= SS_STSCHG;
485
        } else {
486
                if (csc & (BAT_WAR_CHG|BAT_DEAD_ST_CHG)) {
487
                        if ((status & BV_DETECT_MASK) != BV_DETECT_GOOD) {
488
                                if (status == BV_DETECT_WARN) events |= SS_BATWARN;
489
                                else events |= SS_BATDEAD;
490
                        }
491
                }
492
        }
493
 
494
        return events;
495
}
496
 
497
static void cardu_interrupt(int irq, void *dev_id, struct pt_regs *regs)
498
{
499
        vrc4173_socket_t *socket = (vrc4173_socket_t *)dev_id;
500
        uint16_t events;
501
 
502
        socket->tq_task.routine = cardu_bh;
503
        socket->tq_task.data = socket;
504
 
505
        events = get_events(socket);
506
        if (events) {
507
                spin_lock(&socket->event_lock);
508
                socket->events |= events;
509
                spin_unlock(&socket->event_lock);
510
                schedule_task(&socket->tq_task);
511
        }
512
}
513
 
514
static int __devinit vrc4173_cardu_probe(struct pci_dev *dev,
515
                                         const struct pci_device_id *ent)
516
{
517
        vrc4173_socket_t *socket;
518
        unsigned long start, len, flags;
519
        int slot, err;
520
 
521
        slot = vrc4173_cardu_slots++;
522
        socket = &cardu_sockets[slot];
523
        if (socket->noprobe != 0)
524
                return -EBUSY;
525
 
526
        sprintf(socket->name, "NEC VRC4173 CARDU%1d", slot+1);
527
 
528
        if ((err = pci_enable_device(dev)) < 0)
529
                return err;
530
 
531
        start = pci_resource_start(dev, 0);
532
        if (start == 0)
533
                return -ENODEV;
534
 
535
        len = pci_resource_len(dev, 0);
536
        if (len == 0)
537
                return -ENODEV;
538
 
539
        if (((flags = pci_resource_flags(dev, 0)) & IORESOURCE_MEM) == 0)
540
                return -EBUSY;
541
 
542
        if ((err = pci_request_regions(dev, socket->name)) < 0)
543
                return err;
544
 
545
        socket->base = ioremap(start, len);
546
        if (socket->base == NULL)
547
                return -ENODEV;
548
 
549
        socket->dev = dev;
550
 
551
        socket->pcmcia_socket = pcmcia_register_socket(slot, &cardu_operations, 1);
552
        if (socket->pcmcia_socket == NULL) {
553
                iounmap(socket->base);
554
                socket->base = NULL;
555
                return -ENOMEM;
556
        }
557
 
558
        if (request_irq(dev->irq, cardu_interrupt, SA_SHIRQ, socket->name, socket) < 0) {
559
                pcmcia_unregister_socket(socket->pcmcia_socket);
560
                socket->pcmcia_socket = NULL;
561
                iounmap(socket->base);
562
                socket->base = NULL;
563
                return -EBUSY;
564
        }
565
 
566
        printk(KERN_INFO "%s at %#08lx, IRQ %d\n", socket->name, start, dev->irq);
567
 
568
        return 0;
569
}
570
 
571
static int __devinit vrc4173_cardu_setup(char *options)
572
{
573
        if (options == NULL || *options == '\0')
574
                return 0;
575
 
576
        if (strncmp(options, "cardu1:", 7) == 0) {
577
                options += 7;
578
                if (*options != '\0') {
579
                        if (strncmp(options, "noprobe", 7) == 0) {
580
                                cardu_sockets[CARDU1].noprobe = 1;
581
                                options += 7;
582
                        }
583
 
584
                        if (*options != ',')
585
                                return 0;
586
                } else
587
                        return 0;
588
        }
589
 
590
        if (strncmp(options, "cardu2:", 7) == 0) {
591
                options += 7;
592
                if ((*options != '\0') && (strncmp(options, "noprobe", 7) == 0))
593
                        cardu_sockets[CARDU2].noprobe = 1;
594
        }
595
 
596
        return 0;
597
}
598
 
599
__setup("vrc4173_cardu=", vrc4173_cardu_setup);
600
 
601
static struct pci_device_id vrc4173_cardu_id_table[] __devinitdata = {
602
        {       .vendor         = PCI_VENDOR_ID_NEC,
603
                .device         = PCI_DEVICE_ID_NEC_NAPCCARD,
604
                .subvendor      = PCI_ANY_ID,
605
                .subdevice      = PCI_ANY_ID, },
606
        {0, }
607
};
608
 
609
static struct pci_driver vrc4173_cardu_driver = {
610
        .name           = "NEC VRC4173 CARDU",
611
        .probe          = vrc4173_cardu_probe,
612
        .id_table       = vrc4173_cardu_id_table,
613
};
614
 
615
static int __devinit vrc4173_cardu_init(void)
616
{
617
        vrc4173_cardu_slots = 0;
618
 
619
        return pci_module_init(&vrc4173_cardu_driver);
620
}
621
 
622
static void __devexit vrc4173_cardu_exit(void)
623
{
624
        pci_unregister_driver(&vrc4173_cardu_driver);
625
}
626
 
627
module_init(vrc4173_cardu_init);
628
module_exit(vrc4173_cardu_exit);

powered by: WebSVN 2.1.0

© copyright 1999-2025 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.