2 * Minimalist driver for a generic PCI-to-EISA bridge.
4 * (C) 2003 Marc Zyngier <maz@wild-wind.fr.eu.org>
6 * This code is released under the GPL version 2.
8 * Ivan Kokshaysky <ink@jurassic.park.msu.ru> :
9 * Generalisation from i82375 to PCI_CLASS_BRIDGE_EISA.
12 #include <linux/kernel.h>
13 #include <linux/device.h>
14 #include <linux/eisa.h>
15 #include <linux/pci.h>
16 #include <linux/module.h>
17 #include <linux/init.h>
19 /* There is only *one* pci_eisa device per machine, right ? */
20 static struct eisa_root_device pci_eisa_root
;
22 static int __init
pci_eisa_init(struct pci_dev
*pdev
,
23 const struct pci_device_id
*ent
)
27 if ((rc
= pci_enable_device (pdev
))) {
28 printk (KERN_ERR
"pci_eisa : Could not enable device %s\n",
33 pci_eisa_root
.dev
= &pdev
->dev
;
34 pci_eisa_root
.res
= pdev
->bus
->resource
[0];
35 pci_eisa_root
.bus_base_addr
= pdev
->bus
->resource
[0]->start
;
36 pci_eisa_root
.slots
= EISA_MAX_SLOTS
;
37 pci_eisa_root
.dma_mask
= pdev
->dma_mask
;
38 dev_set_drvdata(pci_eisa_root
.dev
, &pci_eisa_root
);
40 if (eisa_root_register (&pci_eisa_root
)) {
41 printk (KERN_ERR
"pci_eisa : Could not register EISA root\n");
48 static struct pci_device_id pci_eisa_pci_tbl
[] = {
49 { PCI_ANY_ID
, PCI_ANY_ID
, PCI_ANY_ID
, PCI_ANY_ID
,
50 PCI_CLASS_BRIDGE_EISA
<< 8, 0xffff00, 0 },
54 static struct pci_driver pci_eisa_driver
= {
56 .id_table
= pci_eisa_pci_tbl
,
57 .probe
= pci_eisa_init
,
60 static int __init
pci_eisa_init_module (void)
62 return pci_register_driver (&pci_eisa_driver
);
65 device_initcall(pci_eisa_init_module
);
66 MODULE_DEVICE_TABLE(pci
, pci_eisa_pci_tbl
);