summaryrefslogtreecommitdiffstats
path: root/sys/dev/pccbb/pccbbvar.h
Commit message (Collapse)AuthorAgeFilesLines
* Make cbb interrupts MPSAFE:imp2003-06-121-2/+3
| | | | | | | | | | | | | | | | o Register ISR INTR_MPSAFE. o Loop on KTHREAD_DONE == 0 in the thread. o Safe the INTR_MPSAFE flag for client drivers (don't know if there are any CardBus/PCI drivers that are INTR_MPSAFE) o Read status after acquiring mtx_lock(Giant) rather than before so that we catch state changes that happen while Giant is being acquired. o Turn off the CD bit when we see a CD interrupt, and turn it back on after we've attached/detached the card. o On suspend, actually set the CBB_SOCKET_MASK to zero rather than oring in '0' to turn it off on suspend. o If the ISR that's registerd is MPSAFE, don't acquire Giant around call to client ISR. o Fix comments to reflect these changes.
* MFp4:imp2003-06-071-2/+0
| | | | Migrate some common pccard code into exca.
* Simplify the power code somewhat (this makes the module about 100imp2003-06-071-12/+8
| | | | bytes smaller).
* Add two of three workarounds for interrupt storms for o2micro parts asimp2003-06-061-0/+1
| | | | | | | | | obtained from o2micro. These should only be needed for 'older' o2micro bridges (anything before the 7xxx series of bridges), but will work with the new bridges. # I don't plan on porting it to oldcard, but will happily commit to # oldcard if someone else needs them.
* MFp4:imp2002-10-071-3/+5
| | | | | | | | | | | | | | o Better resume code. Move the comments around. Force the socket state to be querried. Ack the interrupts properly. o Intercept the interrupt requests and keep a list of interrupts to service ourselves. When the card attaches, set its OK bit. When we get a card status change interrupt for that card, clear the OK bit. Don't call the ISR if the OK bit is cleared. Iwasaki-san and yamamoto-san have both sent me patches that fix the same problem this fixes, but at the pccard level. o Try to get the signalling of the thread to actually die. This might not be 100% right, but it is less wrong than before. o Add a SIC next to a TI type that looks like it could be wrong, but isn't.
* Rename the pccbb device to cbb.imp2002-08-151-9/+9
|
* When we allocate our bus address via the kludge that we have in theimp2002-08-101-3/+4
| | | | | | | | | code to do it when the bios doesn't do it for us, flag it. Then, when we dealloc, do an equal kludge to get rid of the address. This should address the can't get IRQ and panic bug in a more graceful way. # really should write a dealloc routine and just call it instead, since # this might not fix things in the kldunload case.
* MFp4:imp2002-07-261-6/+7
| | | | | | | | | | | | | | | | | o Rename the insanely long PCIC bridge ids. o Add my copyright to pccbb.c o Add support for the TI-1510, TI-1520 and TI-4510 series of upcoming bridges. o Init MFUNC if it is zero and the TI part has a MFUNC register at offset 0x8c (1030, 1130 and 1131 don't have anything there, the 1250,1251,1251B and 1450 have a different thing there. The rest have it. TI is likely to only do MFUNC from now on. The IRQMUX in the 1250 series of chips needs no tweaks. o Adjust to new exca interface. o Add comments about TI chips that I learned in talking to an engineer at TI. o Add register definitions for MFUNC. o Create CB_TI125X chipset type.
* Use a cv rather than tsleep and friends to do the sleep/wakeupimp2002-06-131-1/+2
| | | | | | | | handshake between the ISR and the worker thread. Move the mutex lock so that it only protects the cv_wait. This elimiates the not sleeping with pccbb1 held messages some people were seeing. Reviewed by: jhb (at least an early version)
* Bulk changes made during the BSDcon kernel summit and travel afterwards.imp2002-02-171-18/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Appologies for making this one bulk commit, but I have tested all these changes together and don't want to break anything by trying to disentangle it. o Make debugging a sysctl/tunable o Remove flags word from yenta chip info, it is unused o Make 16-bit card I/O range and 32-bit card I/O range tunables o Start the rename of pccbb to cbb to match NetBSD by misc renames. o Kill the now bogus list of softcs to create kthread. Instead, just create the kthread in the attach routine. o Remove sc_ from some structure names. It isn't needed. o Refine chipset lookup code. o Match generic PCI <-> CardBus bridges. We specifically don't generically match PCI PCMCIA bridges because they are not, with one exception, yenta devices. o Add some comments about the why we need to have a function table ala OLDCARD o The PCI interrupt routing by using the ExCA registers is needed for for all bridges, per the spec, not just TI ones. o Collapse TOPIC95 and TOPIC95B. o Using the ToPIC 97 and 100 datasheets, try to support these bridges better, but more work is needed. o Generally clarify some XXX comments and add them in a few places where things didn't look right to me. o Move interrupt generating register access until after we establish an ISR. o Add support for YV and XV cards. X and Y are numbers to be determined later (but maybe never). o factor powerup code for 16-bit and 32-bit cards. o When a card supports more than one voltage, prefer the lowest supported volage. Windows does this, and MS's design guides imply this is the right thing to do. o Document race between kthread_exit(0) and kldunload's unmapping of pages that John Baldwin and I discovered. o Debounce the CSC interrupt a little better. o When a 16-bit card is inserted when we don't have a pccard child, warn about it better. Ditto for 32-bit card. o Ack ALL the interrupt bits that we get, not just 0x1. o maybe a couple minor style nits corrected.
* Migrate towards using the new exca module for 16bit stuff. This is aimp2002-01-291-8/+1
| | | | | | WIP, but works for me. Also do some minor code factoring and code cleanup while I'm here.
* use bus_space(9) rather than the memory mapped register set. This isimp2002-01-141-10/+2
| | | | the first step towrads merging pcic and pccbb for 16-bit cards.
* Part two of this NEWCARD update:jon2001-08-271-12/+7
| | | | | | | | | | | | | | | | 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
* Non-functional changes to NEWCARD stuff.jon2001-08-261-51/+51
| | | | | | | | | | | | This is the first part of a two-part update to NEWCARD. Changes in this commit are non-functional, and includes the following: * indentation and other changes to meet style(9). * other minor style consistancy changes * addition of comments * renaming of device_t variables to be consistant across all of NEWCARD. (note that not all style violations are fixed in this commit -- those that aren't will be clobbered by the next commit.)
* * Better kld support in pccbb/cardbusjon2001-01-061-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | - 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
* Updates to match changes elsewhere in the PCI subsystem:msmith2000-12-131-1/+3
| | | | | | | | | - Remove redundant header-type-specific support in the cardbus pcibus clone. The bridges don't need this anymore. - Use pcib_get_bus instead of the deprecated pci_get_secondarybus. - Implement read/write ivar support for the pccbb, and teach it how to report its secondary bus number. Save the subsidiary bus number as well, although we don't use it yet.
* A bunch of newcard/cardbus changes that's been sitting in my tree for a while:jon2000-11-281-5/+27
| | | | | | - Make pccbb/cardbus kld loadable and unloadable. - Make pccbb/cardbus use the power interface from pccard instead of inventing its own. - some other minor fixes
* Initial commit of NEWCARD cardbus side (that actually compiles and works)jon2000-10-181-0/+105
Files: dev/cardbus/cardbus.c dev/cardbus/cardbusreg.h dev/cardbus/cardbusvar.h dev/cardbus/cardbus_cis.c dev/cardbus/cardbus_cis.h dev/pccbb/pccbb.c dev/pccbb/pccbbreg.h dev/pccbb/pccbbvar.h dev/pccbb/pccbb_if.m This should support: - cardbus controllers: * TI 113X * TI 12XX * TI 14XX * Ricoh 47X * Ricoh 46X * ToPIC 95 * ToPIC 97 * ToPIC 100 * Cirrus Logic CLPD683x - cardbus cards * 3c575BT * 3c575CT * Xircom X3201 (includes IBM, Xircom and, Intel cards) [ 3com support already in kernel, Xircom will be committed real soon now] This doesn't work with 16bit pccards under NEWCARD. Enable in your config by having "device pccbb" and "device cardbus". (A "device pccard" will attach a pccard bus, but it means you system have a high chance of panicing when a 16bit card is inserted) It should be fairly simple to make a driver attach to cardbus under NEWCARD -- simply add an entry for attaching to cardbus on a new DRIVER_MODULE and add new device IDs as necessary. You should also make sure the card can be detached nicely without the interrupt routine doing something weird, like going into an infinite loop. Usually that should entail adding an additional check when a pci register or the bus space is read to check if it equals 0xffffffff. Any problems, please let me know. Reviewed by: imp
OpenPOWER on IntegriCloud