Actually check the DTS node value to enable the uart quirks.

Without this fix, you cannot disable the quirks by setting it to 0, just
the presence of the FDT node was enough to enable it.
This commit is contained in:
Luiz Otavio O Souza 2015-05-30 16:30:51 +00:00
parent 645acf41e3
commit b1621f22b3
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=283773

View file

@ -416,10 +416,10 @@ ns8250_bus_attach(struct uart_softc *sc)
* has broken txfifo.
*/
node = ofw_bus_get_node(sc->sc_dev);
if ((OF_getprop(node, "busy-detect", &cell, sizeof(cell))) > 0)
ns8250->busy_detect = 1;
if ((OF_getprop(node, "broken-txfifo", &cell, sizeof(cell))) > 0)
broken_txfifo = 1;
if ((OF_getencprop(node, "busy-detect", &cell, sizeof(cell))) > 0)
ns8250->busy_detect = cell ? 1 : 0;
if ((OF_getencprop(node, "broken-txfifo", &cell, sizeof(cell))) > 0)
broken_txfifo = cell ? 1 : 0;
#endif
bas = &sc->sc_bas;