mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-27 11:55:06 +00:00
Fix bug where UART unit number was not set properly, which prevented
operation on systems with multiple serial ports. Also turn on interrupts for the UART device, which were disabled due to a now-fixed bug in QEMU. Approved by: re (gjb)
This commit is contained in:
parent
e11cd3bc59
commit
145341e9cd
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=255895
@ -150,6 +150,7 @@ uart_phyp_probe_node(struct uart_phyp_softc *sc)
|
|||||||
OF_getprop(node, "reg", ®, sizeof(reg));
|
OF_getprop(node, "reg", ®, sizeof(reg));
|
||||||
if (reg == -1)
|
if (reg == -1)
|
||||||
return (ENXIO);
|
return (ENXIO);
|
||||||
|
sc->vtermid = reg;
|
||||||
sc->node = node;
|
sc->node = node;
|
||||||
|
|
||||||
if (OF_getprop(node, "compatible", buf, sizeof(buf)) <= 0)
|
if (OF_getprop(node, "compatible", buf, sizeof(buf)) <= 0)
|
||||||
@ -251,12 +252,8 @@ uart_phyp_attach(device_t dev)
|
|||||||
}
|
}
|
||||||
|
|
||||||
sc->irqrid = 0;
|
sc->irqrid = 0;
|
||||||
#ifdef NOTYET
|
|
||||||
sc->irqres = bus_alloc_resource_any(dev, SYS_RES_IRQ, &sc->irqrid,
|
sc->irqres = bus_alloc_resource_any(dev, SYS_RES_IRQ, &sc->irqrid,
|
||||||
RF_ACTIVE | RF_SHAREABLE);
|
RF_ACTIVE | RF_SHAREABLE);
|
||||||
#else
|
|
||||||
sc->irqres = NULL;
|
|
||||||
#endif
|
|
||||||
if (sc->irqres != NULL) {
|
if (sc->irqres != NULL) {
|
||||||
bus_setup_intr(dev, sc->irqres, INTR_TYPE_TTY | INTR_MPSAFE,
|
bus_setup_intr(dev, sc->irqres, INTR_TYPE_TTY | INTR_MPSAFE,
|
||||||
NULL, uart_phyp_intr, sc, &sc->sc_icookie);
|
NULL, uart_phyp_intr, sc, &sc->sc_icookie);
|
||||||
|
Loading…
Reference in New Issue
Block a user