summaryrefslogtreecommitdiffstats
path: root/sys/pccard
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1995-10-10 09:52:55 +0000
committerphk <phk@FreeBSD.org>1995-10-10 09:52:55 +0000
commit11529bae0029e7484267df5b331ace754e689e56 (patch)
tree107cc4de7776258abc2229b986efbb12009500ad /sys/pccard
parentd2ceeaab1918b9f5649d9b70a1fa01d95e582166 (diff)
downloadFreeBSD-src-11529bae0029e7484267df5b331ace754e689e56.zip
FreeBSD-src-11529bae0029e7484267df5b331ace754e689e56.tar.gz
PCCARD support.
Diffstat (limited to 'sys/pccard')
-rw-r--r--sys/pccard/pccard.c11
-rw-r--r--sys/pccard/pcic.c7
2 files changed, 11 insertions, 7 deletions
diff --git a/sys/pccard/pccard.c b/sys/pccard/pccard.c
index 9f0af42..ae5ca49 100644
--- a/sys/pccard/pccard.c
+++ b/sys/pccard/pccard.c
@@ -402,15 +402,12 @@ unsigned int mask;
if (!(mask & imask))
continue;
printf("IRQ=%d\n",irq);
+ if (maskp)
+ INTRMASK (*maskp, mask);
if (register_intr(irq, 0, 0, hand, maskp, unit)==0)
{
printf("IRQ=%d yes!\n",irq);
- if (maskp)
- INTRMASK (*maskp, mask);
- update_intr_masks();
-
- INTREN (mask);
return(irq);
}
}
@@ -464,6 +461,9 @@ int err, irq = 0, s;
*/
else
{
+/* XXX ED.C
+dp->imask = &net_imask;
+*/
irq = pccard_alloc_intr(drvp->irqmask,
slot_irq_handler, (int)sp, dp->imask);
if (irq < 0)
@@ -509,6 +509,7 @@ int err, irq = 0, s;
remove_device(devp);
else
devp->running = 1;
+ INTREN (1 << irq);
return(err);
}
static void
diff --git a/sys/pccard/pcic.c b/sys/pccard/pcic.c
index d03e10b..56c0a7d 100644
--- a/sys/pccard/pcic.c
+++ b/sys/pccard/pcic.c
@@ -291,8 +291,10 @@ int reg = mp->window * PCIC_MEMSIZE + PCIC_MEMBASE;
putw (cp, reg, sys_addr & 0xFFF);
putw (cp, reg+2, (sys_addr + (mp->size >> 12) - 1) & 0xFFF);
putw (cp, reg+4, ((mp->card >> 12) - sys_addr) & 0x3FFF);
-#if 1
- printf("card offs = 0x%x, sys_addr = 0x%x\n", ((mp->card >> 12) - sys_addr) & 0x3FFF, sys_addr);
+#if 0
+ printf("card offs = card_adr = 0x%x 0x%x, sys_addr = 0x%x\n",
+ mp->card, ((mp->card >> 12) - sys_addr) & 0x3FFF,
+ sys_addr);
#endif
/*
* Each 16 bit register has some flags in the upper bits.
@@ -558,6 +560,7 @@ unsigned char c;
if (pcic_irq < 0)
printf("pcic: failed to allocate IRQ\n");
}
+ INTREN (1 << pcic_irq);
/*
* Check for a card in this slot.
*/
OpenPOWER on IntegriCloud