diff options
| author | Zbigniew Bodek <zbb@FreeBSD.org> | 2016-01-20 13:51:14 +0000 |
|---|---|---|
| committer | Zbigniew Bodek <zbb@FreeBSD.org> | 2016-01-20 13:51:14 +0000 |
| commit | 8abfc69d11a879fd9c5d53a7329215af7c6a3872 (patch) | |
| tree | 874c6b84a353064a8caaf957674be82bdbe24056 /sys/dev/uart/uart_dev_ns8250.c | |
| parent | a6c981778cbaee11eb94d430ce99c6d1029f34ec (diff) | |
Notes
Diffstat (limited to 'sys/dev/uart/uart_dev_ns8250.c')
| -rw-r--r-- | sys/dev/uart/uart_dev_ns8250.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/dev/uart/uart_dev_ns8250.c b/sys/dev/uart/uart_dev_ns8250.c index 68d3ff9013af..3bba676c5dc6 100644 --- a/sys/dev/uart/uart_dev_ns8250.c +++ b/sys/dev/uart/uart_dev_ns8250.c @@ -457,9 +457,12 @@ ns8250_bus_attach(struct uart_softc *sc) * Check whether uart requires to read USR reg when IIR_BUSY and * has broken txfifo. */ + ns8250->busy_detect = ofw_bus_is_compatible(sc->sc_dev, "snps,dw-apb-uart"); node = ofw_bus_get_node(sc->sc_dev); - if ((OF_getencprop(node, "busy-detect", &cell, sizeof(cell))) > 0) - ns8250->busy_detect = cell ? 1 : 0; + /* XXX: This is kept for a short time for compatibility with older device trees */ + if ((OF_getencprop(node, "busy-detect", &cell, sizeof(cell))) > 0 + && cell != 0) + ns8250->busy_detect = 1; if ((OF_getencprop(node, "broken-txfifo", &cell, sizeof(cell))) > 0) broken_txfifo = cell ? 1 : 0; #endif |
