static void dec_maxine_cons_init(void) { int kbd, crt, screen; kbd = crt = screen = 0; prom_findcons(&kbd, &crt, &screen); if (screen > 0) { #if NWSDISPLAY > 0 #if NXCFB > 0 if (crt == 3) { xcfb_cnattach((tc_addr_t)XINE_PHYS_CFB_START); dtkbd_cnattach(); return; } #endif if (tcfb_cnattach(crt) > 0) { dtkbd_cnattach(); return; } #endif printf("No framebuffer device configured for slot %d: ", crt); printf("using serial console\n"); } /* * Delay to allow PROM putchars to complete. * FIFO depth * character time, * character time = (1000000 / (defaultrate / 10)) */ DELAY(160000000 / 9600); /* XXX */ zs_ioasic_cnattach(ioasic_base, 0x100000, 1); }
static void dec_3maxplus_cons_init(void) { int kbd, crt, screen; kbd = crt = screen = 0; prom_findcons(&kbd, &crt, &screen); if (screen > 0) { #if NWSDISPLAY > 0 if (tcfb_cnattach(crt) > 0) { zs_ioasic_lk201_cnattach(ioasic_base, 0x180000, 0); return; } #endif printf("No framebuffer device configured for slot %d: ", crt); printf("using serial console\n"); } /* * Delay to allow PROM putchars to complete. * FIFO depth * character time, * character time = (1000000 / (defaultrate / 10)) */ DELAY(160000000 / 9600); /* XXX */ zs_ioasic_cnattach(ioasic_base, 0x180000, 1); }
static void dec_3000_500_cons_init() { #if defined(NEW_SCC_DRIVER) struct ctb *ctb; ctb = (struct ctb *)(((caddr_t)hwrpb) + hwrpb->rpb_ctb_off); switch (ctb->ctb_term_type) { case CTB_GRAPHICS: #if NWSDISPLAY > 0 /* display console ... */ if (zs_ioasic_lk201_cnattach(0x1e0000000, 0x00180000, 0) && tc_3000_500_fb_cnattach( CTB_TURBOSLOT_SLOT(ctb->ctb_turboslot))) { break; } #endif printf("consinit: Unable to init console on keyboard and "); printf("TURBOchannel slot 0x%lx.\n", ctb->ctb_turboslot); printf("Using serial console.\n"); /* FALLTHROUGH */ case CTB_PRINTERPORT: /* serial console ... */ /* * XXX This could stand some cleanup... */ { /* * Delay to allow PROM putchars to complete. * FIFO depth * character time, * character time = (1000000 / (defaultrate / 10)) */ DELAY(160000000 / 9600); /* XXX */ /* * Console is channel B of the second SCC. * XXX Should use ctb_line_off to get the * XXX line parameters--these are the defaults. */ if (zs_ioasic_cnattach(0x1e0000000, 0x00180000, 1, 9600, (TTYDEF_CFLAG & ~(CSIZE | PARENB)) | CS8)) panic("can't init serial console"); break; } default: printf("ctb->ctb_term_type = 0x%lx\n", ctb->ctb_term_type); printf("ctb->ctb_turboslot = 0x%lx\n", ctb->ctb_turboslot); panic("consinit: unknown console type %lu\n", ctb->ctb_term_type); } #endif }
static void dec_3000_300_cons_init(void) { struct ctb *ctb; ctb = (struct ctb *)(((char *)hwrpb) + hwrpb->rpb_ctb_off); switch (ctb->ctb_term_type) { case CTB_GRAPHICS: #if NWSDISPLAY > 0 /* display console ... */ if (zs_ioasic_lk201_cnattach(0x1a0000000, 0x00180000, 0) == 0 && tc_3000_300_fb_cnattach( CTB_TURBOSLOT_SLOT(ctb->ctb_turboslot)) == 0) { break; } #endif printf("consinit: Unable to init console on keyboard and "); printf("TURBOchannel slot 0x%lx.\n", ctb->ctb_turboslot); printf("Using serial console.\n"); /* FALLTHROUGH */ case CTB_PRINTERPORT: /* serial console ... */ /* * XXX This could stand some cleanup... */ { /* * Delay to allow PROM putchars to complete. * FIFO depth * character time. * character time = (1000000 / (defaultrate / 10)) */ DELAY(160000000 / 9600); /* XXX */ /* * Console is channel B of the first SCC. * XXX Should use ctb_line_off to get the * XXX line parameters. */ zs_ioasic_cnattach(0x1a0000000, 0x00100000, 1); break; } default: printf("ctb->ctb_term_type = 0x%lx\n", ctb->ctb_term_type); printf("ctb->ctb_turboslot = 0x%lx\n", ctb->ctb_turboslot); panic("consinit: unknown console type %lu", ctb->ctb_term_type); /* NOTREACHED */ } }