Home | History | Annotate | Download | only in bus

Lines Matching refs:isa

7 #include <gpxe/isa.h>
12 * isa.c implements a "classical" port-scanning method of ISA device
23 * The ISA probe address list can be overridden by config.h; if the
56 * Probe an ISA device
58 * @v isa ISA device
61 static int isa_probe ( struct isa_device *isa ) {
64 DBG ( "Trying ISA driver %s at I/O %04x\n",
65 isa->driver->name, isa->ioaddr );
67 if ( ( rc = isa->driver->probe ( isa ) ) != 0 ) {
77 * Remove an ISA device
79 * @v isa ISA device
81 static void isa_remove ( struct isa_device *isa ) {
82 isa->driver->remove ( isa );
83 DBG ( "Removed ISA%04x\n", isa->ioaddr );
87 * Probe ISA root bus
89 * @v rootdev ISA bus root device
91 * Scans the ISA bus for devices and registers all devices it can
95 struct isa_device *isa = NULL;
104 if ( ! isa )
105 isa = malloc ( sizeof ( *isa ) );
106 if ( ! isa ) {
110 memset ( isa, 0, sizeof ( *isa ) );
111 isa->driver = driver;
112 isa->ioaddr = ISA_IOADDR ( driver, ioidx );
115 snprintf ( isa->dev.name, sizeof ( isa->dev.name ),
116 "ISA%04x", isa->ioaddr );
117 isa->dev.desc.bus_type = BUS_TYPE_ISA;
118 isa->dev.desc.vendor = driver->vendor_id;
119 isa->dev.desc.device = driver->prod_id;
120 isa->dev.parent = &rootdev->dev;
121 list_add ( &isa->dev.siblings,
123 INIT_LIST_HEAD ( &isa->dev.children );
126 if ( isa_probe ( isa ) == 0 ) {
128 isa = NULL;
131 list_del ( &isa->dev.siblings );
136 free ( isa );
140 free ( isa );
146 * Remove ISA root bus
148 * @v rootdev ISA bus root device
151 struct isa_device *isa;
154 list_for_each_entry_safe ( isa, tmp, &rootdev->dev.children,
156 isa_remove ( isa );
157 list_del ( &isa->dev.siblings );
158 free ( isa );
162 /** ISA bus root device driver */
168 /** ISA bus root device */
170 .dev = { .name = "ISA" },