aboutsummaryrefslogtreecommitdiff
path: root/sys/pccard/slot.h
Commit message (Collapse)AuthorAgeFilesLines
* Do the dreaded s/dev_t/struct cdev */Poul-Henning Kamp2004-06-161-1/+1
| | | | | | | Bump __FreeBSD_version accordingly. Notes: svn path=/head/; revision=130585
* 1. Allow drivers to query CIS strings from OLDCARD.Warner Losh2003-04-231-0/+2
| | | | | | | | | | | | 2. Include backwards compatibility good for the moment (eventually will be turned off in current, but allow for a short transition period). PR: 51333 Submited by: Scott Mitchell (1) MFC after: 2 weeks Notes: svn path=/head/; revision=113946
* Copy manufacturer and version string into the kernel, and copy it toWarner Losh2002-07-221-1/+3
| | | | | | | | | the slot info. This brings OLDCARD's API much closer to NEWCARD and will allow moving more information into the kernel from pccard.conf for common drivers (ed). Notes: svn path=/head/; revision=100484
* Rearrange previous commit that passed the vendor id to the kernel in a wayWarner Losh2002-07-141-8/+7
| | | | | | | | | that's binary compatible for -stable. While binary compatibility doesn't matter much in -current, it is critical for -stable. This change requires pccardd/pccardc to be recompiled. Notes: svn path=/head/; revision=99943
* Add some code which is compatible for NEWCARD. It makes manufacturerTakeshi Shibagaki2002-02-201-0/+3
| | | | | | | | | id transfer from pccardd. Reviewed by: imp Notes: svn path=/head/; revision=90967
* To reduce diffs with -stable, ifdef selinfo.h or select.h includeWarner Losh2001-07-281-1/+5
| | | | Notes: svn path=/head/; revision=80466
* Attempt to fix and document interactions between suspend/resume and pccardcWarner Losh2001-07-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | power x 0. pccardc power x 0 used to disable the slot. But a suspend/resume would reactivate the pccard. It no longer does that. Now the disabling of the slot is sticy until it is reset with power x 1 or the card is ejected. This seems closer to correct behavior to me. o Process all card state changes the same using pccard_do_stat_change(). o Cleanup disabling the card so that we can preserve the state after the change. Basically, don't set it to empty as often as we do. o On suspend, the new state is "empty" and the laststate is "suspend" o Document state machine with a diagram of states and edges. The edges are labeld to tell the reader what event causes the external state changes. o "machdep.pccard.pcic_resume_reset" may be obsolete now. We always call the bridge driver's resume method on resume now. Otherwise cards won't automatically show up. If it needs to stay, I'll add it back. Notes: svn path=/head/; revision=80438
* slots and next haven't been used in a while. GC them.Warner Losh2001-05-191-6/+0
| | | | Notes: svn path=/head/; revision=76840
* o Get rid of static array of slots in pccard layer. Move this to theWarner Losh2001-05-131-1/+6
| | | | | | | | | | | | softc. o Store pointers to softc in dev_t in si_drv1. o Change 'kludge version' to 'classic version' since things are getting less kludgy. o Minor code shuffling so that we probe and attach the pccard slots. o Minor style(9) changes. Notes: svn path=/head/; revision=76538
* First cut at bringing NEC PC98 original pccard bridge code back intoWarner Losh2001-04-191-0/+2
| | | | | | | | | | | | FreeBSD. This code doesn't work just yet, but does compile. We need to start indirecting via the cinfo pointers, rather than directly calling pcic_*. There may be other issues as well, but you gotta start somewhere. Obtained from: PAO3 Notes: svn path=/head/; revision=75687
* Axe a few __P() while I'm in the neighborhood.Warner Losh2001-03-221-7/+7
| | | | Notes: svn path=/head/; revision=74633
* Lots of minor cleanup, plus a couple of interesting things.Warner Losh2001-03-191-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=74444
* select() DKI is now in <sys/selinfo.h>.Garrett Wollman2001-01-091-0/+2
| | | | Notes: svn path=/head/; revision=70834
* Add support for PnP ISA cards, and some laptop PnP support:Warner Losh2000-03-101-1/+0
| | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=57882
* /tmp/msgWarner Losh2000-02-211-1/+0
| | | | Notes: svn path=/head/; revision=57370
* Switch to using suspend/resume methods rather than the APM hooks.Warner Losh1999-12-081-2/+2
| | | | | | | | | | | | | | | | Should have no effect, but does make things a little cleaner. I thought this was the race that was causing problems, but it turned out to be in pccardd waking up after the empty/insert events had happened and being confused. Minor cleanup: o Remove isahd from pccard_devinfo o remove extra from controller o formatting nits o use PCCARD_DEVINFO(d) rather than a bare device_get_ivars(d) Notes: svn path=/head/; revision=54291
* Remove unused junk: next fields and list head. Likely not completelyWarner Losh1999-12-061-14/+1
| | | | | | | | needed on software reaching EOL, but I'd have caught the hang bug sooner had I done this earlier. Notes: svn path=/head/; revision=54179
* Forgot to commit this in last commit.Warner Losh1999-12-011-0/+1
| | | | Notes: svn path=/head/; revision=53991
* Massive rewrite of pccard to convert it to newbus.Warner Losh1999-10-251-44/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | o Gut the compatibility interface, you now must attach with newbus. o Unit numbers from pccardd are now ignored. This may change the units assigned to a card. It now uses the first available unit. o kill old skeleton code that is now obsolete. o Use newbus attachment code. o cleanup interfile dependencies some. o kill list of devices per slot. we use the device tree for what we need. o Remove now obsolete code. o The ep driver (and maybe ed) may need some config file tweaks to allow it to attach. See config files that were committed for examples on how to do this. Drivers to be commited shortly. This is an interrum fix until the new pccard. ed, ep and sio will be supported by me with this release, although others are welcome to try to support other devices before new pccard is working. I plan on doing minimal further work on this code base. Be careful when upgrading, since this code is known to work on my laptop and those of a couple others as well, but your milage may vary. BUGS TO BE FIXED: o system memory isn't allocated yet, it will be soon. o No devices actually have a pccard newbus attach in the tree. BUGS THAT MIGHT BE FIXED: o card removal, including suspend, usually hangs the system. Many thanks to Peter Wemm and Doug Rabson for helping me to fill in the missing bits of New Bus understanding at FreeBSD Con '99. Notes: svn path=/head/; revision=52470
* Remove name field from controller information. Fix name setting inWarner Losh1999-10-161-1/+2
| | | | | | | | | | | pc98 case that I missed before. Attempt to get the irq for the PCIC first from the loader env var and second from the config system. I've been able to boot my laptop with a kernel that hardwired the irq to 10. This should allow boot -c to finally start working for pcic irq, but I've not tested that. Add $FreeBSD$ to slot.h. Notes: svn path=/head/; revision=52281
* Kludge together support for the old pccard system with newbus. ThisWarner Losh1999-09-061-3/+18
| | | | | | | | | | | will allow newbus based drivers to have pccard attachments. Also start printing out probe messages for pccards stating the resources used and regularize many of the pccard printfs. Reviewed by: Peter Wemm. Notes: svn path=/head/; revision=50991
* Convert DEVFS hooks in (most) drivers to make_dev().Poul-Henning Kamp1999-08-231-4/+0
| | | | | | | | | | | | | | | | | | | Diskslice/label code not yet handled. Vinum, i4b, alpha, pc98 not dealt with (left to respective Maintainers) Add the correct hook for devfs to kern_conf.c The net result of this excercise is that a lot less files depends on DEVFS, and devtoname() gets more sensible output in many cases. A few drivers had minor additional cleanups performed relating to cdevsw registration. A few drivers don't register a cdevsw{} anymore, but only use make_dev(). Notes: svn path=/head/; revision=50254
* Initial update pccard code for KLD module support. Module supportPeter Wemm1999-01-191-0/+18
| | | | | | | | | however is only marginally useful until the new-style bus (pci and isa) stuff comes onboard to give us a better shot at actually pci and isa drivers loadable (or preloadable anyway). Notes: svn path=/head/; revision=42819
* - Functional changes to PCCARD support.Nate Williams1997-10-261-2/+1
| | | | | | | | | | | | | * Kill individual drivers 'suspend' routines, since there's no simple/safe way to suspend/resume a card w/out going through the complete probe at initialization time. * Default to using the apm_pccard_resume sysctl code, which basically pretends the card was removed, and then re-inserted. Suspend/resume is now 'emulated' with a fake insert/removal. (Hence we no longer need the driver-specific suspend routines.) Notes: svn path=/head/; revision=30721
* - Do a bunch of gratuitous changes intended to make the code easier toNate Williams1997-10-261-21/+24
| | | | | | | | | | | | | | | follow. * Rename/reorder all of the pccard structures, change many of the member names to be descriptive, and follow more closely other 'bus' drivers naming schemes. * Rename a bunch of parameter and local variable names to be more consistant in the code. * Renamed the PCCARD 'crd' device to be the 'card' device * KNF and make the code consistant where it was obvious. * ifdef'd out some unused code Notes: svn path=/head/; revision=30720
* - Simplify code by removing a variable which was initialized once, neverNate Williams1997-10-231-1/+0
| | | | | | | modified, and was expected to have the initialized value. Notes: svn path=/head/; revision=30652
* Update for new callout interface.Justin T. Gibbs1997-09-211-0/+2
| | | | Notes: svn path=/head/; revision=29681
* Deleted obsolete structure, pc98_device.KATO Takenori1997-02-041-4/+0
| | | | Notes: svn path=/head/; revision=22264
* Update the PCIC controller's imask with individual slot IRQ's.Nate Williams1997-01-111-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Assuming that the intr_mask[] was updated by changing the maskptrs (the existing update_intr_masks() function will not work) this code was written so the PCIC controller insertion/removal events will not interrupt the card IRQ handler events. Some possible scenarios: + Card is removed during IRQ handler: - PCIC card handler is allowed to interrupt - card removal event is called, removing the driver and data structures * card interrupt handler continues w/out driver, data structures, and hardware OR (the code just committed) * card IRQ handler has no hardware to read/write to, but has code and data to run on (XXX- Assume it completes and doesn't spin forever) - PCIC card handler unloads the card driver The current situation at least leaves the card interrupt handlers the drivers and data structures to work with although the hardware can't be guaranteed. Reviewed by: bde Notes: svn path=/head/; revision=21543
* - Added PCIC resume functionNate Williams1997-01-081-0/+2
| | | | | | | | | - Cleaned up VLSI-PCIC work-around code Submitted by: nate & the Nomads Notes: svn path=/head/; revision=21411
* The Great PC98 Merge.Satoshi Asami1996-06-141-0/+4
| | | | | | | | | | | 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 Notes: svn path=/head/; revision=16363
* Adds the APM hooks into the generic pccard kernel files. With this codeNate Williams1996-04-231-0/+2
| | | | | | | | | | | | in place device drivers can now register power-down/power-up routines so that we can use common routines to power-up/power-down cards for insert/removals, suspend/resume, etc.. Reviewed by: phk Submitted by: the 'Nomads' Notes: svn path=/head/; revision=15360
* Fix DEVFS, remove unused vars.Poul-Henning Kamp1996-01-281-0/+3
| | | | Notes: svn path=/head/; revision=13662
* Completed function declarations and/or added prototypes.Bruce Evans1995-11-211-9/+15
| | | | Notes: svn path=/head/; revision=12453
* Clean up the ident style.Poul-Henning Kamp1995-11-091-32/+31
| | | | | | | | | | Remove the APM stuff Add support for VA469 Submitted by: Janic.Thaillandier@ratp.fr Notes: svn path=/head/; revision=12173
* Missed these changes to the pccard stuff. Sorry Martin!Poul-Henning Kamp1995-09-201-0/+1
| | | | Notes: svn path=/head/; revision=10914
* Andrew McRae's pcmcia/pccard code, the kernel part.Poul-Henning Kamp1995-08-241-0/+128
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> Notes: svn path=/head/; revision=10216