void hil_intio_attach(struct device *parent, struct device *self, void *aux) { struct hil_softc *sc = (void *)self; struct intio_attach_args *ia = aux; extern struct consdev wsdisplay_cons; sc->sc_bst = ia->ia_tag; if (bus_space_map(sc->sc_bst, HILADDR, HILMAPSIZE, 0, &sc->sc_bsh) != 0) { printf(": couldn't map hil controller\n"); return; } /* * Check that the configured console device is a wsdisplay. */ if (cn_tab != &wsdisplay_cons) hil_is_console = 0; hil_isr.isr_func = hil_intr; hil_isr.isr_arg = sc; hil_isr.isr_ipl = 1; hil_isr.isr_priority = IPL_TTY; printf(" ipl %d", hil_isr.isr_ipl); hil_attach(sc, &hil_is_console); intr_establish(&hil_isr, self->dv_xname); startuphook_establish(hil_attach_deferred, sc); }
void sti_pci_attach(struct device *parent, struct device *self, void *aux) { struct sti_pci_softc *spc = (void *)self; struct pci_attach_args *paa = aux; spc->sc_pc = paa->pa_pc; spc->sc_tag = paa->pa_tag; spc->sc_base.sc_enable_rom = sti_pci_enable_rom; spc->sc_base.sc_disable_rom = sti_pci_disable_rom; printf("\n"); if (sti_check_rom(spc, paa) != 0) return; printf("%s", self->dv_xname); if (sti_pci_is_console(paa, spc->sc_base.bases) != 0) spc->sc_base.sc_flags |= STI_CONSOLE; if (sti_attach_common(&spc->sc_base, paa->pa_iot, paa->pa_memt, spc->sc_romh, STI_CODEBASE_MAIN) == 0) startuphook_establish(sti_end_attach, spc); }
void hil_gsc_attach(struct device *parent, struct device *self, void *aux) { struct hil_softc *sc = (void *)self; struct gsc_attach_args *ga = aux; int hil_is_console; sc->sc_bst = ga->ga_iot; if (bus_space_map(ga->ga_iot, ga->ga_hpa, HILMAPSIZE, 0, &sc->sc_bsh)) { printf(": couldn't map hil controller\n"); return; } hil_is_console = ga->ga_dp.dp_mod == PAGE0->mem_kbd.pz_dp.dp_mod && bcmp(ga->ga_dp.dp_bc, PAGE0->mem_kbd.pz_dp.dp_bc, 6) == 0; hil_attach(sc, hil_is_console); gsc_intr_establish((struct gsc_softc *)parent, IPL_TTY, ga->ga_irq, hil_intr, sc, &sc->sc_dev); startuphook_establish(hil_attach_deferred, sc); }