aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/eisa/pci_eisa.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /drivers/eisa/pci_eisa.c
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
Diffstat (limited to 'drivers/eisa/pci_eisa.c')
-rw-r--r--drivers/eisa/pci_eisa.c66
1 files changed, 66 insertions, 0 deletions
diff --git a/drivers/eisa/pci_eisa.c b/drivers/eisa/pci_eisa.c
new file mode 100644
index 000000000000..9e913629ef39
--- /dev/null
+++ b/drivers/eisa/pci_eisa.c
@@ -0,0 +1,66 @@
1/*
2 * Minimalist driver for a generic PCI-to-EISA bridge.
3 *
4 * (C) 2003 Marc Zyngier <maz@wild-wind.fr.eu.org>
5 *
6 * This code is released under the GPL version 2.
7 *
8 * Ivan Kokshaysky <ink@jurassic.park.msu.ru> :
9 * Generalisation from i82375 to PCI_CLASS_BRIDGE_EISA.
10 */
11
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>
18
19/* There is only *one* pci_eisa device per machine, right ? */
20static struct eisa_root_device pci_eisa_root;
21
22static int __devinit pci_eisa_init (struct pci_dev *pdev,
23 const struct pci_device_id *ent)
24{
25 int rc;
26
27 if ((rc = pci_enable_device (pdev))) {
28 printk (KERN_ERR "pci_eisa : Could not enable device %s\n",
29 pci_name(pdev));
30 return rc;
31 }
32
33 pci_eisa_root.dev = &pdev->dev;
34 pci_eisa_root.dev->driver_data = &pci_eisa_root;
35 pci_eisa_root.res = pdev->bus->resource[0];
36 pci_eisa_root.bus_base_addr = pdev->bus->resource[0]->start;
37 pci_eisa_root.slots = EISA_MAX_SLOTS;
38 pci_eisa_root.dma_mask = pdev->dma_mask;
39
40 if (eisa_root_register (&pci_eisa_root)) {
41 printk (KERN_ERR "pci_eisa : Could not register EISA root\n");
42 return -1;
43 }
44
45 return 0;
46}
47
48static 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 },
51 { 0, }
52};
53
54static struct pci_driver pci_eisa_driver = {
55 .name = "pci_eisa",
56 .id_table = pci_eisa_pci_tbl,
57 .probe = pci_eisa_init,
58};
59
60static int __init pci_eisa_init_module (void)
61{
62 return pci_register_driver (&pci_eisa_driver);
63}
64
65device_initcall(pci_eisa_init_module);
66MODULE_DEVICE_TABLE(pci, pci_eisa_pci_tbl);