Changeset View
Changeset View
Standalone View
Standalone View
sys/isa/isa_common.c
Show First 20 Lines • Show All 67 Lines • ▼ Show 20 Lines | |||||
#include <sys/systm.h> | #include <sys/systm.h> | ||||
#include <sys/kernel.h> | #include <sys/kernel.h> | ||||
#include <sys/bus.h> | #include <sys/bus.h> | ||||
#include <sys/endian.h> | #include <sys/endian.h> | ||||
#include <sys/malloc.h> | #include <sys/malloc.h> | ||||
#include <sys/module.h> | #include <sys/module.h> | ||||
#include <machine/bus.h> | #include <machine/bus.h> | ||||
#include <sys/rman.h> | #include <sys/rman.h> | ||||
#include <sys/sbuf.h> | |||||
#include <sys/sysctl.h> | #include <sys/sysctl.h> | ||||
#include <machine/resource.h> | #include <machine/resource.h> | ||||
#include <isa/isavar.h> | #include <isa/isavar.h> | ||||
#include <isa/isa_common.h> | #include <isa/isa_common.h> | ||||
static int isa_print_child(device_t bus, device_t dev); | static int isa_print_child(device_t bus, device_t dev); | ||||
▲ Show 20 Lines • Show All 943 Lines • ▼ Show 20 Lines | while (ids && ids->ip_id) { | ||||
} | } | ||||
ids++; | ids++; | ||||
} | } | ||||
return (ENXIO); | return (ENXIO); | ||||
} | } | ||||
static int | static int | ||||
isa_child_pnpinfo_str(device_t bus, device_t child, char *buf, | isa_child_pnpinfo(device_t bus, device_t child, struct sbuf *sb) | ||||
size_t buflen) | |||||
{ | { | ||||
struct isa_device *idev = DEVTOISA(child); | struct isa_device *idev = DEVTOISA(child); | ||||
if (idev->id_vendorid) | if (idev->id_vendorid) | ||||
snprintf(buf, buflen, "pnpid=%s", | sbuf_printf(sb, "pnpid=%s", | ||||
pnp_eisaformat(idev->id_vendorid)); | pnp_eisaformat(idev->id_vendorid)); | ||||
return (0); | return (0); | ||||
} | } | ||||
static int | static int | ||||
isa_child_location_str(device_t bus, device_t child, char *buf, | isa_child_location(device_t bus, device_t child, struct sbuf *sb) | ||||
size_t buflen) | |||||
{ | { | ||||
#if 0 | #if 0 | ||||
/* id_pnphandle isn't there yet */ | /* id_pnphandle isn't there yet */ | ||||
struct isa_device *idev = DEVTOISA(child); | struct isa_device *idev = DEVTOISA(child); | ||||
if (idev->id_vendorid) | if (idev->id_vendorid) | ||||
snprintf(buf, buflen, "pnphandle=%d", idev->id_pnphandle); | sbuf_printf(sbuf, "pnphandle=%d", idev->id_pnphandle); | ||||
#endif | #endif | ||||
/* Nothing here yet */ | |||||
*buf = '\0'; | |||||
return (0); | return (0); | ||||
} | } | ||||
static device_method_t isa_methods[] = { | static device_method_t isa_methods[] = { | ||||
/* Device interface */ | /* Device interface */ | ||||
DEVMETHOD(device_probe, isa_probe), | DEVMETHOD(device_probe, isa_probe), | ||||
DEVMETHOD(device_attach, isa_attach), | DEVMETHOD(device_attach, isa_attach), | ||||
DEVMETHOD(device_detach, bus_generic_detach), | DEVMETHOD(device_detach, bus_generic_detach), | ||||
Show All 15 Lines | static device_method_t isa_methods[] = { | ||||
DEVMETHOD(bus_get_resource_list,isa_get_resource_list), | DEVMETHOD(bus_get_resource_list,isa_get_resource_list), | ||||
DEVMETHOD(bus_alloc_resource, isa_alloc_resource), | DEVMETHOD(bus_alloc_resource, isa_alloc_resource), | ||||
DEVMETHOD(bus_release_resource, isa_release_resource), | DEVMETHOD(bus_release_resource, isa_release_resource), | ||||
DEVMETHOD(bus_set_resource, isa_set_resource), | DEVMETHOD(bus_set_resource, isa_set_resource), | ||||
DEVMETHOD(bus_get_resource, bus_generic_rl_get_resource), | DEVMETHOD(bus_get_resource, bus_generic_rl_get_resource), | ||||
DEVMETHOD(bus_delete_resource, bus_generic_rl_delete_resource), | DEVMETHOD(bus_delete_resource, bus_generic_rl_delete_resource), | ||||
DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), | DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), | ||||
DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), | DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), | ||||
DEVMETHOD(bus_child_pnpinfo_str, isa_child_pnpinfo_str), | DEVMETHOD(bus_child_pnpinfo, isa_child_pnpinfo), | ||||
DEVMETHOD(bus_child_location_str, isa_child_location_str), | DEVMETHOD(bus_child_location, isa_child_location), | ||||
DEVMETHOD(bus_hinted_child, isa_hinted_child), | DEVMETHOD(bus_hinted_child, isa_hinted_child), | ||||
DEVMETHOD(bus_hint_device_unit, isa_hint_device_unit), | DEVMETHOD(bus_hint_device_unit, isa_hint_device_unit), | ||||
/* ISA interface */ | /* ISA interface */ | ||||
DEVMETHOD(isa_add_config, isa_add_config), | DEVMETHOD(isa_add_config, isa_add_config), | ||||
DEVMETHOD(isa_set_config_callback, isa_set_config_callback), | DEVMETHOD(isa_set_config_callback, isa_set_config_callback), | ||||
DEVMETHOD(isa_pnp_probe, isa_pnp_probe), | DEVMETHOD(isa_pnp_probe, isa_pnp_probe), | ||||
▲ Show 20 Lines • Show All 51 Lines • Show Last 20 Lines |