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/isa | |
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/isa')
-rw-r--r-- | sys/isa/isareg.h | 10 | ||||
-rw-r--r-- | sys/isa/ppc.c | 26 | ||||
-rw-r--r-- | sys/isa/ppcreg.h | 4 |
3 files changed, 36 insertions, 4 deletions
diff --git a/sys/isa/isareg.h b/sys/isa/isareg.h index a2162cd..532da43 100644 --- a/sys/isa/isareg.h +++ b/sys/isa/isareg.h @@ -157,7 +157,15 @@ #define IO_GSCSIZE 8 /* GeniScan GS-4500G hand scanner */ #define IO_ICUSIZE 16 /* 8259A interrupt controllers */ #define IO_KBDSIZE 16 /* 8042 Keyboard controllers */ -#define IO_LPTSIZE 8 /* LPT controllers, some use only 4 */ + +/* The following line was changed to support more architectures (simpler + chipsets (like those for Alpha) only use 4, but more complex controllers + (usually modern i386's) can use an additional 4; the probe to see if + the additional 4 can be used by the specific chipset is now done in the ppc + code by ppc_probe()... */ + +#define IO_LPTSIZE 4 /* LPT controllers, Alpha only uses 4 */ + #define IO_MDASIZE 12 /* Monochrome display controllers */ #define IO_NPXSIZE 16 /* 80387/80487 NPX registers */ #define IO_PMPSIZE 2 /* 82347 power management peripheral */ diff --git a/sys/isa/ppc.c b/sys/isa/ppc.c index 53cb50d..f0aa95d 100644 --- a/sys/isa/ppc.c +++ b/sys/isa/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/isa/ppcreg.h b/sys/isa/ppcreg.h index ec17806..ab0bf6f 100644 --- a/sys/isa/ppcreg.h +++ b/sys/isa/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; |