Exemplo n.º 1
0
static int
nexus_attach(device_t dev)
{

	mem_rman.rm_start = 0;
	mem_rman.rm_end = BUS_SPACE_MAXADDR;
	mem_rman.rm_type = RMAN_ARRAY;
	mem_rman.rm_descr = "I/O memory addresses";
	if (rman_init(&mem_rman) ||
	    rman_manage_region(&mem_rman, 0, BUS_SPACE_MAXADDR))
		panic("nexus_attach mem_rman");
	irq_rman.rm_start = 0;
	irq_rman.rm_end = ~0;
	irq_rman.rm_type = RMAN_ARRAY;
	irq_rman.rm_descr = "Interrupts";
	if (rman_init(&irq_rman) || rman_manage_region(&irq_rman, 0, ~0))
		panic("nexus_attach irq_rman");

	nexus_add_child(dev, 8, "timer", 0);
	nexus_add_child(dev, 9, "rcons", 0);
	nexus_add_child(dev, 10, "ofwbus", 0);

	bus_generic_probe(dev);
	bus_generic_attach(dev);

	return (0);
}
Exemplo n.º 2
0
static int
nexus_acpi_attach(device_t dev)
{

	nexus_add_child(dev, 10, "acpi", 0);
	return (nexus_attach(dev));
}
Exemplo n.º 3
0
static int
nexus_fdt_attach(device_t dev)
{

	nexus_add_child(dev, 10, "ofwbus", 0);
	return (nexus_attach(dev));
}