void * jensenio_eisa_intr_establish(void *v, int irq, int type, int level, int (*fn)(void *), void *arg) { void *cookie; if (irq >= JENSEN_MAX_IRQ || type == IST_NONE) panic("jensenio_eisa_intr_establish: bogus irq or type"); if (jensenio_intr_deftype[irq] == IST_UNUSABLE) { printf("jensenio_eisa_intr_establish: IRQ %d not usable\n", irq); return (NULL); } cookie = alpha_shared_intr_establish(jensenio_eisa_intr, irq, type, level, fn, arg, "eisa irq"); if (cookie != NULL && alpha_shared_intr_firstactive(jensenio_eisa_intr, irq)) { scb_set(0x800 + SCB_IDXTOVEC(irq), jensenio_iointr, NULL, level); jensenio_setlevel(irq, alpha_shared_intr_get_sharetype(jensenio_eisa_intr, irq) == IST_LEVEL); jensenio_enable_intr(irq, 1); } return (cookie); }
void * dec_550_intr_establish(void *ccv, pci_intr_handle_t ih, int level, int (*func)(void *), void *arg) { #if 0 struct cia_config *ccp = ccv; #endif void *cookie; #if NSIO if (DEC_550_LINE_IS_ISA(ih)) return (sio_intr_establish(NULL /*XXX*/, DEC_550_LINE_ISA_IRQ(ih), IST_LEVEL, level, func, arg)); #endif if (ih >= DEC_550_MAX_IRQ) panic("dec_550_intr_establish: bogus dec 550 IRQ 0x%lx", ih); cookie = alpha_shared_intr_establish(dec_550_pci_intr, ih, IST_LEVEL, level, func, arg, "dec 550 irq"); if (cookie != NULL && alpha_shared_intr_firstactive(dec_550_pci_intr, ih)) { scb_set(0x900 + SCB_IDXTOVEC(ih), dec_550_iointr, NULL, level); dec_550_intr_enable(ih); } return (cookie); }
void com_jensenio_attach(device_t parent, device_t self, void *aux) { struct com_jensenio_softc *jsc = device_private(self); struct com_softc *sc = &jsc->sc_com; struct jensenio_attach_args *ja = aux; bus_space_handle_t ioh; sc->sc_dev = self; if (com_is_console(ja->ja_iot, ja->ja_ioaddr, &ioh) == 0 && bus_space_map(ja->ja_iot, ja->ja_ioaddr, COM_NPORTS, 0, &ioh) != 0) { aprint_error(": can't map i/o space\n"); return; } COM_INIT_REGS(sc->sc_regs, ja->ja_iot, ioh, ja->ja_ioaddr); sc->sc_frequency = COM_FREQ; com_attach_subr(sc); scb_set(ja->ja_irq[0], com_jensenio_intr, sc, IPL_VM); aprint_normal_dev(self, "interrupting at vector 0x%x\n", ja->ja_irq[0]); sprintf(jsc->sc_vecstr, "0x%x", ja->ja_irq[0]); evcnt_attach_dynamic(&jsc->sc_ev_intr, EVCNT_TYPE_INTR, NULL, "vector", jsc->sc_vecstr); if (!pmf_device_register1(self, com_suspend, com_resume, com_cleanup)) { aprint_error_dev(self, "could not establish shutdown hook"); } }
void * dec_eb66_intr_establish(void *lcv, pci_intr_handle_t ih, int level, int (*func)(void *), void *arg) { void *cookie; if (ih >= EB66_MAX_IRQ) panic("dec_eb66_intr_establish: bogus eb66 IRQ 0x%lx", ih); cookie = alpha_shared_intr_establish(eb66_pci_intr, ih, IST_LEVEL, level, func, arg, "eb66 irq"); if (cookie != NULL && alpha_shared_intr_firstactive(eb66_pci_intr, ih)) { scb_set(0x900 + SCB_IDXTOVEC(ih), eb66_iointr, NULL, level); eb66_intr_enable(ih); } return (cookie); }
void * sio_intr_establish(void *v, int irq, int type, int level, int (*fn)(void *), void *arg) { void *cookie; if (irq > ICU_LEN || type == IST_NONE) panic("sio_intr_establish: bogus irq or type"); cookie = alpha_shared_intr_establish(sio_intr, irq, type, level, fn, arg, "isa irq"); if (cookie != NULL && alpha_shared_intr_firstactive(sio_intr, irq)) { scb_set(0x800 + SCB_IDXTOVEC(irq), sio_iointr, NULL, level); sio_setirqstat(irq, 1, alpha_shared_intr_get_sharetype(sio_intr, irq)); } return (cookie); }
void * dec_eb164_intr_establish(void *ccv, pci_intr_handle_t ih, int level, int (*func)(void *), void *arg) { #if 0 struct cia_config *ccp = ccv; #endif void *cookie; if (ih > EB164_MAX_IRQ) panic("dec_eb164_intr_establish: bogus eb164 IRQ 0x%lx", ih); cookie = alpha_shared_intr_establish(eb164_pci_intr, ih, IST_LEVEL, level, func, arg, "eb164 irq"); if (cookie != NULL && alpha_shared_intr_firstactive(eb164_pci_intr, ih)) { scb_set(0x900 + SCB_IDXTOVEC(ih), eb164_iointr, NULL, level); eb164_intr_enable(ih); } return (cookie); }
void * dec_1000a_intr_establish( void *ccv, pci_intr_handle_t ih, int level, int (*func)(void *), void *arg) { void *cookie; if (ih >= PCI_NIRQ) panic("dec_1000a_intr_establish: IRQ too high, 0x%lx", ih); cookie = alpha_shared_intr_establish(dec_1000a_pci_intr, ih, IST_LEVEL, level, func, arg, "dec_1000a irq"); if (cookie != NULL && alpha_shared_intr_firstactive(dec_1000a_pci_intr, ih)) { scb_set(0x900 + SCB_IDXTOVEC(ih), dec_1000a_iointr, NULL, level); dec_1000a_enable_intr(ih); } return (cookie); }