diff options
author | marius <marius@FreeBSD.org> | 2005-02-26 00:22:52 +0000 |
---|---|---|
committer | marius <marius@FreeBSD.org> | 2005-02-26 00:22:52 +0000 |
commit | 5a761ed76662d62077beb768b8c076cb28d99564 (patch) | |
tree | 6fe342706fa507fca317764329fb071079501add /sys/dev/puc | |
parent | 15a925bf93f66957108aef1fb3c1092808a403aa (diff) | |
download | FreeBSD-src-5a761ed76662d62077beb768b8c076cb28d99564.zip FreeBSD-src-5a761ed76662d62077beb768b8c076cb28d99564.tar.gz |
Add a stopgap allowing puc(4) to allocate IRQs on fhc(4). Given that
both a scc(4) is under way and fhc(4) will be change to use INOs this
shouldn't stay in HEAD for too long but we need a MFC-able solution
for FreeBSD 5.4.
Discussed with: marcel
Tested by: hrs, kris
MFC after: 3 days
Diffstat (limited to 'sys/dev/puc')
-rw-r--r-- | sys/dev/puc/puc.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sys/dev/puc/puc.c b/sys/dev/puc/puc.c index 86e2a0c..11506e5 100644 --- a/sys/dev/puc/puc.c +++ b/sys/dev/puc/puc.c @@ -97,6 +97,10 @@ __FBSDID("$FreeBSD$"); #include <dev/pci/pcireg.h> #include <dev/pci/pcivar.h> +#ifdef __sparc64__ +#include <sparc64/fhc/fhcreg.h> +#endif + #define PUC_ENTRAILS 1 #include <dev/puc/pucvar.h> @@ -189,7 +193,12 @@ puc_attach(device_t dev, const struct puc_device_description *desc) printf("puc: name: %s\n", sc->sc_desc.name); #endif + rid = 0; +#ifdef __sparc64__ + if (strcmp(device_get_name(device_get_parent(dev)), "fhc") == 0) + rid = FHC_UART; +#endif res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, RF_ACTIVE | RF_SHAREABLE); if (!res) |