summaryrefslogtreecommitdiffstats
path: root/sys/dev/pccbb
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2005-04-13 16:35:15 +0000
committerimp <imp@FreeBSD.org>2005-04-13 16:35:15 +0000
commit4085e6fe95a64629a32de51eebafc8c1df2abdef (patch)
tree7cc5d351928efa50a6f4deeaf2af88d9a56c7b38 /sys/dev/pccbb
parentd66c1ecbfc3b0ed65298ca3d583b15065efdd1e3 (diff)
downloadFreeBSD-src-4085e6fe95a64629a32de51eebafc8c1df2abdef.zip
FreeBSD-src-4085e6fe95a64629a32de51eebafc8c1df2abdef.tar.gz
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
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 61c27f5..6ad20be 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}
};
OpenPOWER on IntegriCloud