Lines Matching refs:lc
470 lom_queue_cmd(struct lom_softc *sc, struct lom_cmd *lc)
473 return lom1_queue_cmd(sc, lc);
475 return lom2_queue_cmd(sc, lc);
479 lom_dequeue_cmd(struct lom_softc *sc, struct lom_cmd *lc)
485 if (lcp == lc) {
486 TAILQ_REMOVE(&sc->sc_queue, lc, lc_next);
496 struct lom_cmd lc;
502 lc.lc_cmd = reg;
503 lc.lc_data = 0xff;
504 lom1_queue_cmd(sc, &lc);
506 error = tsleep(&lc, PZERO, "lomrd", hz);
508 lom_dequeue_cmd(sc, &lc);
510 *val = lc.lc_data;
518 struct lom_cmd lc;
524 lc.lc_cmd = reg | LOM_IDX_WRITE;
525 lc.lc_data = val;
526 lom1_queue_cmd(sc, &lc);
528 error = tsleep(&lc, PZERO, "lomwr", 2 * hz);
530 lom_dequeue_cmd(sc, &lc);
602 lom1_queue_cmd(struct lom_softc *sc, struct lom_cmd *lc)
608 if (lcp == lc) {
613 TAILQ_INSERT_TAIL(&sc->sc_queue, lc, lc_next);
634 struct lom_cmd *lc;
637 lc = TAILQ_FIRST(&sc->sc_queue);
638 if (lc == NULL) {
664 bus_space_write_1(sc->sc_iot, sc->sc_ioh, LOM1_CMD, lc->lc_cmd);
671 if ((lc->lc_cmd & LOM_IDX_WRITE) == 0)
672 lc->lc_data = bus_space_read_1(sc->sc_iot, sc->sc_ioh, LOM1_DATA);
674 bus_space_write_1(sc->sc_iot, sc->sc_ioh, LOM1_DATA, lc->lc_data);
676 TAILQ_REMOVE(&sc->sc_queue, lc, lc_next);
678 wakeup(lc);
692 struct lom_cmd lc;
698 lc.lc_cmd = reg;
699 lc.lc_data = 0xff;
700 lom2_queue_cmd(sc, &lc);
702 error = tsleep(&lc, PZERO, "lom2rd", hz);
704 lom_dequeue_cmd(sc, &lc);
706 *val = lc.lc_data;
746 struct lom_cmd lc;
752 lc.lc_cmd = reg | LOM_IDX_WRITE;
753 lc.lc_data = val;
754 lom2_queue_cmd(sc, &lc);
756 error = tsleep(&lc, PZERO, "lom2wr", hz);
758 lom_dequeue_cmd(sc, &lc);
828 lom2_queue_cmd(struct lom_softc *sc, struct lom_cmd *lc)
835 if (lcp == lc) {
840 TAILQ_INSERT_TAIL(&sc->sc_queue, lc, lc_next);
844 lc = TAILQ_FIRST(&sc->sc_queue);
846 LOM2_CMD, lc->lc_cmd);
857 struct lom_cmd *lc;
865 lc = TAILQ_FIRST(&sc->sc_queue);
866 if (lc == NULL) {
871 if (lc->lc_cmd & LOM_IDX_WRITE) {
874 LOM2_DATA, lc->lc_data);
875 lc->lc_cmd &= ~LOM_IDX_WRITE;
882 lc->lc_data = obr;
884 TAILQ_REMOVE(&sc->sc_queue, lc, lc_next);
886 wakeup(lc);
893 lc = TAILQ_FIRST(&sc->sc_queue);
895 LOM2_CMD, lc->lc_cmd);