diff options
-rw-r--r-- | sys/pccard/i82365.h | 8 | ||||
-rw-r--r-- | sys/pccard/pcic.c | 12 | ||||
-rw-r--r-- | sys/pccard/pcic_isa.c | 1 |
3 files changed, 17 insertions, 4 deletions
diff --git a/sys/pccard/i82365.h b/sys/pccard/i82365.h index a243168..633923f 100644 --- a/sys/pccard/i82365.h +++ b/sys/pccard/i82365.h @@ -267,11 +267,11 @@ * * For NEC PC98 machines, irq 3, 5, 6, 9, 10, 11, 12, 13 are allowed. * These correspond to the C-BUS signals INT 0, 1, 2, 3, 41, 42, 5, 6 - * respectively. This is with the desktop C-BUS addin card. I don't - * know if this corresponds to laptop usage or not. + * respectively. This is with the desktop C-BUS addin card. * - * I'm not sure the proper way to map these interrupts, but it looks - * like pc98 is a subset of ibm-at so no actual mapping is required. + * Hiroshi TSUKADA-san writes in FreeBSD98-testers that cbus IRQ + * 6 is routed to the IRQ 7 pin of the pcic in pc98 cbus based + * cards. I do not know how pc98 laptop models are wired. */ #ifdef PC98 #define PCIC_INT_MASK_ALLOWED 0x3E68 /* PC98 */ diff --git a/sys/pccard/pcic.c b/sys/pccard/pcic.c index c8b75a4..28ac7f9 100644 --- a/sys/pccard/pcic.c +++ b/sys/pccard/pcic.c @@ -129,6 +129,16 @@ pcic_putw(struct pcic_slot *sp, int reg, unsigned short word) sp->putb(sp, reg + 1, (word >> 8) & 0xff); } +static __inline int +host_irq_to_pcic(int irq) +{ +#ifdef PC98 + if (irq == 6) + irq = 7; +#endif + return (irq); +} + /* * Free up resources allocated so far. */ @@ -284,6 +294,7 @@ pcic_do_mgt_irq(struct pcic_slot *sp, int irq) } else { /* Management IRQ changes */ pcic_clrb(sp, PCIC_INT_GEN, PCIC_INTR_ENA); + irq = host_irq_to_pcic(irq); sp->putb(sp, PCIC_STAT_INT, (irq << 4) | 0x8); } } @@ -509,6 +520,7 @@ pcic_mapirq(struct slot *slt, int irq) struct pcic_slot *sp = slt->cdata; if (sp->sc->csc_route == pci_parallel) return; + irq = host_irq_to_pcic(irq); if (irq == 0) pcic_clrb(sp, PCIC_INT_GEN, 0xF); else diff --git a/sys/pccard/pcic_isa.c b/sys/pccard/pcic_isa.c index b66c3cb..f90e76f 100644 --- a/sys/pccard/pcic_isa.c +++ b/sys/pccard/pcic_isa.c @@ -51,6 +51,7 @@ static struct isa_pnp_id pcic_ids[] = { {PCIC_PNP_82365_CARDBUS, NULL}, /* PNP0E03 */ {PCIC_PNP_SCM_SWAPBOX, NULL}, /* SCM0469 */ {PCIC_NEC_PC9801_102, NULL}, /* NEC8091 */ + {PCIC_NEC_PC9821RA_E01, NULL}, /* NEC8121 */ {0} }; |