- Add suport for the bus_get_resource() device interface method to
central(4) and fhc(4) by using bus_generic_rl_get_resource(). - Remove some superfluous breaks in central.c
This commit is contained in:
parent
6059b9e1fd
commit
6283ced1e2
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=146398
@ -88,6 +88,7 @@ static device_method_t central_methods[] = {
|
||||
DEVMETHOD(bus_activate_resource, bus_generic_activate_resource),
|
||||
DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource),
|
||||
DEVMETHOD(bus_get_resource_list, central_get_resource_list),
|
||||
DEVMETHOD(bus_get_resource, bus_generic_rl_get_resource),
|
||||
|
||||
/* ofw_bus interface */
|
||||
DEVMETHOD(ofw_bus_get_compat, central_get_compat),
|
||||
@ -234,7 +235,6 @@ central_alloc_resource(device_t bus, device_t child, int type, int *rid,
|
||||
case SYS_RES_IRQ:
|
||||
return (resource_list_alloc(rl, bus, child, type, rid, start,
|
||||
end, count, flags));
|
||||
break;
|
||||
case SYS_RES_MEMORY:
|
||||
if (!passthrough) {
|
||||
rle = resource_list_find(rl, type, *rid);
|
||||
@ -265,8 +265,6 @@ central_alloc_resource(device_t bus, device_t child, int type, int *rid,
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return (res);
|
||||
}
|
||||
|
@ -62,6 +62,7 @@ static device_method_t fhc_central_methods[] = {
|
||||
DEVMETHOD(bus_activate_resource, bus_generic_activate_resource),
|
||||
DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource),
|
||||
DEVMETHOD(bus_get_resource_list, fhc_get_resource_list),
|
||||
DEVMETHOD(bus_get_resource, bus_generic_rl_get_resource),
|
||||
|
||||
/* ofw_bus interface */
|
||||
DEVMETHOD(ofw_bus_get_compat, fhc_get_compat),
|
||||
|
@ -65,6 +65,7 @@ static device_method_t fhc_nexus_methods[] = {
|
||||
DEVMETHOD(bus_activate_resource, bus_generic_activate_resource),
|
||||
DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource),
|
||||
DEVMETHOD(bus_get_resource_list, fhc_get_resource_list),
|
||||
DEVMETHOD(bus_get_resource, bus_generic_rl_get_resource),
|
||||
|
||||
/* ofw_bus interface */
|
||||
DEVMETHOD(ofw_bus_get_compat, fhc_get_compat),
|
||||
|
Loading…
Reference in New Issue
Block a user