diff options
author | dfr <dfr@FreeBSD.org> | 2000-05-14 13:47:57 +0000 |
---|---|---|
committer | dfr <dfr@FreeBSD.org> | 2000-05-14 13:47:57 +0000 |
commit | 503e2bb45ec708ded388e6d0515415adea9c2a1e (patch) | |
tree | 03d0d17068c3220d01e03b0d2893c70b07a8ecd3 /sys/dev/ppc | |
parent | 1a749c1007b2262af1843c6417d514e940e6387e (diff) | |
download | FreeBSD-src-503e2bb45ec708ded388e6d0515415adea9c2a1e.zip FreeBSD-src-503e2bb45ec708ded388e6d0515415adea9c2a1e.tar.gz |
Port ppc driver to alpha.
Submitted by: Andrew M. Miklic <miklic@ibm.net>
Diffstat (limited to 'sys/dev/ppc')
-rw-r--r-- | sys/dev/ppc/ppc.c | 26 | ||||
-rw-r--r-- | sys/dev/ppc/ppcreg.h | 4 |
2 files changed, 27 insertions, 3 deletions
diff --git a/sys/dev/ppc/ppc.c b/sys/dev/ppc/ppc.c index 53cb50d..f0aa95d 100644 --- a/sys/dev/ppc/ppc.c +++ b/sys/dev/ppc/ppc.c @@ -1764,7 +1764,31 @@ ppc_probe(device_t dev) device_printf(dev, "cannot reserve I/O port range\n"); goto error; } - ppc->ppc_base = rman_get_start(ppc->res_ioport); + + /* Assume we support the extended IO range of some ppc chipsets...*/ + + ppc->rid_extraio = 1; + ppc->res_extraio = + bus_alloc_resource(dev, + SYS_RES_IOPORT, + &ppc->rid_extraio, + 0, + ~0, + IO_LPTSIZE, + RF_ACTIVE); + + /* If we cannot reserve the extra ports for the extended IO range, + indicate this with a non-threatening message (this is not an error, + so don't treat it as such)... */ + + if (ppc->res_extraio == 0) { + + ppc->rid_extraio = 0; + + device_printf(dev, "This ppc chipset does not support the extended I/O port range...no problem\n"); +} + + ppc->ppc_base = rman_get_start(ppc->res_ioport); ppc->ppc_flags = device_get_flags(dev); diff --git a/sys/dev/ppc/ppcreg.h b/sys/dev/ppc/ppcreg.h index ec17806..ab0bf6f 100644 --- a/sys/dev/ppc/ppcreg.h +++ b/sys/dev/ppc/ppcreg.h @@ -100,8 +100,8 @@ struct ppc_data { device_t ppbus; /* parallel port chipset corresponding ppbus */ - int rid_irq, rid_drq, rid_ioport; - struct resource *res_irq, *res_drq, *res_ioport; + int rid_irq, rid_drq, rid_ioport, rid_extraio; + struct resource *res_irq, *res_drq, *res_ioport, *res_extraio; void *intr_cookie; |