2 * Virtual EISA root driver.
3 * Acts as a placeholder if we don't have a proper EISA bridge.
5 * (C) 2003 Marc Zyngier <maz@wild-wind.fr.eu.org>
7 * This code is released under the GPL version 2.
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>
18 #if defined(CONFIG_ALPHA_JENSEN) || defined(CONFIG_EISA_VLB_PRIMING)
19 #define EISA_FORCE_PROBE_DEFAULT 1
21 #define EISA_FORCE_PROBE_DEFAULT 0
24 static int force_probe
= EISA_FORCE_PROBE_DEFAULT
;
25 static void virtual_eisa_release (struct device
*);
27 /* The default EISA device parent (virtual root device).
28 * Now use a platform device, since that's the obvious choice. */
30 static struct platform_device eisa_root_dev
= {
34 .release
= virtual_eisa_release
,
38 static struct eisa_root_device eisa_bus_root
= {
39 .dev
= &eisa_root_dev
.dev
,
41 .res
= &ioport_resource
,
42 .slots
= EISA_MAX_SLOTS
,
43 .dma_mask
= 0xffffffff,
46 static void virtual_eisa_release (struct device
*dev
)
48 /* nothing really to do here */
51 static int virtual_eisa_root_init (void)
55 if ((r
= platform_device_register (&eisa_root_dev
))) {
59 eisa_bus_root
.force_probe
= force_probe
;
61 eisa_root_dev
.dev
.driver_data
= &eisa_bus_root
;
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
);
73 module_param (force_probe
, int, 0444);
75 device_initcall (virtual_eisa_root_init
);