Add alloc/release resource. Need to connect functionality later.
This commit is contained in:
parent
57a40e9ee7
commit
d617612c2b
@ -1350,7 +1350,7 @@ int pcic_setup_intr(device_t dev, device_t child, struct resource *irqres,
|
||||
|
||||
h->ih_irq = irq;
|
||||
|
||||
printf("card irq %d\n",irq);
|
||||
device_printf(dev, "card irq %d\n", irq);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -1370,3 +1370,17 @@ int pcic_teardown_intr(device_t dev, device_t child, struct resource *irq,
|
||||
return (bus_generic_teardown_intr(device_get_parent(dev), child, irq,
|
||||
cookiep));
|
||||
}
|
||||
|
||||
int pcic_alloc_resource(device_t dev, device_t child, int type, int *rid,
|
||||
u_long start, u_long end, u_long count, u_int flags)
|
||||
{
|
||||
return bus_generic_alloc_resource(dev, child, type, rid, start, end,
|
||||
count, flags);
|
||||
}
|
||||
|
||||
int pcic_release_resource(device_t dev, device_t child, int type, int rid,
|
||||
struct resource *r)
|
||||
{
|
||||
return bus_generic_release_resource(dev, child, type, rid, r);
|
||||
}
|
||||
|
||||
|
@ -371,6 +371,8 @@ static device_method_t pcic_isa_methods[] = {
|
||||
|
||||
/* Bus Interface */
|
||||
DEVMETHOD(bus_driver_added, bus_generic_driver_added),
|
||||
DEVMETHOD(bus_alloc_resource, pcic_alloc_resource),
|
||||
DEVMETHOD(bus_release_resource, pcic_release_resource),
|
||||
DEVMETHOD(bus_activate_resource, pcic_activate_resource),
|
||||
DEVMETHOD(bus_deactivate_resource, pcic_deactivate_resource),
|
||||
DEVMETHOD(bus_setup_intr, pcic_setup_intr),
|
||||
|
@ -202,8 +202,12 @@ pcic_write(h, idx, data)
|
||||
*/
|
||||
int pcic_activate_resource(device_t dev, device_t child, int type, int rid,
|
||||
struct resource *r);
|
||||
int pcic_alloc_resource(device_t dev, device_t child, int type, int *rid,
|
||||
u_long start, u_long end, u_long count, u_int flags);
|
||||
int pcic_deactivate_resource(device_t dev, device_t child, int type, int rid,
|
||||
struct resource *r);
|
||||
int pcic_release_resource(device_t dev, device_t child, int type, int rid,
|
||||
struct resource *r);
|
||||
int pcic_setup_intr(device_t dev, device_t child, struct resource *irq,
|
||||
int flags, driver_intr_t intr, void *arg, void **cookiep);
|
||||
int pcic_teardown_intr(device_t dev, device_t child, struct resource *irq,
|
||||
|
Loading…
Reference in New Issue
Block a user