isa_common.c (09aafea1c6836ca1eeb8bd739f5420b68d6476e0) | isa_common.c (812fb8f2940d843b74a71afd8525a799ef30dcd6) |
---|---|
1/*- 2 * Copyright (c) 1999 Doug Rabson 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 67 unchanged lines hidden (view full) --- 76#ifdef __alpha__ /* XXX workaround a stupid warning */ 77#include <alpha/isa/isavar.h> 78#endif 79 80static int isa_print_child(device_t bus, device_t dev); 81 82static MALLOC_DEFINE(M_ISADEV, "isadev", "ISA device"); 83 | 1/*- 2 * Copyright (c) 1999 Doug Rabson 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 67 unchanged lines hidden (view full) --- 76#ifdef __alpha__ /* XXX workaround a stupid warning */ 77#include <alpha/isa/isavar.h> 78#endif 79 80static int isa_print_child(device_t bus, device_t dev); 81 82static MALLOC_DEFINE(M_ISADEV, "isadev", "ISA device"); 83 |
84static devclass_t isa_devclass; | |
85static int isa_running; 86 87/* 88 * At 'probe' time, we add all the devices which we know about to the 89 * bus. The generic attach routine will probe and attach them if they 90 * are alive. 91 */ 92static int --- 999 unchanged lines hidden (view full) --- 1092 /* ISA interface */ 1093 DEVMETHOD(isa_add_config, isa_add_config), 1094 DEVMETHOD(isa_set_config_callback, isa_set_config_callback), 1095 DEVMETHOD(isa_pnp_probe, isa_pnp_probe), 1096 1097 { 0, 0 } 1098}; 1099 | 84static int isa_running; 85 86/* 87 * At 'probe' time, we add all the devices which we know about to the 88 * bus. The generic attach routine will probe and attach them if they 89 * are alive. 90 */ 91static int --- 999 unchanged lines hidden (view full) --- 1091 /* ISA interface */ 1092 DEVMETHOD(isa_add_config, isa_add_config), 1093 DEVMETHOD(isa_set_config_callback, isa_set_config_callback), 1094 DEVMETHOD(isa_pnp_probe, isa_pnp_probe), 1095 1096 { 0, 0 } 1097}; 1098 |
1100static driver_t isa_driver = { | 1099driver_t isa_driver = { |
1101 "isa", 1102 isa_methods, 1103 1, /* no softc */ 1104}; 1105 | 1100 "isa", 1101 isa_methods, 1102 1, /* no softc */ 1103}; 1104 |
1105devclass_t isa_devclass; 1106 |
|
1106/* | 1107/* |
1107 * ISA can be attached to a PCI-ISA bridge or directly to the legacy device. | 1108 * ISA can be attached to a PCI-ISA bridge, or other locations on some 1109 * platforms. |
1108 */ 1109DRIVER_MODULE(isa, isab, isa_driver, isa_devclass, 0, 0); 1110DRIVER_MODULE(isa, eisab, isa_driver, isa_devclass, 0, 0); | 1110 */ 1111DRIVER_MODULE(isa, isab, isa_driver, isa_devclass, 0, 0); 1112DRIVER_MODULE(isa, eisab, isa_driver, isa_devclass, 0, 0); |
1111#if defined(__i386__) || defined(__amd64__) 1112DRIVER_MODULE(isa, legacy, isa_driver, isa_devclass, 0, 0); 1113#endif | |
1114MODULE_VERSION(isa, 1); 1115 1116/* 1117 * Code common to ISA bridges. 1118 */ 1119 1120devclass_t isab_devclass; 1121 1122int 1123isab_attach(device_t dev) 1124{ 1125 device_t child; 1126 1127 child = device_add_child(dev, "isa", 0); 1128 if (child != NULL) 1129 return (bus_generic_attach(dev)); 1130 return (ENXIO); 1131} | 1113MODULE_VERSION(isa, 1); 1114 1115/* 1116 * Code common to ISA bridges. 1117 */ 1118 1119devclass_t isab_devclass; 1120 1121int 1122isab_attach(device_t dev) 1123{ 1124 device_t child; 1125 1126 child = device_add_child(dev, "isa", 0); 1127 if (child != NULL) 1128 return (bus_generic_attach(dev)); 1129 return (ENXIO); 1130} |