summaryrefslogtreecommitdiffstats
path: root/sys/pccard/pccard.c
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2001-07-31 06:44:37 +0000
committerimp <imp@FreeBSD.org>2001-07-31 06:44:37 +0000
commit7ffebadcef03ef7d4c21bb2bacc7138cf1cce87a (patch)
treebf5b7745d1930fe2e8d980854cd090f6d9336f91 /sys/pccard/pccard.c
parentac051210c345e786944512f477e364d55b394ea1 (diff)
downloadFreeBSD-src-7ffebadcef03ef7d4c21bb2bacc7138cf1cce87a.zip
FreeBSD-src-7ffebadcef03ef7d4c21bb2bacc7138cf1cce87a.tar.gz
A bunch of interrupt related cleanup.
o Move PIOCSRESOURCE from pccard to pcic so the kernel can give pccardd better hints as to what resources to use. o Implement an undocumented hw.pcic.interrupt_route to allow people that need to do so to route their interrupts in a non-standard way. o Only preallocate a resource in probe if we're routing via pci. o If we aren't routing via pci, then set the irq to use explicitly to defeat the automatic IRQ routing of the pci layer. This, with the pccardd code should be close to what can be committed to -stable.
Diffstat (limited to 'sys/pccard/pccard.c')
-rw-r--r--sys/pccard/pccard.c33
1 files changed, 0 insertions, 33 deletions
diff --git a/sys/pccard/pccard.c b/sys/pccard/pccard.c
index 816fa3f..0a02e02 100644
--- a/sys/pccard/pccard.c
+++ b/sys/pccard/pccard.c
@@ -442,36 +442,6 @@ crdwrite(dev_t dev, struct uio *uio, int ioflag)
return (error);
}
-static int
-crdioctl_sresource(dev_t dev, caddr_t data)
-{
- struct pccard_resource *pr;
- struct resource *r;
- int flags;
- int rid = 0;
- device_t bridgedev;
-
- pr = (struct pccard_resource *)data;
- pr->resource_addr = ~0ul;
- bridgedev = PCCARD_DEV2SOFTC(dev)->dev;
- switch(pr->type) {
- default:
- return (EINVAL);
- case SYS_RES_MEMORY:
- case SYS_RES_IRQ:
- case SYS_RES_IOPORT:
- break;
- }
- flags = rman_make_alignment_flags(pr->size);
- r = bus_alloc_resource(bridgedev, pr->type, &rid, pr->min, pr->max,
- pr->size, flags);
- if (r != NULL) {
- pr->resource_addr = (u_long)rman_get_start(r);
- bus_release_resource(bridgedev, pr->type, rid, r);
- }
- return (0);
-}
-
/*
* ioctl calls - allows setting/getting of memory and I/O
* descriptors, and assignment of drivers.
@@ -638,9 +608,6 @@ crdioctl(dev_t dev, u_long cmd, caddr_t data, int fflag, struct proc *p)
return (EINVAL);
}
break;
- case PIOCSRESOURCE:
- return (crdioctl_sresource(dev, data));
- break;
}
return (0);
}
OpenPOWER on IntegriCloud