Changeset View
Changeset View
Standalone View
Standalone View
head/sys/mips/nlm/xlp_simplebus.c
Show First 20 Lines • Show All 203 Lines • ▼ Show 20 Lines | if (type == SYS_RES_MEMORY) { | ||||
end -= sc->ranges[j].bus; | end -= sc->ranges[j].bus; | ||||
end += sc->ranges[j].host; | end += sc->ranges[j].host; | ||||
break; | break; | ||||
} | } | ||||
} | } | ||||
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); | ||||
} | } | ||||
} | } | ||||
} | } | ||||
switch (type) { | switch (type) { | ||||
case SYS_RES_IRQ: | case SYS_RES_IRQ: | ||||
rm = &irq_rman; | rm = &irq_rman; | ||||
break; | break; | ||||
Show All 9 Lines | if (start >= GBU_MEM_BASE && end <= GBU_MEM_LIMIT) { | ||||
rm = &pci_ecfg_rman; | rm = &pci_ecfg_rman; | ||||
bustag = rmi_uart_bus_space; | bustag = rmi_uart_bus_space; | ||||
} else if (start >= PCIE_MEM_BASE && end <= PCIE_MEM_LIMIT) { | } else if (start >= PCIE_MEM_BASE && end <= PCIE_MEM_LIMIT) { | ||||
rm = &mem_rman; | rm = &mem_rman; | ||||
bustag = rmi_bus_space; | bustag = rmi_bus_space; | ||||
} 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; | ||||
default: | default: | ||||
return (NULL); | return (NULL); | ||||
} | } | ||||
rv = rman_reserve_resource(rm, start, end, count, flags, child); | rv = rman_reserve_resource(rm, start, end, count, flags, child); | ||||
▲ Show 20 Lines • Show All 68 Lines • Show Last 20 Lines |