Commit Graph

11 Commits

Author SHA1 Message Date
Warner Losh 36260de0cf Lots of minor cleanup, plus a couple of interesting things.
o Attempt to disable the slot when we detect that there are problems with
  it in our ISR.  This should make polling mode work better for more cards,
  but more work may be needed.  This "disabling" sets the card interrupt
  register to 0.  This worked for me for lots of tests in polling mode.
o Now that I've found datasheets, fix a boatload of magic numbers in the
  source to make it easier to understand.
o Use a table of names rather than a big case statement.
o Cull a few of the "unused" controller types that we map to other times
  that were a vestiage of PAO code that we never merged in the same way.
o Enforce legal IRQs.  You are no longer allowed to try to use IRQs that
  will fail on all known ISA/PCI <-> PCMCIA bridges.  The bridges do not
  have pins for these illegal interrupts, and all of them are listed as
  reserved and/or illegeal in the datasheets depending on which one you
  look at.
o Add comments about how IBM-AT based computers and NEC PC-98 based computers
  map these interrupts and which ones are valid.
o Always clear the bit that steers the management interrupt either to the
  value listed in the PCIC_STAT_INT register.  I've seen this bit get set
  on suspend/resume and after windows boot, and it does't hurt to clear it.
  NOTE: this might mean we can share this interrupt in the future.
2001-03-19 07:10:38 +00:00
Warner Losh 595166f0f7 Add support for PnP ISA cards, and some laptop PnP support:
o break out some of the probe routine the allocation of resources
  into an attach routine
o Recognize PnP ids
o Allocate IRQ per card rather than per system
o Better polling reporting
o Remove unneeded include files in slot.h
o store a pseudo unit number on each device we find.
o Pass a unit number to interrupt/timeout routine and use it for polling
  the hardware.

Tested on: My VAIO and with the Linksys pccard reader.
Approved by: jkh
2000-03-10 05:43:29 +00:00
Warner Losh 6e73d499d8 Add probing support for the vadem VG365 and the Vadem VG465 pcic chips.
We do the same thing we do with all the other Vadem chips and print the
right identification for these chips.  Tested with the 365, and inferred
for the 465.

This allows the cheapo PCMCIA card that I got from necx to print the right
chip number on boot.
1998-08-25 22:46:44 +00:00
Nate Williams 01f370b672 Modem cards send the speaker audio (dialing noises) to the host's
speaker.  Cirrus Logic PCIC chips must enable this.  There is also a Low
Power Dynamic Mode bit that claims to reduce power consumption by 30%,
so enable it and hope for the best.

PR:		4650
Submitted by:	Nick Sayer <nsayer@quack.kfu.com>
1997-10-06 03:17:36 +00:00
Nate Williams 34d9a7896e - Style police
- Updated some comments using data from the most recent PAO release.

Obtained (partially) from:	PAO-970616
1997-10-06 02:46:38 +00:00
Poul-Henning Kamp b805b39e43 1. i82365.h: Chip identifiers should not be #ifdef PC98. Add identifier
(pt. unused) for TI PCI1130.

2. pccard.c: PCIC_RESUME_RESET is now (also) a sysctl.  (Never make it
    a #ifdef if it can be made a sysctl!)

3. pcic.c: make getb() and putb() proper member functions of struct
    pcic_slot.  Add a couple of missing casts.
1997-04-20 07:21:12 +00:00
Satoshi Asami ad63a118b2 The Great PC98 Merge.
All new code is "#ifdef PC98"ed so this should make no difference to
PC/AT (and its clones) users.

Ok'd by:	core
Submitted by:	FreeBSD(98) development team
1996-06-14 11:02:28 +00:00
Nate Williams 4765b33331 Updated PC-CARD support to contain most of the code from the latest
Japanese BSD-Nomad release.

Reviewed by:	phk
Submitted by:	hosokawa@mt.cs.keio.ac.jp and the rest of the Nomads
1996-02-21 23:20:21 +00:00
Nate Williams ea5ff881da Don't rely on the card 'automatically' powering up when we probe it.
On some laptops, this doesn't work (ie; IBM 75x series), so force it
to power on.

With this modification, I am able to read the tuples off 4 different
PCMCIA cards on my ThinkPad.

Reviewed by:	phk@FreeBSD.org
Obtained from:  if_zp.c
1996-01-06 07:49:43 +00:00
Poul-Henning Kamp fd24fbdf21 Clean up the ident style.
Remove the APM stuff
Add support for VA469

Submitted by: Janic.Thaillandier@ratp.fr
1995-11-09 20:44:36 +00:00
Poul-Henning Kamp 0d2966d3f2 Andrew McRae's pcmcia/pccard code, the kernel part.
This is still very green, but I have managed to get my modem working.
Lots of work still to do, but now at least we can commit it. /phk

Reviewed by:	phk
Submitted by:	Andrew McRae <andrew@mega.com.au>
1995-08-24 08:56:20 +00:00