Changeset View
Changeset View
Standalone View
Standalone View
sys/mips/nlm/xlp_simplebus.c
Context not available. | |||||
*/ | */ | ||||
static int xlp_simplebus_probe(device_t dev); | static int xlp_simplebus_probe(device_t dev); | ||||
static struct resource *xlp_simplebus_alloc_resource(device_t, device_t, int, | static struct resource *xlp_simplebus_alloc_resource(device_t, device_t, int, | ||||
int *, u_long, u_long, u_long, u_int); | int *, rman_res_t, rman_res_t, rman_res_t, u_int); | ||||
static int xlp_simplebus_activate_resource(device_t, device_t, int, | static int xlp_simplebus_activate_resource(device_t, device_t, int, | ||||
int, struct resource *); | int, struct resource *); | ||||
static int xlp_simplebus_setup_intr(device_t, device_t, | static int xlp_simplebus_setup_intr(device_t, device_t, | ||||
Context not available. | |||||
panic("xlp_simplebus_init_resources irq_rman"); | panic("xlp_simplebus_init_resources irq_rman"); | ||||
port_rman.rm_start = 0; | port_rman.rm_start = 0; | ||||
port_rman.rm_end = ~0ul; | port_rman.rm_end = ~0; | ||||
port_rman.rm_type = RMAN_ARRAY; | port_rman.rm_type = RMAN_ARRAY; | ||||
port_rman.rm_descr = "I/O ports"; | port_rman.rm_descr = "I/O ports"; | ||||
if (rman_init(&port_rman) | if (rman_init(&port_rman) | ||||
Context not available. | |||||
panic("xlp_simplebus_init_resources port_rman"); | panic("xlp_simplebus_init_resources port_rman"); | ||||
mem_rman.rm_start = 0; | mem_rman.rm_start = 0; | ||||
mem_rman.rm_end = ~0ul; | mem_rman.rm_end = ~0; | ||||
mem_rman.rm_type = RMAN_ARRAY; | mem_rman.rm_type = RMAN_ARRAY; | ||||
mem_rman.rm_descr = "I/O memory"; | mem_rman.rm_descr = "I/O memory"; | ||||
if (rman_init(&mem_rman) | if (rman_init(&mem_rman) | ||||
Context not available. | |||||
panic("xlp_simplebus_init_resources mem_rman"); | panic("xlp_simplebus_init_resources mem_rman"); | ||||
pci_ecfg_rman.rm_start = 0; | pci_ecfg_rman.rm_start = 0; | ||||
pci_ecfg_rman.rm_end = ~0ul; | pci_ecfg_rman.rm_end = ~0; | ||||
pci_ecfg_rman.rm_type = RMAN_ARRAY; | pci_ecfg_rman.rm_type = RMAN_ARRAY; | ||||
pci_ecfg_rman.rm_descr = "PCI ECFG IO"; | pci_ecfg_rman.rm_descr = "PCI ECFG IO"; | ||||
if (rman_init(&pci_ecfg_rman) || rman_manage_region(&pci_ecfg_rman, | if (rman_init(&pci_ecfg_rman) || rman_manage_region(&pci_ecfg_rman, | ||||
Context not available. | |||||
panic("xlp_simplebus_init_resources pci_ecfg_rman"); | panic("xlp_simplebus_init_resources pci_ecfg_rman"); | ||||
gbu_rman.rm_start = 0; | gbu_rman.rm_start = 0; | ||||
gbu_rman.rm_end = ~0ul; | gbu_rman.rm_end = ~0; | ||||
gbu_rman.rm_type = RMAN_ARRAY; | gbu_rman.rm_type = RMAN_ARRAY; | ||||
gbu_rman.rm_descr = "Flash region"; | gbu_rman.rm_descr = "Flash region"; | ||||
if (rman_init(&gbu_rman) | if (rman_init(&gbu_rman) | ||||
Context not available. | |||||
static struct resource * | static struct resource * | ||||
xlp_simplebus_alloc_resource(device_t bus, device_t child, int type, int *rid, | xlp_simplebus_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 rman *rm; | struct rman *rm; | ||||
struct resource *rv; | struct resource *rv; | ||||
Context not available. | |||||
bustag = NULL; | bustag = NULL; | ||||
if (!passthrough) { | if (!passthrough) { | ||||
isdefault = (start == 0UL && end == ~0UL); | isdefault = (start == 0 && end == ~0); | ||||
if (isdefault) { | if (isdefault) { | ||||
rle = resource_list_find(&di->rl, type, *rid); | rle = resource_list_find(&di->rl, type, *rid); | ||||
if (rle == NULL) | if (rle == NULL) | ||||
Context not available. | |||||
if (j == sc->nranges && sc->nranges != 0) { | if (j == sc->nranges && sc->nranges != 0) { | ||||
if (bootverbose) | if (bootverbose) | ||||
device_printf(bus, "Could not map resource " | device_printf(bus, "Could not map resource " | ||||
"%#lx-%#lx\n", start, end); | "%#jx-%#jx\n", start, end); | ||||
return (NULL); | return (NULL); | ||||
} | } | ||||
} | } | ||||
Context not available. | |||||
} else { | } else { | ||||
if (bootverbose) | if (bootverbose) | ||||
device_printf(bus, "Invalid MEM range" | device_printf(bus, "Invalid MEM range" | ||||
"%#lx-%#lx\n", start, end); | "%#jx-%#jx\n", start, end); | ||||
return (NULL); | return (NULL); | ||||
} | } | ||||
break; | break; | ||||
Context not available. |