Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/ppc/ppc.c
Show First 20 Lines • Show All 1,668 Lines • ▼ Show 20 Lines | #ifdef __i386__ | ||||
static short next_bios_ppc = 0; | static short next_bios_ppc = 0; | ||||
#ifdef PC98 | #ifdef PC98 | ||||
unsigned int pc98_ieee_mode = 0x00; | unsigned int pc98_ieee_mode = 0x00; | ||||
unsigned int tmp; | unsigned int tmp; | ||||
#endif | #endif | ||||
#endif | #endif | ||||
struct ppc_data *ppc; | struct ppc_data *ppc; | ||||
int error; | int error; | ||||
u_long port; | rman_res_t port; | ||||
/* | /* | ||||
* Allocate the ppc_data structure. | * Allocate the ppc_data structure. | ||||
*/ | */ | ||||
ppc = DEVTOSOFTC(dev); | ppc = DEVTOSOFTC(dev); | ||||
bzero(ppc, sizeof(struct ppc_data)); | bzero(ppc, sizeof(struct ppc_data)); | ||||
ppc->rid_ioport = rid; | ppc->rid_ioport = rid; | ||||
▲ Show 20 Lines • Show All 324 Lines • ▼ Show 20 Lines | |||||
} | } | ||||
/* | /* | ||||
* We allow child devices to allocate an IRQ resource at rid 0 for their | * We allow child devices to allocate an IRQ resource at rid 0 for their | ||||
* interrupt handlers. | * interrupt handlers. | ||||
*/ | */ | ||||
struct resource * | struct resource * | ||||
ppc_alloc_resource(device_t bus, device_t child, int type, int *rid, | ppc_alloc_resource(device_t bus, device_t child, int type, int *rid, | ||||
u_long start, u_long end, u_long count, u_int flags) | rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) | ||||
{ | { | ||||
struct ppc_data *ppc = DEVTOSOFTC(bus); | struct ppc_data *ppc = DEVTOSOFTC(bus); | ||||
switch (type) { | switch (type) { | ||||
case SYS_RES_IRQ: | case SYS_RES_IRQ: | ||||
if (*rid == 0) | if (*rid == 0) | ||||
return (ppc->res_irq); | return (ppc->res_irq); | ||||
break; | break; | ||||
Show All 25 Lines |