diff options
author | imp <imp@FreeBSD.org> | 2001-05-21 03:22:52 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2001-05-21 03:22:52 +0000 |
commit | c647eb3dd3a3fe40270d6f28f46bb14b0e82f03f (patch) | |
tree | e32e014d12f98b72a7d509d506384d5e681a77aa /sys/pccard/pcicvar.h | |
parent | 9ff3821aa3027d9a1088a351417d00294fb2e394 (diff) | |
download | FreeBSD-src-c647eb3dd3a3fe40270d6f28f46bb14b0e82f03f.zip FreeBSD-src-c647eb3dd3a3fe40270d6f28f46bb14b0e82f03f.tar.gz |
Next step towards pcic_pci: the ability to allocate mapped memory in attach.
o Introduce flags word to the softc. This will be used to control various
aspects of the driver. Right now there are two bits defined, PCIC_IO_MAPPED
and PCIC_MEM_MAPPED. One for ISA cards that are I/O mapped, the other is
for PCI cards that are memory mapped. Only the ISA side is implemented
with this commit.
o Introduce a pcic_dealloc which will cleanly dealloc resources used. Right
now it is only supported when called from probe/attach.
o Keep track of resources allocated in the pcic_softc.
o move pcictimeout_ch to the softc so we can support multiple devices
in polling mode.
o In ISA probe, set PCIC_IO_MAPPED.
o Introduce and compute the slot mask. This will be used later when
we expand the number of slots on ISA from 2 to 4. In such a case, we
appear to have to use polling mode otherwise we get two different cards
trying to drive the same interrupt line. I don't have hardware to
test this configuration, so I'll stop here.
Diffstat (limited to 'sys/pccard/pcicvar.h')
-rw-r--r-- | sys/pccard/pcicvar.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sys/pccard/pcicvar.h b/sys/pccard/pcicvar.h index bc0dd34..2f46014 100644 --- a/sys/pccard/pcicvar.h +++ b/sys/pccard/pcicvar.h @@ -41,7 +41,19 @@ struct pcic_slot { struct pcic_softc { + u_int32_t slotmask; /* Mask of valid slots */ + u_int32_t flags; /* Interesting flags */ +#define PCIC_IO_MAPPED 0x00000001 +#define PCIC_MEM_MAPPED 0x00000002 + int iorid; /* Rid of I/O region */ + struct resource *iores; /* resource for I/O region */ + int memrid; + struct resource *memres; + int irqrid; + struct resource *irqres; + void *ih; int unit; + struct callout_handle timeout_ch; struct pcic_slot slots[PCIC_MAX_SLOTS]; }; |