MCPcopy Create free account
hub / github.com/F-Stack/f-stack / oct16550_bus_getsig

Function oct16550_bus_getsig

freebsd/mips/cavium/uart_dev_oct16550.c:505–524  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

503}
504
505static int
506oct16550_bus_getsig (struct uart_softc *sc)
507{
508 uint32_t new, old, sig;
509 uint8_t msr;
510
511 do {
512 old = sc->sc_hwsig;
513 sig = old;
514 uart_lock(sc->sc_hwmtx);
515 msr = uart_getreg(&sc->sc_bas, REG_MSR);
516 uart_unlock(sc->sc_hwmtx);
517 SIGCHG(msr & MSR_DSR, sig, SER_DSR, SER_DDSR);
518 SIGCHG(msr & MSR_CTS, sig, SER_CTS, SER_DCTS);
519 SIGCHG(msr & MSR_DCD, sig, SER_DCD, SER_DDCD);
520 SIGCHG(msr & MSR_RI, sig, SER_RI, SER_DRI);
521 new = sig & ~SER_MASK_DELTA;
522 } while (!atomic_cmpset_32(&sc->sc_hwsig, old, new));
523 return (sig);
524}
525
526static int
527oct16550_bus_ioctl (struct uart_softc *sc, int request, intptr_t data)

Callers 1

oct16550_bus_attachFunction · 0.85

Calls 1

atomic_cmpset_32Function · 0.50

Tested by

no test coverage detected