Changeset View
Changeset View
Standalone View
Standalone View
sys/isa/isa_common.c
Show First 20 Lines • Show All 42 Lines • ▼ Show 20 Lines | |||||
struct resource_list *rl = &idev->id_resources; | struct resource_list *rl = &idev->id_resources; | ||||
struct resource_list_entry *rle; | struct resource_list_entry *rle; | ||||
int rid; | int rid; | ||||
STAILQ_FOREACH(rle, rl, link) { | STAILQ_FOREACH(rle, rl, link) { | ||||
if (!rle->res) { | if (!rle->res) { | ||||
rid = rle->rid; | rid = rle->rid; | ||||
resource_list_alloc(rl, dev, child, rle->type, &rid, | resource_list_alloc(rl, dev, child, rle->type, &rid, | ||||
0ul, ~0ul, 1, 0); | 0, ~0, 1, 0); | ||||
} | } | ||||
} | } | ||||
} | } | ||||
/* | /* | ||||
* Called after other devices have initialised to probe for isa devices. | * Called after other devices have initialised to probe for isa devices. | ||||
*/ | */ | ||||
void | void | ||||
▲ Show 20 Lines • Show All 84 Lines • ▼ Show 20 Lines | |||||
isa_claim_resources(dev, child); | isa_claim_resources(dev, child); | ||||
} | } | ||||
free(children, M_TEMP); | free(children, M_TEMP); | ||||
} | } | ||||
static int | static int | ||||
isa_set_resource(device_t dev, device_t child, int type, int rid, | isa_set_resource(device_t dev, device_t child, int type, int rid, | ||||
u_long start, u_long count) | rman_res_t start, rman_res_t count) | ||||
{ | { | ||||
struct isa_device* idev = DEVTOISA(child); | struct isa_device* idev = DEVTOISA(child); | ||||
struct resource_list *rl = &idev->id_resources; | struct resource_list *rl = &idev->id_resources; | ||||
if (type != SYS_RES_IOPORT && type != SYS_RES_MEMORY | if (type != SYS_RES_IOPORT && type != SYS_RES_MEMORY | ||||
&& type != SYS_RES_IRQ && type != SYS_RES_DRQ) | && type != SYS_RES_IRQ && type != SYS_RES_DRQ) | ||||
return (EINVAL); | return (EINVAL); | ||||
if (rid < 0) | if (rid < 0) | ||||
▲ Show 20 Lines • Show All 42 Lines • Show Last 20 Lines |