Commit Graph

20 Commits

Author SHA1 Message Date
drochner b04ad75025 use locator passing versions of xxxsubmatch() and simplify the code by
using arithmetics instead of case statements
2004-09-13 12:34:00 +00:00
mycroft 768040dd66 Various cleanup:
* Clean up the socket state earlier in the attach process -- not relying on
  the socket attachment to do it.
* Get rid of PCIC_LASTSTATE_HALF.  It's pointless.
* In pcic_wait_ready(), also check for the card vanishing, like in pccbb.
* Assert #RESET before powering up the card, not after.  (I think it was
  actually okay because the value was left as 0 from a previous disable or
  the initial socket attach, but...
* If the card fails to come ready, don't bother reinstating windows or
  anything -- just power it down.
2004-08-12 13:37:40 +00:00
mycroft a23e15bcbe Rather than having a call up from the low-level driver to get the card type,
instead have a call down from the PCMCIA mid-layer to set it.  Use this from
pcmcia_function_enable().  (Currently the policy is the same, but this would
allow for more flexibility in deciding which mode to use.)

Now it is safe to hold the socket enabled during attach, so do that.  Only
one enable/disable cycle to attach a card now!
2004-08-11 00:18:18 +00:00
mycroft a9e1f75ec7 Several changes to eliminate bogus controllers and sockets from being found:
PCIC_VENDOR_NONE: New.
PCIC_VENDOR_CIRRUS_*: Collapse the 2 chips into one vendor ID.

pcic_ident_ok(): Check the ID revision field -- if it's 0, punt.

pcic_vendor(): Check the ID revision field -- if it's 0, or the ID register
is all-1s, assume there is no chip present.  (Previously this would return
"Unknown controller" -- which, AFAICT, *never* resulted in a working device.)
Do the Cirrus check only after verifying that we got the Intel ID.

pcic_attach(): Use a priori knowledge of the Cirrus chips to determine the
number of sockets rather than trying (unsuccessfully) to probe.  Also, just
blast all of PCIC_INTR -- we do this in pcic_deactivate_card() anyway.
2003-09-05 01:02:51 +00:00
takemura fe56c2b22a 3.3V support for Ricoh 5C[23]96 parts from ngc@ff.iij4u.or.jp.
Preliminary bridge identification code from imp@village.org.
2002-11-24 02:46:55 +00:00
soren 875bff0962 To make dev/pcmcia work on platforms with 64-bit bus_addr_t and
32-bit bus_size_t (sparc), change the pcmcia_mem_map(9) offsetp
argument to bus_size_t as it is used as a bus_space offset.
2001-12-15 13:23:20 +00:00
thorpej fc96443d15 New callout mechanism with two major improvements over the old
timeout()/untimeout() API:
- Clients supply callout handle storage, thus eliminating problems of
  resource allocation.
- Insertion and removal of callouts is constant time, important as
  this facility is used quite a lot in the kernel.

The old timeout()/untimeout() API has been removed from the kernel.
2000-03-23 07:01:25 +00:00
thorpej 6f1701b01c Put a lock on the pcic, to serialize access to the chip during event
handling.  This is important when multiple cards are present when
the system boots, as we use tsleep now instead of delay in various
places (delay used to provide serialization by virtue of not causing
a context switch).
2000-02-26 17:24:44 +00:00
thorpej 3f9cf7572c Don't use void * for chipset tags. Bad hacker, no biscuit. 2000-02-22 16:04:44 +00:00
mycroft 2a2d421881 Forgotten part of chopps\'s i82365_isasubr.c commit. 2000-02-08 17:56:58 +00:00
chopps d344dd94ab keep track of the enabled state of a socket 2000-02-04 08:42:07 +00:00
enami e16a469c8f Cosmetic changes. 2000-02-02 10:19:51 +00:00
chopps d8e72e215d implement probing for available irqs on non-cirrus pcmcia controllers
including cardbus controllers running in pcic mode
2000-02-01 22:39:51 +00:00
haya 4eee111127 This is the first check-in of CardBus driver. CardBus driver contains
CardBus bus stub, YENTA PCI-CardBus bridge (cbb), 3Com 3C575TX driver
(ex) and Intel fxp driver.

TODO:
  o Conform to the KNF more strictly.
  o Be unified with pcmcia code as much as possible.
  o Add more drivers for CardBus card, such as APA-1480 or USB card.

The affected files are listed below.

	sys/arch/i386/conf/files.i386
	sys/arch/macppc/conf/files.macppc
	sys/conf/files
	sys/dev/ic/elinkxl.c
	sys/dev/ic/elinkxlvar.h
	sys/dev/ic/i82365.c
	sys/dev/ic/i82365var.h
	sys/dev/isa/i82365_isasubr.c
	sys/dev/pci/files.pci
	sys/dev/pcmcia/pcmcia.c
	sys/dev/pcmcia/pcmciachip.h

The added files are listed below.

	sys/arch/i386/conf/CARDBUS
	sys/arch/i386/include/rbus_machdep.h
	sys/arch/i386/i386/rbus_machdep.c
	sys/arch/macppc/include/rbus_machdep.h
	sys/arch/macppc/macppc/rbus_machdep.c
	sys/dev/cardbus/if_ex_cardbus.c
	sys/dev/cardbus/Makefile.cardbusdevs
	sys/dev/cardbus/cardbus.c
	sys/dev/cardbus/cardbus_map.c
	sys/dev/cardbus/cardbusdevs
	sys/dev/cardbus/cardbusdevs.h
	sys/dev/cardbus/cardbusdevs_data.h
	sys/dev/cardbus/cardbusvar.h
	sys/dev/cardbus/cardslot.c
	sys/dev/cardbus/cardslotvar.h
	sys/dev/cardbus/devlist2h.awk
	sys/dev/cardbus/files.cardbus
	sys/dev/cardbus/if_fxp_cardbus.c
	sys/dev/cardbus/pccardcis.h
	sys/dev/cardbus/rbus.c
	sys/dev/cardbus/rbus.h
	sys/dev/pci/pccbb.c
	sys/dev/pci/pccbbreg.h
	sys/dev/pci/pccbbvar.h
1999-10-15 06:07:17 +00:00
msaitoh 88176e7d20 Fix about insertion/removal event problem. 1999-01-21 07:43:32 +00:00
christos dfd0f0f949 PR/6669: Michael Eriksson: pcic_chip_mem_alloc() can't handle large requests 1999-01-01 14:05:18 +00:00
thorpej fc44652721 Implement a kernel thread per PCMCIA socket to handle card insertion and
removal events.
1998-11-16 22:41:01 +00:00
matt 18319c0048 Changes so that these compile on NetBSD/alpha as well as NetBSD/i386. 1998-05-23 18:32:29 +00:00
marc 63f5e2bbc3 move pcic_wait_ready to i82365.c 1998-02-01 23:33:51 +00:00
thorpej b3620a0f8d Pull marc-pcmcia branch down to trunk. 1997-10-16 23:18:18 +00:00