summaryrefslogtreecommitdiffstats
path: root/sys/dev/pccard/pccardvar.h
Commit message (Collapse)AuthorAgeFilesLines
* Hoist the Card/Card2 macros that I invented for the wi driver intoimp2001-11-151-0/+10
| | | | | | | | pccard layer and rename them PCMCIA_CARD and PCMCIA_CARD2 respectively (note, this is being done with an eye towards NetBSD integreation so it is easier to keep lists of cards between us and them in sync). Use this in the an and wi drivers.
* Sync to 1.16 pccarddevs to get new PCMCIA_ symbolsimp2001-11-111-3/+3
|
* Update cis tuple parser, add a pccarddevs entry,shiba2001-09-021-0/+19
| | | | | | | | | | | | | and improve PCCARD_IVAR_ETHADDR in pccard_read_ivar(). Change points: (1) Read Function Ext tuple. (2) Add Ratoc REX-R280 entry(fe driver). (3) Take ether address from function ext tuple. Reviewed by: imp Obtained from: NetBSD
* Part two of this NEWCARD update:jon2001-08-271-12/+2
| | | | | | | | | | | | | | | | Briefly, the significant changes include: * Way better resource management in pccbb, pccard and cardbus. * pccard hot-removal now appears to work. * support pre-fetchable memory in cardbus. * update cardbus to support new pci bus interface functions. * Fix CIS reading to no longer use rman_get_virtual(). What's not there, but in the works: * pccard needs to do interrupt properly and not read the ISR on single function cards. * real resource management for pccard * a complete implementation of CIS parsing * need to look into how to correctly use mutex in pccbb
* Add additional enumeration types for CARD_SET_RES_FLAGS.dmlb2001-05-081-1/+5
| | | | | Approved by: imp MFC: after 1 week
* Add accessor/ivar for the "function". This is so we can genericallyimp2001-04-211-1/+3
| | | | match disks and serial ports and maybe others.
* First step towards making loadable modules independent of havingimp2001-03-221-2/+12
| | | | | | | | pccard in the kernel for those drivers with pccard attachments. This makes the compat layer a little larger by introducing some inlines, but should almost make it possible to have independent attachments. The pccard_match function are the only one left, which I will take care of shortly.
* Convert the vendor/product cis strings to an array of CIS entries. Thisimp2001-01-211-2/+1
| | | | | allows us to use the PCCARD_CIS #defines generated to distinguish cards that don't have a Manufacturer and OEM.
* * Better kld support in pccbb/cardbusjon2001-01-061-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | - pccbb no longer needs to remember whether a card is inserted. - pccbb reissues insertion on load of cardbus/pccard modules. - got rid of unnecessary delays in power functions. - Cardbus children are no longer deleted if probe/attach fails. - non-attached child devices are reprobed at driver_added. * CARD interface to read CIS - added card_cis_read/card_cis_free interface to read arbitrary CIS data. This currently is only implemented in cardbus. * pccard begins to work - pccard can now use higher memory space (and uses it by default). - set_memory_offset interface changed. - fixed ccr access, which was broken at multiple locations. - implement an interrupt handler - pccard can now share interrupts. - resource alloc/release/activate/deactivate functions gutted: some resources are allocated by the bridge before the child device is probed or attached. Thus the resource "belongs" to the bridge, and the pccard_*_resource functions need to fudge the owner/rid. - changed some error conditions to panics to speed debugging. * Mutex fix - Giant is entered at the beginning of thread
* First cut at allocating the resources from the CIS after the probe, butimp2000-10-161-0/+6
| | | | | | | | before the attach. Things aren't completely working, but this is a good checkpoint. Also, initialize the dev member of the function as soon as we add it to the parent.
* Lots of little fixes. We no longer panic on card insert:imp2000-10-151-4/+2
| | | | | | | | | o initialize ivars with bzero. o remove interrupt function pointer. netbsd needs it, but we don't. o add lots of comments about bogus things that I've been kludging to try to make the simple cases work. o add new ivar accessor for cis4 to match cis3. likely neither will be needed, but it doesn't hurt to have it.
* o Record the pccard_function in the ivar.imp2000-10-091-0/+1
| | | | | o Use a macro function to get the ivar for the child rather than the casting directly. This should be a little safer and easier to read.
* o Merge in changes to the NetBSD sources:imp2000-09-221-7/+39
| | | | | | | | | | | | | | | | | | | | | | pcmciavar.h 1.9->1.12 1.12, enami, minor coding nits 1.11, augustss, (pcmcia_devinfo NRFB) 1.10, cgd, add generic lookup routines pcmcia.c 1.14->1.23 1.23, drochner, (probe code printing, NRFB) 1.22, augustss, KNF 1.21, uch, (hpcmips tweaks NRFB) 1.20, chopps, remove bogus debug 1.19, enami, minor coding nits 1.18, augustss, (pcmcia_devinfo NRFB) 1.17, nathanw, LP64 printf fixes 1.16, cgd, add generic lookup routines 1.15, aymeric, printf fixes NRFB == not relevant to freebsd o Expand the pccard matching routines to include the ability to match against the CIS strings since our current driver database is based on that. o Add lots more ivars to get the information necessary to snag these values.
* Implement indirection in the pccard probe/attach. This should make itimp2000-09-191-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | possible to have different probe/attach semantics between the two systems and yet still use the same driver for both. Compatibility methods for OLDCARD drivers. We use these routines to make it possible to call the OLDCARD driver's probe routine in the context that it expects. For OLDCARD these are implemented as pass throughs to the device_{probe,attach} routines. For NEWCARD they are implemented such such that probe becomes strictly a matching routine and attach does both the old probe and old attach. compat devices should use the following: /* Device interface */ DEVMETHOD(device_probe), pccard_compat_probe), DEVMETHOD(device_attach), pccard_compat_attach), /* Card interface */ DEVMETHOD(card_compat_match, foo_match), /* newly written */ DEVMETHOD(card_compat_probe, foo_probe), /* old probe */ DEVMETHOD(card_compat_attach, foo_attach), /* old attach */ This will allow a single driver binary image to be used for both OLDCARD and NEWCARD. Drivers wishing to not retain OLDCARD compatibility needn't do this. ep driver minorly updated. sn driver updated more than minorly. Add module dependencies to allow module to load. Also change name to if_sn. Add some debugging code. attempt to fix the cannot allocate memory problem I'd been seeing. Minor formatting nits.
* Change the interface to pccard_function_init. The interface is suchimp2000-09-161-3/+2
| | | | | | | | | | | | | | | | | that it looks for an acceptible one. Once it finds it, it should set the resources for the device. I say "should" because I've not written that. Also set an ivar for the child of pccard. Minor fix to the attach message printed, we lose the slot number, which I'll have to restore later. Adjust the pccard ivar so that we can save the function that corresponds to this driver so we can enable and disable it more easily. Save a pointer to the function so we know what we're dealing with. There should be some way for the driver to specify which cfg it wants to activate. For now the pccard_function_init function just picks one, but we'll have to revisit this going forward. I'm not doing it now because I'd need some way to activate the card many times and I'm not sure that is desirable or even safe with some cards.
* Save a pointer to the dev, if any, that each function attach.imp2000-08-221-0/+1
| | | | Remove some bogus printfs.
* o Move to using PCCARD_SOFTC(dev)imp2000-08-191-3/+3
| | | | | o fill in the size of the actual softc, rather than 1 in data structure o minor debugging improvements.
* Matching commits to pccard for last pcic changes. We now at least toimp2000-06-181-2/+0
| | | | probe/attach. This is a checkpoint.
* Back out the previous change to the queue(3) interface.jake2000-05-261-4/+4
| | | | | | It was not discussed and should probably not happen. Requested by: msmith and others
* Change the way that the queue(3) structures are declared; don't assume thatjake2000-05-231-4/+4
| | | | | | | | the type argument to *_HEAD and *_ENTRY is a struct. Suggested by: phk Reviewed by: phk Approved by: mdodd
* OK. Next step: we read in CIS.imp2000-04-191-4/+7
| | | | | | | | | | | I've done this by having requests to allocate memory propigate up the tree. We'll see how well this works and reevaluate if it isn't working well. Also initialize ptr in the tuple. As well as minor reorg of memory allocation. Likely need to do similar things for I/O when the time comes. I've move all defines from pccardchip.h into pccardvar.h and eliminated pccardchip.h.
* checkpoint latest pccard/pcic hacking:imp2000-04-131-10/+3
| | | | | | | | | | | | | | | | | | | | o Eliminate cross calls between the devices. Instead move to using the newbus messaging system. Added three new card calls: attach_card, detach_card, get_type. o Eliminate interrupt routine in pccard we never use. o Move from deactivate to detach for removing cards. o Start mapping CIS memory, but it is broken and causes panics. At least it is closer to working than before. o Eliminate struct device everywhere. It was bogus. o Initialize softc for pccard device so we have valid pointers to ourselves. o Implement routine to find the pcic ivar for a child device of the pccard so we can use it to talk to the pcic hardware. o Lots of minor tiding up. This version now panics when we try to read the CIS. The next batch of work to make this work is what was outlined in my posting to mobile about resource allocation and such.
* Minor changes to some of the interfaces.imp2000-03-261-1/+12
| | | | | | Remove RF_PCCARD_ATTR in anticipation of removing it from sys/rman.h Add interface for setting "attributes" of pccard/cardbus devices. Minor formatting nits.
* Propagate MAC address in CIS tupple to dev/ed/ driver.hosokawa2000-01-211-0/+13
| | | | | | | | Many ed-based Ethernet PC-cards can't get correct MAC address without this patch. Submitted by: Takanori Watanabe <takawata@shidahara1.planet.sci.kobe-u.ac.jp> Reviewed by: Warner Losh <imp@village.org>
* Eliminate pccard_chip_* tonight.imp2000-01-101-16/+3
| | | | | | | | | | | o ifdef out pccardchip.h (almost all of it, there are dangling bits o Add rid/res members to pccard_function o remove pct/pch from pccard_softc o map memory properly in scan_cis (almost, see XXX for more work) o manage ccr. o remove bogus comment I added about touching the ccr being a layering violation for pccard. It is properly done at that level. o More function prototyping
* Checkpoint of today's changes. We now get to the point where the pccardimp2000-01-061-9/+3
| | | | | | | | | | | | | | | | | layer is trying to access the now unexistant chip functions. o Added DEVPRINTF which is like DPRINTF only calls device_printf. o Made it possible to define PCICDEBUG o Remove ph_parent and use the softc pointer sc instead in pcic_handle. o Remove all references to dv_xname o Add some debug messages. o enable MI attach/detach calling for pccard. o convert pcic_chip_socket_{en,dis}able to pcic_{dis,en}able_socket and connect them to the power_{enable,disbale}_socket. o Remove pccard pointer from pcic_softc. o GC some unused pccard functions. o Convert pccard_chip_socket* to POWER_ENABLE_SOCKET o kill pccard_attach_args. o power_if.m updates. More to come.
* Tonight's cleanups.imp1999-12-071-17/+20
| | | | | | | o Implement memory and I/O activation/deactivation. irq not handled. o switch pcic_chip functions around to use more convenient types. o kill __P and most of the old K&R prototypes just to be mean. o minor other nits
* Flesh out the pccard bus_ methods with either the generic one (whereimp1999-11-291-7/+4
| | | | | | | | | | | | | | | | | | | | | | it would work), or a specialized one. Most of these have been creatively stolen from pccard_nkb, which in turn stole from isa showing that generic bus_ versions of bus_{set,get,delete}_resource might be profitable. Fix a couple of minor bugs introduced in the last round of updates from NetBSD. Start on the pccard_ivar structure which will hold the resources and slot number. Add tcic as a possible attachment for pccard and rename the attachment for pcicx to pcic since the name has changed since I originally wrote this stuff. Next up: stringing together the various memory and I/O allocation/mapping primitives in i82365.c, final touches on the isa attach routine and other fun stuff in that line of attach.
* Moderately hacked pccard code from newconfig. It is somewhat inimp1999-10-261-0/+290
incomplete and likely has problem. The code was originally pcmcia, but I renamed it to pccard and made it compile on FreeBSD -current. I converted SIMPLEQ to STAILQ as well as a few sc->dev.xname -> device_printf changes. This is a green port of fairly mature code. I derived this work from the FreeBSD newconfig project (http://www.jp.freebsd.org/newconfig). Any problems with it are likely introduced by me. Obtained from: newconfig project
OpenPOWER on IntegriCloud