aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/pccbb
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2005-04-13 16:35:15 +0000
committerWarner Losh <imp@FreeBSD.org>2005-04-13 16:35:15 +0000
commit3f7d3c1e3c97a88049a4597be0f7fa8bcfbc08f8 (patch)
tree7cc5d351928efa50a6f4deeaf2af88d9a56c7b38 /sys/dev/pccbb
parent491bfec7073c08f0670d59411ef16bf4701aaaab (diff)
downloadsrc-3f7d3c1e3c97a88049a4597be0f7fa8bcfbc08f8.tar.gz
src-3f7d3c1e3c97a88049a4597be0f7fa8bcfbc08f8.zip
Since cbb implements the pcib_ interface, it must also implement the
pcib_route_interrupt interface. Since there's only one interrupt pin in the CardBus form factor, everybody gets to share it. Implement cbb_route_interrupt to return the interrupt we have. Suggested by: bms
Notes
Notes: svn path=/head/; revision=145020
Diffstat (limited to 'sys/dev/pccbb')
-rw-r--r--sys/dev/pccbb/pccbb_pci.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/sys/dev/pccbb/pccbb_pci.c b/sys/dev/pccbb/pccbb_pci.c
index 61c27f5a8253..6ad20bed177d 100644
--- a/sys/dev/pccbb/pccbb_pci.c
+++ b/sys/dev/pccbb/pccbb_pci.c
@@ -603,6 +603,14 @@ cbb_chipinit(struct cbb_softc *sc)
pci_write_config(sc->dev, CBBR_IOLIMIT1, 0, 4);
}
+static int
+cbb_route_interrupt(device_t pcib, device_t dev, int pin)
+{
+ struct cbb_softc *sc = (struct cbb_softc *)device_get_softc(pcib);
+
+ return (rman_get_start(sc->irq_res));
+}
+
static device_method_t cbb_methods[] = {
/* Device interface */
DEVMETHOD(device_probe, cbb_pci_probe),
@@ -638,6 +646,8 @@ static device_method_t cbb_methods[] = {
DEVMETHOD(pcib_maxslots, cbb_maxslots),
DEVMETHOD(pcib_read_config, cbb_read_config),
DEVMETHOD(pcib_write_config, cbb_write_config),
+ DEVMETHOD(pcib_route_interrupt, cbb_route_interrupt),
+
{0,0}
};