summaryrefslogtreecommitdiff
path: root/sys/dev/uart/uart_core.c
diff options
context:
space:
mode:
authorMarcel Moolenaar <marcel@FreeBSD.org>2003-09-26 05:14:56 +0000
committerMarcel Moolenaar <marcel@FreeBSD.org>2003-09-26 05:14:56 +0000
commit875f70dba4ac5331af98ce31da9e3f02bdf2af21 (patch)
treed9aaac35b0191aeab19f23c33c5d34bb16d77724 /sys/dev/uart/uart_core.c
parent153bbe3e6abc91627b1dcd8e255903e9c4079cdc (diff)
Notes
Diffstat (limited to 'sys/dev/uart/uart_core.c')
-rw-r--r--sys/dev/uart/uart_core.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/sys/dev/uart/uart_core.c b/sys/dev/uart/uart_core.c
index 501156fea0ad..18141c25769f 100644
--- a/sys/dev/uart/uart_core.c
+++ b/sys/dev/uart/uart_core.c
@@ -221,7 +221,7 @@ uart_intr(void *arg)
}
int
-uart_bus_probe(device_t dev, int regshft, int rclk, int rid)
+uart_bus_probe(device_t dev, int regshft, int rclk, int rid, int chan)
{
struct uart_softc *sc;
struct uart_devinfo *sysdev;
@@ -267,14 +267,15 @@ uart_bus_probe(device_t dev, int regshft, int rclk, int rid)
* accordingly. In general, you don't want to permanently disrupt
* console I/O.
*/
- sc->sc_bas.iobase = rman_get_start(sc->sc_rres);
sc->sc_bas.bsh = rman_get_bushandle(sc->sc_rres);
sc->sc_bas.bst = rman_get_bustag(sc->sc_rres);
+ sc->sc_bas.chan = chan;
sc->sc_bas.regshft = regshft;
sc->sc_bas.rclk = (rclk == 0) ? sc->sc_class->uc_rclk : rclk;
SLIST_FOREACH(sysdev, &uart_sysdevs, next) {
- if (uart_cpu_eqres(&sc->sc_bas, &sysdev->bas)) {
+ if (chan == sysdev->bas.chan &&
+ uart_cpu_eqres(&sc->sc_bas, &sysdev->bas)) {
/* XXX check if ops matches class. */
sc->sc_sysdev = sysdev;
break;
@@ -324,8 +325,6 @@ uart_bus_attach(device_t dev)
0, ~0, sc->sc_class->uc_range, RF_ACTIVE);
if (sc->sc_rres == NULL)
return (ENXIO);
-
- sc->sc_bas.iobase = rman_get_start(sc->sc_rres);
sc->sc_bas.bsh = rman_get_bushandle(sc->sc_rres);
sc->sc_bas.bst = rman_get_bustag(sc->sc_rres);