Changeset View
Changeset View
Standalone View
Standalone View
sys/mips/mediatek/mtk_intr_v1.c
Show First 20 Lines • Show All 195 Lines • ▼ Show 20 Lines | if (mtk_pic_register_isrcs(sc) != 0) { | ||||
device_printf(dev, "could not register PIC ISRCs\n"); | device_printf(dev, "could not register PIC ISRCs\n"); | ||||
goto cleanup; | goto cleanup; | ||||
} | } | ||||
/* | /* | ||||
* Now, when everything is initialized, it's right time to | * Now, when everything is initialized, it's right time to | ||||
* register interrupt controller to interrupt framefork. | * register interrupt controller to interrupt framefork. | ||||
*/ | */ | ||||
if (intr_pic_register(dev, xref) != 0) { | if (intr_pic_register(dev, xref, sc->nirqs, sc->nirqs) != 0) { | ||||
device_printf(dev, "could not register PIC\n"); | device_printf(dev, "could not register PIC\n"); | ||||
goto cleanup; | goto cleanup; | ||||
} | } | ||||
if (bus_setup_intr(dev, sc->pic_res[1], INTR_TYPE_CLK, | if (bus_setup_intr(dev, sc->pic_res[1], INTR_TYPE_CLK, | ||||
mtk_pic_intr, NULL, sc, &sc->pic_intrhand)) { | mtk_pic_intr, NULL, sc, &sc->pic_intrhand)) { | ||||
device_printf(dev, "could not setup irq handler\n"); | device_printf(dev, "could not setup irq handler\n"); | ||||
intr_pic_deregister(dev, xref); | intr_pic_deregister(dev, xref); | ||||
▲ Show 20 Lines • Show All 145 Lines • Show Last 20 Lines |