Changeset View
Changeset View
Standalone View
Standalone View
head/sys/riscv/riscv/nexus.c
Show First 20 Lines • Show All 137 Lines • ▼ Show 20 Lines | nexus_fdt_probe(device_t dev) | ||||
return (BUS_PROBE_DEFAULT); | return (BUS_PROBE_DEFAULT); | ||||
} | } | ||||
static int | static int | ||||
nexus_attach(device_t dev) | nexus_attach(device_t dev) | ||||
{ | { | ||||
mem_rman.rm_start = 0; | mem_rman.rm_start = 0; | ||||
mem_rman.rm_end = ~0ul; | mem_rman.rm_end = BUS_SPACE_MAXADDR; | ||||
mem_rman.rm_type = RMAN_ARRAY; | mem_rman.rm_type = RMAN_ARRAY; | ||||
mem_rman.rm_descr = "I/O memory addresses"; | mem_rman.rm_descr = "I/O memory addresses"; | ||||
if (rman_init(&mem_rman) || rman_manage_region(&mem_rman, 0, ~0)) | if (rman_init(&mem_rman) || | ||||
rman_manage_region(&mem_rman, 0, BUS_SPACE_MAXADDR)) | |||||
panic("nexus_attach mem_rman"); | panic("nexus_attach mem_rman"); | ||||
irq_rman.rm_start = 0; | irq_rman.rm_start = 0; | ||||
irq_rman.rm_end = ~0ul; | irq_rman.rm_end = ~0; | ||||
irq_rman.rm_type = RMAN_ARRAY; | irq_rman.rm_type = RMAN_ARRAY; | ||||
irq_rman.rm_descr = "Interrupts"; | irq_rman.rm_descr = "Interrupts"; | ||||
if (rman_init(&irq_rman) || rman_manage_region(&irq_rman, 0, ~0)) | if (rman_init(&irq_rman) || rman_manage_region(&irq_rman, 0, ~0)) | ||||
panic("nexus_attach irq_rman"); | panic("nexus_attach irq_rman"); | ||||
nexus_add_child(dev, 10, "ofwbus", 0); | nexus_add_child(dev, 10, "ofwbus", 0); | ||||
bus_generic_probe(dev); | bus_generic_probe(dev); | ||||
▲ Show 20 Lines • Show All 227 Lines • Show Last 20 Lines |