Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/mca/mca_bus.c
Context not available. | |||||
rid = 0; | rid = 0; | ||||
while ((rle = resource_list_find(&(m_dev->rl), SYS_RES_IOPORT, rid++))) { | while ((rle = resource_list_find(&(m_dev->rl), SYS_RES_IOPORT, rid++))) { | ||||
if (rle->count == 1) { | if (rle->count == 1) { | ||||
snprintf(buf, sizeof(buf), "%s%lx", | snprintf(buf, sizeof(buf), "%s%jx", | ||||
((rid == 1) ? "io 0x" : "0x"), | ((rid == 1) ? "io 0x" : "0x"), | ||||
rle->start); | rle->start); | ||||
} else { | } else { | ||||
snprintf(buf, sizeof(buf), "%s%lx-0x%lx", | snprintf(buf, sizeof(buf), "%s%jx-0x%jx", | ||||
((rid == 1) ? "io 0x" : "0x"), | ((rid == 1) ? "io 0x" : "0x"), | ||||
rle->start, | rle->start, | ||||
(rle->start + rle->count)); | (rle->start + rle->count)); | ||||
Context not available. | |||||
rid = 0; | rid = 0; | ||||
while ((rle = resource_list_find(&(m_dev->rl), SYS_RES_MEMORY, rid++))) { | while ((rle = resource_list_find(&(m_dev->rl), SYS_RES_MEMORY, rid++))) { | ||||
if (rle->count == 1) { | if (rle->count == 1) { | ||||
snprintf(buf, sizeof(buf), "%s%lx", | snprintf(buf, sizeof(buf), "%s%jx", | ||||
((rid == 1) ? "mem 0x" : "0x"), | ((rid == 1) ? "mem 0x" : "0x"), | ||||
rle->start); | rle->start); | ||||
} else { | } else { | ||||
snprintf(buf, sizeof(buf), "%s%lx-0x%lx", | snprintf(buf, sizeof(buf), "%s%jx-0x%jx", | ||||
((rid == 1) ? "mem 0x" : "0x"), | ((rid == 1) ? "mem 0x" : "0x"), | ||||
rle->start, | rle->start, | ||||
(rle->start + rle->count)); | (rle->start + rle->count)); | ||||
Context not available. | |||||
rid = 0; | rid = 0; | ||||
while ((rle = resource_list_find(&(m_dev->rl), SYS_RES_IRQ, rid++))) { | while ((rle = resource_list_find(&(m_dev->rl), SYS_RES_IRQ, rid++))) { | ||||
snprintf(buf, sizeof(buf), "irq %ld", rle->start); | snprintf(buf, sizeof(buf), "irq %jd", rle->start); | ||||
mca_reg_print(child, buf, | mca_reg_print(child, buf, | ||||
((rid == 1) ? &separator : NULL), &column); | ((rid == 1) ? &separator : NULL), &column); | ||||
} | } | ||||
Context not available. | |||||
rid = 0; | rid = 0; | ||||
while ((rle = resource_list_find(&(m_dev->rl), SYS_RES_DRQ, rid++))) { | while ((rle = resource_list_find(&(m_dev->rl), SYS_RES_DRQ, rid++))) { | ||||
snprintf(buf, sizeof(buf), "drq %lx", rle->start); | snprintf(buf, sizeof(buf), "drq %jx", rle->start); | ||||
mca_reg_print(child, buf, | mca_reg_print(child, buf, | ||||
((rid == 1) ? &separator : NULL), &column); | ((rid == 1) ? &separator : NULL), &column); | ||||
} | } | ||||
Context not available. | |||||
static struct resource * | static struct resource * | ||||
mca_alloc_resource (device_t dev, device_t child, int type, int *rid, | mca_alloc_resource (device_t dev, 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 mca_device * m_dev = device_get_ivars(child); | struct mca_device * m_dev = device_get_ivars(child); | ||||
struct resource_list_entry * rle; | struct resource_list_entry * rle; | ||||
Context not available. | |||||
int isdefault; | int isdefault; | ||||
int passthrough; | int passthrough; | ||||
isdefault = (start == 0UL && end == ~0UL); | isdefault = (start == 0 && end == ~0); | ||||
passthrough = (device_get_parent(child) != dev); | passthrough = (device_get_parent(child) != dev); | ||||
if (!passthrough && !isdefault) { | if (!passthrough && !isdefault) { | ||||
Context not available. |