summaryrefslogtreecommitdiffstats
path: root/sys/sparc64/isa
diff options
context:
space:
mode:
authormarius <marius@FreeBSD.org>2007-10-28 22:08:37 +0000
committermarius <marius@FreeBSD.org>2007-10-28 22:08:37 +0000
commit03771327baaef68408c3ca89e0b6616f432cd196 (patch)
treea7378e2f9566e68eb995f77272a745aa192debfe /sys/sparc64/isa
parentae8e7ec2a3a62350e0e8adf6cc88be3a8330aab9 (diff)
downloadFreeBSD-src-03771327baaef68408c3ca89e0b6616f432cd196.zip
FreeBSD-src-03771327baaef68408c3ca89e0b6616f432cd196.tar.gz
- Make failure to route a ISA interrupt non fatal. Apparently the
Blade 1500/SX1500 boards have inherited the firmware bug of the AX1105 mainboards to not include an interrupt map entry for the parallel port controller (for the AX1105 the heuristic code for E450s probably erroneously kicks in and guesses an interrupt). - Take advantage of bus_generic_setup_intr(9). - Fix some whitespace bugs.
Diffstat (limited to 'sys/sparc64/isa')
-rw-r--r--sys/sparc64/isa/isa.c30
1 files changed, 16 insertions, 14 deletions
diff --git a/sys/sparc64/isa/isa.c b/sys/sparc64/isa/isa.c
index 37ec63a..78ea93f 100644
--- a/sys/sparc64/isa/isa.c
+++ b/sys/sparc64/isa/isa.c
@@ -204,7 +204,7 @@ isa_setup_children(device_t dev, phandle_t parent)
if (strcmp(ofw_isa_pnp_map[i].name, name) == 0)
break;
if (ofw_isa_pnp_map[i].name == NULL) {
- printf("isa_setup_children: no PnP map entry for node "
+ device_printf(dev, "no PnP map entry for node "
"0x%lx: %s\n", (unsigned long)node, name);
free(name, M_OFWPROP);
continue;
@@ -269,9 +269,12 @@ isa_setup_children(device_t dev, phandle_t parent)
panic("isa_setup_children: intr too large");
rintr = ofw_isa_route_intr(device_get_parent(dev), node,
&isa_iinfo, intrs[i]);
- if (rintr == PCI_INVALID_IRQ)
- panic("isa_setup_children: could not map ISA "
- "interrupt %d", intrs[i]);
+ if (rintr == PCI_INVALID_IRQ) {
+ device_printf(dev, "could not map ISA "
+ "interrupt %d for node 0x%lx: %s\n",
+ intrs[i], (unsigned long)node, name);
+ continue;
+ }
isa_ino[intrs[i]] = rintr;
bus_set_resource(cdev, SYS_RES_IRQ, i, rintr, 1);
}
@@ -298,7 +301,7 @@ isa_setup_children(device_t dev, phandle_t parent)
struct resource *
isa_alloc_resource(device_t bus, device_t child, int type, int *rid,
- u_long start, u_long end, u_long count, u_int flags)
+ u_long start, u_long end, u_long count, u_int flags)
{
/*
* Consider adding a resource definition.
@@ -379,16 +382,15 @@ isa_alloc_resource(device_t bus, device_t child, int type, int *rid,
int
isa_release_resource(device_t bus, device_t child, int type, int rid,
- struct resource *res)
+ struct resource *res)
{
return (bus_generic_rl_release_resource(bus, child, type, rid, res));
}
int
-isa_setup_intr(device_t dev, device_t child,
- struct resource *irq, int flags, driver_filter_t *filter,
- driver_intr_t *intr, void *arg, void **cookiep)
+isa_setup_intr(device_t dev, device_t child, struct resource *irq, int flags,
+ driver_filter_t *filter, driver_intr_t *intr, void *arg, void **cookiep)
{
/*
@@ -397,14 +399,14 @@ isa_setup_intr(device_t dev, device_t child,
* The interrupt had been routed before it was added to the
* resource list of the child.
*/
- return (BUS_SETUP_INTR(device_get_parent(dev), child, irq, flags,
- filter, intr, arg, cookiep));
+ return (bus_generic_setup_intr(dev, child, irq, flags, filter, intr,
+ arg, cookiep));
}
int
-isa_teardown_intr(device_t dev, device_t child,
- struct resource *irq, void *cookie)
+isa_teardown_intr(device_t dev, device_t child, struct resource *irq,
+ void *cookie)
{
- return (BUS_TEARDOWN_INTR(device_get_parent(dev), child, irq, cookie));
+ return (bus_generic_teardown_intr(dev, child, irq, cookie));
}
OpenPOWER on IntegriCloud