summaryrefslogtreecommitdiffstats
path: root/sys/pccard/pcic_isa.c
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2001-09-04 04:47:58 +0000
committerimp <imp@FreeBSD.org>2001-09-04 04:47:58 +0000
commitb2ea2b171b8f6407d574462ca2013565079904ec (patch)
treedebe7561bea176c6e277b8af756d91eb8d3640e5 /sys/pccard/pcic_isa.c
parente24b3c902b4e4c09d5da29badc6a2760db5f0100 (diff)
downloadFreeBSD-src-b2ea2b171b8f6407d574462ca2013565079904ec.zip
FreeBSD-src-b2ea2b171b8f6407d574462ca2013565079904ec.tar.gz
Move to using a chip function + function pointers to deal with the
function and csc interrupt routing path (eg, ISA or PCI) so that we can more easily switch between the two. When we don't have a card ISR, put the function interrupt into ISA mode. This effectively masks the interrupt since it happens once, and not again until we have an ISR. This should help hangs, and might help people that unwisely update the kernel w/o updating pccardd. This is done at mapirq time. Force CL-PD6729/30 to use ISA interrupt routing and maybe even detect the number of pccard slots properly (this is still WIP). We aren't going to support PCI interrupts for this release. A future release should support them, however. Shibata-san's 3.3V fixes are not included. Add a hack which should, in i386, rewrite IRQ 0 cardbus bridges to be IRQ 255, which should cause interrupts to be routed. This is mostly untested since my one tester disappeared after reporting nothing changed. Implement, but do not use, a power method called cardbus. It looked like a great way to get around the 3.3V problem, but it seems that you can only use it to power cardbus cards (I get no CIS when I enable it, so maybe we're programming things bogusly). GC the intr and argp stuff from the slot database. Improve the ToPIC support with the power hacks that Nakagawa-san published in FreeBSD Press and that Hiroyuki Aizu-san ported to -stable. The ToPIC hacks were for 3.3V support in ToPIC 100, but it looks like the '97 also has identical registers, so use them too. Add some #defines for the cardbus power stuff. Finally implement making CSC on the Ricoh chips ISA or PCI. This will allow polling mode to work on vaios, I think. Add some minor debugging. This should likely be cleaned up or put behing a bootverbose. Some of this work, and earlier work, was influanced by Chiharu Shibata-san's power handing patches posted to bsd-nomads:15866. MFC: Soon, if possible.
Diffstat (limited to 'sys/pccard/pcic_isa.c')
-rw-r--r--sys/pccard/pcic_isa.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/sys/pccard/pcic_isa.c b/sys/pccard/pcic_isa.c
index ce39f26..e20eedf 100644
--- a/sys/pccard/pcic_isa.c
+++ b/sys/pccard/pcic_isa.c
@@ -75,6 +75,16 @@ static struct {
{ "Intel i82365SL-DF", PCIC_DF_POWER}
};
+static pcic_intr_way_t pcic_isa_intr_way;
+static pcic_init_t pcic_isa_init;
+
+struct pcic_chip pcic_isa_chip = {
+ pcic_isa_intr_way,
+ pcic_isa_intr_way,
+ pcic_isa_mapirq,
+ pcic_isa_init
+};
+
/*
* Look for an Intel PCIC (or compatible).
* For each available slot, allocate a PC-CARD slot.
@@ -291,6 +301,7 @@ pcic_isa_attach(device_t dev)
sc->iores = r;
sc->csc_route = pcic_iw_isa;
sc->func_route = pcic_iw_isa;
+ sc->chip = &pcic_isa_chip;
rid = 0;
r = NULL;
@@ -331,6 +342,26 @@ pcic_isa_attach(device_t dev)
return (pcic_attach(dev));
}
+/*
+ * ISA cards can only do ISA interrupts. There's no need to do
+ * anything but check args for sanity.
+ */
+static int
+pcic_isa_intr_way(struct pcic_slot *sp, enum pcic_intr_way iw)
+{
+ if (iw != pcic_iw_isa)
+ return (EINVAL);
+ return (0);
+}
+
+/*
+ * No speicial initialization is necesary for ISA cards.
+ */
+static void
+pcic_isa_init(device_t dev)
+{
+}
+
static device_method_t pcic_methods[] = {
/* Device interface */
DEVMETHOD(device_probe, pcic_isa_probe),
OpenPOWER on IntegriCloud