Changeset View
Changeset View
Standalone View
Standalone View
head/sys/mips/rmi/iodi.c
Show First 20 Lines • Show All 128 Lines • ▼ Show 20 Lines | |||||
{ | { | ||||
struct resource *res = malloc(sizeof(*res), M_DEVBUF, M_WAITOK); | struct resource *res = malloc(sizeof(*res), M_DEVBUF, M_WAITOK); | ||||
const char *name = device_get_name(child); | const char *name = device_get_name(child); | ||||
int unit; | int unit; | ||||
#ifdef DEBUG | #ifdef DEBUG | ||||
switch (type) { | switch (type) { | ||||
case SYS_RES_IRQ: | case SYS_RES_IRQ: | ||||
device_printf(bus, "IRQ resource - for %s %lx-%lx\n", | device_printf(bus, "IRQ resource - for %s %jx-%jx\n", | ||||
device_get_nameunit(child), start, end); | device_get_nameunit(child), start, end); | ||||
break; | break; | ||||
case SYS_RES_IOPORT: | case SYS_RES_IOPORT: | ||||
device_printf(bus, "IOPORT resource - for %s %lx-%lx\n", | device_printf(bus, "IOPORT resource - for %s %jx-%jx\n", | ||||
device_get_nameunit(child), start, end); | device_get_nameunit(child), start, end); | ||||
break; | break; | ||||
case SYS_RES_MEMORY: | case SYS_RES_MEMORY: | ||||
device_printf(bus, "MEMORY resource - for %s %lx-%lx\n", | device_printf(bus, "MEMORY resource - for %s %jx-%jx\n", | ||||
device_get_nameunit(child), start, end); | device_get_nameunit(child), start, end); | ||||
break; | break; | ||||
} | } | ||||
#endif | #endif | ||||
if (strcmp(name, "uart") == 0) { | if (strcmp(name, "uart") == 0) { | ||||
if ((unit = device_get_unit(child)) == 0) { /* uart 0 */ | if ((unit = device_get_unit(child)) == 0) { /* uart 0 */ | ||||
res->r_bushandle = (xlr_io_base + XLR_IO_UART_0_OFFSET); | res->r_bushandle = (xlr_io_base + XLR_IO_UART_0_OFFSET); | ||||
▲ Show 20 Lines • Show All 120 Lines • Show Last 20 Lines |