void * iyonix_pci_intr_establish(void *v, pci_intr_handle_t ih, int ipl, int (*func)(void *), void *arg) { return (i80321_intr_establish(ih, ipl, func, arg)); }
void com_obio_attach(device_t parent, device_t self, void *aux) { struct obio_attach_args *oba = aux; struct com_obio_softc *osc = device_private(self); struct com_softc *sc = &osc->sc_com; bus_space_handle_t ioh; int error; sc->sc_dev = self; sc->sc_frequency = COM_FREQ; sc->sc_hwflags = COM_HW_NO_TXPRELOAD; error = bus_space_map(oba->oba_st, oba->oba_addr, 8, 0, &ioh); if (error) { aprint_error(": failed to map registers: %d\n", error); return; } COM_INIT_REGS(sc->sc_regs, oba->oba_st, ioh, oba->oba_addr); com_attach_subr(sc); osc->sc_ih = i80321_intr_establish(oba->oba_irq, IPL_SERIAL, comintr, sc); if (osc->sc_ih == NULL) aprint_error_dev(self, "unable to establish interrupt at irq %d\n", oba->oba_irq); }
void * hdlg_pci_intr_establish(void *v, pci_intr_handle_t ih, int ipl, int (*func)(void *), void *arg) { return i80321_intr_establish(ih, ipl, func, arg); }
void * iq80321_pci_intr_establish(void *v, pci_intr_handle_t ih, int ipl, int (*func)(void *), void *arg, const char *name) { return (i80321_intr_establish(ih, ipl, func, arg, name)); }
static void btn_obio_attach(device_t parent, device_t self, void *aux) { struct obio_attach_args *oba = aux; struct btn_obio_softc *sc = device_private(self); int error; sc->sc_dev = self; sc->sc_iot = oba->oba_st; error = bus_space_map(sc->sc_iot, oba->oba_addr, 1, 0, &sc->sc_ioh); if (error) { aprint_error(": failed to map registers: %d\n", error); return; } sysmon_power_settype("landisk"); sysmon_task_queue_init(); /* power switch */ sc->sc_smpsw[0].smpsw_name = device_xname(self); sc->sc_smpsw[0].smpsw_type = PSWITCH_TYPE_POWER; if (sysmon_pswitch_register(&sc->sc_smpsw[0]) != 0) { aprint_error(": unable to register power button with sysmon\n"); return; } sc->sc_mask |= BTNSTAT_POWER; hdlg_enable_pldintr(INTEN_PWRSW); /* reset button */ sc->sc_smpsw[1].smpsw_name = device_xname(self); sc->sc_smpsw[1].smpsw_type = PSWITCH_TYPE_RESET; if (sysmon_pswitch_register(&sc->sc_smpsw[1]) != 0) { aprint_error(": unable to register reset button with sysmon\n"); return; } sc->sc_mask |= BTNSTAT_RESET; sc->sc_ih = i80321_intr_establish(oba->oba_irq, IPL_TTY, btn_intr, sc); if (sc->sc_ih == NULL) { aprint_error(": couldn't establish intr handler"); return; } hdlg_enable_pldintr(INTEN_BUTTON); aprint_normal("\n"); }