| 343 | } |
| 344 | |
| 345 | static int |
| 346 | mtk_uart_bus_getsig(struct uart_softc *sc) |
| 347 | { |
| 348 | uint32_t new, old, sig; |
| 349 | uint8_t bes; |
| 350 | |
| 351 | return(0); |
| 352 | do { |
| 353 | old = sc->sc_hwsig; |
| 354 | sig = old; |
| 355 | uart_lock(sc->sc_hwmtx); |
| 356 | bes = uart_getreg(&sc->sc_bas, UART_MSR_REG); |
| 357 | uart_unlock(sc->sc_hwmtx); |
| 358 | /* XXX: chip can show delta */ |
| 359 | SIGCHG(bes & UART_MSR_CTS, sig, SER_CTS, SER_DCTS); |
| 360 | SIGCHG(bes & UART_MSR_DCD, sig, SER_DCD, SER_DDCD); |
| 361 | SIGCHG(bes & UART_MSR_DSR, sig, SER_DSR, SER_DDSR); |
| 362 | new = sig & ~SER_MASK_DELTA; |
| 363 | } while (!atomic_cmpset_32(&sc->sc_hwsig, old, new)); |
| 364 | |
| 365 | return (sig); |
| 366 | } |
| 367 | |
| 368 | static int |
| 369 | mtk_uart_bus_ioctl(struct uart_softc *sc, int request, intptr_t data) |
no test coverage detected