Changeset View
Changeset View
Standalone View
Standalone View
head/sys/dev/fdt/simplebus.c
Show First 20 Lines • Show All 245 Lines • ▼ Show 20 Lines | simplebus_setup_dinfo(device_t dev, phandle_t node, | ||||
if (ofw_bus_gen_setup_devinfo(&ndi->obdinfo, node) != 0) { | if (ofw_bus_gen_setup_devinfo(&ndi->obdinfo, node) != 0) { | ||||
if (di == NULL) | if (di == NULL) | ||||
free(ndi, M_DEVBUF); | free(ndi, M_DEVBUF); | ||||
return (NULL); | return (NULL); | ||||
} | } | ||||
resource_list_init(&ndi->rl); | resource_list_init(&ndi->rl); | ||||
ofw_bus_reg_to_rl(dev, node, sc->acells, sc->scells, &ndi->rl); | ofw_bus_reg_to_rl(dev, node, sc->acells, sc->scells, &ndi->rl); | ||||
#ifndef INTRNG | |||||
ofw_bus_intr_to_rl(dev, node, &ndi->rl, NULL); | ofw_bus_intr_to_rl(dev, node, &ndi->rl, NULL); | ||||
#endif | |||||
return (ndi); | return (ndi); | ||||
} | } | ||||
device_t | device_t | ||||
simplebus_add_device(device_t dev, phandle_t node, u_int order, | simplebus_add_device(device_t dev, phandle_t node, u_int order, | ||||
const char *name, int unit, struct simplebus_devinfo *di) | const char *name, int unit, struct simplebus_devinfo *di) | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 167 Lines • Show Last 20 Lines |