aboutsummaryrefslogtreecommitdiff
path: root/sys/pccard
diff options
context:
space:
mode:
authorMike Smith <msmith@FreeBSD.org>1999-01-29 01:18:15 +0000
committerMike Smith <msmith@FreeBSD.org>1999-01-29 01:18:15 +0000
commit7546e83ec1bf0e0c7fa0ba912a1fa1fbd1ad3425 (patch)
tree9165ec303c9b55286e3b9703d081168def01ba6c /sys/pccard
parent7f1050341ca5d23c8a3002835debc88bafe707ab (diff)
downloadsrc-7546e83ec1bf0e0c7fa0ba912a1fa1fbd1ad3425.tar.gz
src-7546e83ec1bf0e0c7fa0ba912a1fa1fbd1ad3425.zip
Allow the interrupt allocated to the PCIC to be tuned from the kernel
environment by setting the variable machdep.pccard.pcic_irq. If the IRQ is invalid, the PCIC will run in polled mode.
Notes
Notes: svn path=/head/; revision=43370
Diffstat (limited to 'sys/pccard')
-rw-r--r--sys/pccard/pcic.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/sys/pccard/pcic.c b/sys/pccard/pcic.c
index 943bbc03443a..651c1d5b4bc8 100644
--- a/sys/pccard/pcic.c
+++ b/sys/pccard/pcic.c
@@ -526,7 +526,7 @@ int
pcic_probe(void)
{
int slotnum, validslots = 0;
- u_int free_irqs;
+ u_int free_irqs, desired_irq;
struct slot *slt;
struct pcic_slot *sp;
unsigned char c;
@@ -716,7 +716,19 @@ pcic_probe(void)
* then attempt to get one.
*/
if (pcic_irq == 0) {
+
pcic_imask = soft_imask;
+
+ /* See if the user has requested a specific IRQ */
+ if (getenv_int("machdep.pccard.pcic_irq", &desired_irq))
+ /* legal IRQ? */
+ if ((desired_irq >= 1) && (desired_irq <= ICU_LEN) &&
+ ((1ul << desired_irq) & soft_imask))
+ pcic_imask = 1ul << desired_irq;
+ else
+ /* illeagal, disable use of IRQ */
+ pcic_imask = 0;
+
pcic_irq = pccard_alloc_intr(free_irqs,
pcicintr, 0, &pcic_imask, NULL);
if (pcic_irq < 0)