aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/eisa/virtual_root.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/virtual_root.c
Linux-2.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/virtual_root.c')
-rw-r--r--drivers/eisa/virtual_root.c75
1 files changed, 75 insertions, 0 deletions
diff --git a/drivers/eisa/virtual_root.c b/drivers/eisa/virtual_root.c
new file mode 100644
index 00000000000..15677f20bd8
--- /dev/null
+++ b/drivers/eisa/virtual_root.c
@@ -0,0 +1,75 @@
1/*
2 * Virtual EISA root driver.
3 * Acts as a placeholder if we don't have a proper EISA bridge.
4 *
5 * (C) 2003 Marc Zyngier <maz@wild-wind.fr.eu.org>
6 *
7 * This code is released under the GPL version 2.
8 */
9
10#include <linux/config.h>
11#include <linux/kernel.h>
12#include <linux/device.h>
13#include <linux/eisa.h>
14#include <linux/module.h>
15#include <linux/moduleparam.h>
16#include <linux/init.h>
17
18#if defined(CONFIG_ALPHA_JENSEN) || defined(CONFIG_EISA_VLB_PRIMING)
19#define EISA_FORCE_PROBE_DEFAULT 1
20#else
21#define EISA_FORCE_PROBE_DEFAULT 0
22#endif
23
24static int force_probe = EISA_FORCE_PROBE_DEFAULT;
25static void virtual_eisa_release (struct device *);
26
27/* The default EISA device parent (virtual root device).
28 * Now use a platform device, since that's the obvious choice. */
29
30static struct platform_device eisa_root_dev = {
31 .name = "eisa",
32 .id = 0,
33 .dev = {
34 .release = virtual_eisa_release,
35 },
36};
37
38static struct eisa_root_device eisa_bus_root = {
39 .dev = &eisa_root_dev.dev,
40 .bus_base_addr = 0,
41 .res = &ioport_resource,
42 .slots = EISA_MAX_SLOTS,
43 .dma_mask = 0xffffffff,
44};
45
46static void virtual_eisa_release (struct device *dev)
47{
48 /* nothing really to do here */
49}
50
51static int virtual_eisa_root_init (void)
52{
53 int r;
54
55 if ((r = platform_device_register (&eisa_root_dev))) {
56 return r;
57 }
58
59 eisa_bus_root.force_probe = force_probe;
60
61 eisa_root_dev.dev.driver_data = &eisa_bus_root;
62
63 if (eisa_root_register (&eisa_bus_root)) {
64 /* A real bridge may have been registered before
65 * us. So quietly unregister. */
66 platform_device_unregister (&eisa_root_dev);
67 return -1;
68 }
69
70 return 0;
71}
72
73module_param (force_probe, int, 0444);
74
75device_initcall (virtual_eisa_root_init);