Lines Matching refs:unit

175 static int sc_allocate_keyboard(sc_softc_t *sc, int unit);
176 static int scvidprobe(int unit, int flags, int cons);
177 static int sckbdprobe(int unit, int flags, int cons);
181 static void scinit(int unit, int flags);
183 static void scterm(int unit, int flags);
264 sc_probe_unit(int unit, int flags)
266 if (!scvidprobe(unit, flags, FALSE)) {
268 printf("%s%d: no video adapter found.\n", SC_DRIVER_NAME, unit);
273 sckbdprobe(unit, flags, FALSE);
280 scvidprobe(int unit, int flags, int cons)
291 return (vid_find_adapter("*", unit) >= 0);
296 sckbdprobe(int unit, int flags, int cons)
301 return (kbd_find_keyboard("*", unit) >= 0);
353 /* Allocate TTY object and softc to store unit number. */
367 sc_set_vesa_mode(scr_stat *scp, sc_softc_t *sc, int unit)
377 (void)resource_int_value("sc", unit, "vesa_mode", &vmode);
484 sc_attach_unit(int unit, int flags)
493 if (sc_console_unit == unit) {
495 * If this unit is being used as the system console, we need to
502 scinit(unit, flags);
504 sc = sc_get_softc(unit, flags & SC_KERNEL_CONSOLE);
512 sc_set_vesa_mode(scp, sc, unit);
527 SC_DRIVER_NAME, unit, adapter_name(sc->adp), sc->vtys, sc->config);
529 printf("%s%d:", SC_DRIVER_NAME, unit);
541 if (sc_console_unit == unit) {
552 sc->dev[vc] = sc_alloc_tty(vc, vc + unit * MAXCONS);
607 return ((sc_console != NULL) ? sc_console->sc->unit : -1);
617 int unit = scdevtounit(tp);
624 DPRINTF(5, ("scopen: dev:%s, unit:%d, vty:%d\n",
625 devtoname(tp->t_dev), unit, SC_VTY(tp)));
627 sc = sc_get_softc(unit, (sc_console_unit == unit) ? SC_KERNEL_CONSOLE : 0);
666 DPRINTF(5, ("sc%d: scclose(), ", scp->sc->unit));
668 if ((scp == scp->sc->cur_scp) && (scp->sc->unit == sc_console_unit))
1047 DPRINTF(5, ("%s%d: VT_SETMODE ", SC_DRIVER_NAME, sc->unit));
1065 if ((scp == sc->cur_scp) && (sc->unit == sc_console_unit))
1083 if ((scp == sc->cur_scp) && (sc->unit == sc_console_unit))
1121 DPRINTF(5, ("%s%d: VT_FALSE\n", SC_DRIVER_NAME, sc->unit));
1125 DPRINTF(5, ("%s%d: VT_TRUE\n", SC_DRIVER_NAME, sc->unit));
1129 DPRINTF(5, ("%s%d: VT_ACKACQ\n", SC_DRIVER_NAME, sc->unit));
1583 int unit;
1586 cp->cn_pri = sc_get_cons_priority(&unit, &flags);
1589 if (!scvidprobe(unit, flags, TRUE))
1593 sckbdprobe(unit, flags, TRUE);
1605 int unit;
1608 sc_get_cons_priority(&unit, &flags);
1609 scinit(unit, flags | SC_KERNEL_CONSOLE);
1610 sc_console_unit = unit;
1611 sc_console = sc_get_stat(sc_get_softc(unit, SC_KERNEL_CONSOLE)->dev[0]);
2514 if (sc->unit == sc_console_unit)
2536 if (sc->unit == sc_console_unit)
2578 if (scp->sc->unit == sc_console_unit)
2806 scinit(int unit, int flags)
2844 sc = sc_get_softc(unit, flags & SC_KERNEL_CONSOLE);
2855 DPRINTF(5, ("sc%d: releasing kbd%d\n", unit, sc->keyboard));
2857 DPRINTF(5, ("sc%d: kbd_release returned %d\n", unit, i));
2859 DPRINTF(5, ("sc%d: kbd != NULL!, index:%d, unit:%d, flags:0x%x\n",
2860 unit, sc->kbd->kb_index, sc->kbd->kb_unit, sc->kbd->kb_flags));
2864 sc->adapter = vid_allocate("*", unit, (void *)&sc->adapter);
2868 sc->keyboard = sc_allocate_keyboard(sc, unit);
2869 DPRINTF(1, ("sc%d: keyboard %d\n", unit, sc->keyboard));
2873 DPRINTF(1, ("sc%d: kbd index:%d, unit:%d, flags:0x%x\n",
2874 unit, sc->kbd->kb_index, sc->kbd->kb_unit, sc->kbd->kb_flags));
2899 sc->first_vty = unit*MAXCONS;
2931 sc->dev[0] = sc_alloc_tty(0, unit * MAXCONS);
3029 scterm(int unit, int flags)
3034 sc = sc_get_softc(unit, flags & SC_KERNEL_CONSOLE);
3896 sc_allocate_keyboard(sc_softc_t *sc, int unit)
3921 idx0 = kbd_allocate("*", unit, (void *)&sc->keyboard, sckbdevent, sc);