1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-19 10:53:58 +00:00

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
This commit is contained in:
Marius Strobl 2005-02-26 00:22:52 +00:00
parent a944e196da
commit ad11db7c28
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=142531

View File

@ -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)