Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/uart/uart_dev_ns8250.c
Show First 20 Lines • Show All 421 Lines • ▼ Show 20 Lines | #endif | ||||
ns8250->busy_detect = 0; | ns8250->busy_detect = 0; | ||||
#ifdef FDT | #ifdef FDT | ||||
/* | /* | ||||
* Check whether uart requires to read USR reg when IIR_BUSY and | * Check whether uart requires to read USR reg when IIR_BUSY and | ||||
* has broken txfifo. | * 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); | node = ofw_bus_get_node(sc->sc_dev); | ||||
if ((OF_getencprop(node, "busy-detect", &cell, sizeof(cell))) > 0) | /* This condition should be eventually removed */ | ||||
andrew: When committed this should read something like the following.
/* XXX: This is kept for a… | |||||
ns8250->busy_detect = cell ? 1 : 0; | 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) | if ((OF_getencprop(node, "broken-txfifo", &cell, sizeof(cell))) > 0) | ||||
Not Done Inline ActionsCan you keep this for the case of a new kernel with an old device tree. It helps to keep compatibility around where possible to give people a chance to get both in sync. andrew: Can you keep this for the case of a new kernel with an old device tree. It helps to keep… | |||||
bsz_semihalf.comAuthorUnsubmitted Not Done Inline ActionsCorrected. bsz_semihalf.com: Corrected. | |||||
broken_txfifo = cell ? 1 : 0; | broken_txfifo = cell ? 1 : 0; | ||||
#endif | #endif | ||||
bas = &sc->sc_bas; | bas = &sc->sc_bas; | ||||
ns8250->mcr = uart_getreg(bas, REG_MCR); | ns8250->mcr = uart_getreg(bas, REG_MCR); | ||||
ns8250->fcr = FCR_ENABLE; | ns8250->fcr = FCR_ENABLE; | ||||
if (!resource_int_value("uart", device_get_unit(sc->sc_dev), "flags", | if (!resource_int_value("uart", device_get_unit(sc->sc_dev), "flags", | ||||
▲ Show 20 Lines • Show All 542 Lines • Show Last 20 Lines |
When committed this should read something like the following.