summaryrefslogtreecommitdiffstats
path: root/sys/pccard/pcic.c
Commit message (Collapse)AuthorAgeFilesLines
* Set the device name for NEC PC98 PCMCIA Controller on boot.imp2001-04-211-18/+19
| | | | | # We really need to allocate i/o ports for it, but I need to learn # the pc98 bus space better before attempting that.
* Indirect off cinfo rather than calling pcic_ functions directly. Thisimp2001-04-191-12/+12
| | | | | | | means that the pcic98 functionality might now work (I've tested it on my pcic machine, but not the pcic98). Since these functions are rarely called, it is unlikely that this will have a measurable impact on performance.
* First cut at bringing NEC PC98 original pccard bridge code back intoimp2001-04-191-24/+335
| | | | | | | | | 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
* Add #define for IBM3765.imp2001-04-111-3/+2
| | | | | Fix SWAMPBOX. It had actiontec's ID. Reorder pnpids so they are in alphabetical order.
* Axe a few __P() while I'm in the neighborhood.imp2001-03-221-4/+3
|
* Lots of minor cleanup, plus a couple of interesting things.imp2001-03-191-75/+77
| | | | | | | | | | | | | | | | | | | | | | | 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.
* Fix a minor bug that prevents NEWBUS users from setting more thandmlb2001-01-091-1/+1
| | | | | | | | one memory map. The memory window for the PCIC is identifed by the resource id for NEWSBUS drivers. pccardd always uses window 0 and rid 0 when setting maps up. This fix does not affect pccardd's handling of common memory for ed cards. Reviewed by: imp
* select() DKI is now in <sys/selinfo.h>.wollman2001-01-091-2/+0
|
* o Now that I've had time to test the new interface, reintegrate it back in.imp2001-01-071-2/+5
| | | | | | | | | | | | | | | o Fix OLDCARD to use the new interface. o Rename the offsetp argument to deltap to more closely reflect what it is returning (it returns the delta from the requested value to the actual value). o Remove duplicate $FreeBSD$ in pccbb.c o Allow deltap to be NULL. o Convert new isa pcic driver and add XXX comments that this function isn't actually implemented there (which means that NEWCARD pccard stuff won't work there until it is). o Revert attempts to make old inferface work in NEWCARD. Subitted by: peter (Parts of the new version code)
* add PNPID for PnP PCMCIA, SCM SwapBox Classic X2P.sanpei2000-12-111-0/+1
| | | | PR: kern/23344 (Kaho Toshikazu <kaho@elam.kais.kyoto-u.ac.jp>)
* Remove unneeded #include <machine/clock.h>phk2000-10-151-1/+0
|
* Another PnP pcic card: SMC Swapbox Plug and Playimp2000-10-121-0/+1
| | | | Submitted by: gallatin
* o Remove 9 unnecessary includes.imp2000-09-201-3/+7
| | | | | | | | o Add Vpp power at 5.0V rather than 0. Setting it to zero violates the pccard spec. Most pcic devices in use today don't let us violate the spec, but some older ones do. Bill Paul sent this to me a long time ago and I thought I'd commit it before now. o Add some debug stuff hidden behind bootverbose.
* - Remove the inthand2_t type and use the equivalent driver_intr_t type fromjhb2000-09-131-1/+2
| | | | | | | | | | | | | newbus for referencing device interrupt handlers. - Move the 'struct intrec' type which describes interrupt sources into sys/interrupt.h instead of making it just be a x86 structure. - Don't create 'ithd' and 'intrec' typedefs, instead, just use 'struct ithd' and 'struct intrec' - Move the code to translate new-bus interrupt flags into an interrupt thread priority out of the x86 nexus code and into a MI ithread_priority() function in sys/kern/kern_intr.c. - Remove now-uneeded x86-specific headers from sys/dev/ata/ata-all.c and sys/pci/pci_compat.c.
* Add some infrastructure support for dealing with large attributeimp2000-08-101-5/+52
| | | | | | | | | | memory space needed by the raylink driver (in progress, nearing completion). This is a minorly cleaned up diff from Duncan to help him reduce the diffs from stock FreeBSD. Submitted by: Duncan Barclay <dmlb@ragnet.demon.co.uk>
* Fix a bug so that we have correct number of pccard instances in pcic_attach().iwasaki2000-07-241-1/+1
| | | | | | | | | pcic_attach() got a wrong pointer to pcic_slots since device haven't set correct unit number yet, so always accessed elements of pcic_slots which belong to pcic0 (unit number 0). Now we set unit number to pcic device first, then access to pcic_slots based on the unit number we've just set.
* Add ACTIONTECH #define for plug and play. Also add PnP support to NEWCARDimp2000-05-291-1/+1
| | | | | | for this card. Submitted by: Kazuya Kodama <kodama@rd.nacsis.ac.jp>
* Add PnP ID for vadem based plug and play card.imp2000-05-021-0/+1
| | | | | Submitted by: Dave Belfer-Shevett <shevett@stonekeep.com> Fix by: Bill Paul
* Checkin my first batch of New Mexico changes:imp2000-04-251-22/+26
| | | | | o minor whitespace things (bad because this is also a functional commit) o Backport reading in of CIS entries from the driver level.
* o Preliminary support for mapping the CIS by the driver.imp2000-04-201-9/+42
| | | | | | | | o Modify xe driver to use this. There's still some issues with this code, so xe can't map the cis just yet. I'm thinking about how to resolve the issue. pccard_nbk's pccard_alloc_resource is getting in the way.
* Add support for PnP ISA cards, and some laptop PnP support:imp2000-03-101-80/+118
| | | | | | | | | | | | | | | 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
* /tmp/msgimp2000-02-211-4/+24
|
* Fixed a bug in PCIC polling mode.hosokawa2000-01-151-6/+17
| | | | (it does not work without this fix)
* Move the turning on of the interrupts for the card at the bridge fromimp1999-12-101-15/+14
| | | | | | | | | the activate method to the setup_intr, and turn it off to teardown_intr. This makes the ed driver not enter its interrupt routine during the probe. Apparently, an interrupt happens when you disable the interrupts. There are other problems with ed still.
* Remove the 'ivars' arguement to device_add_child() andmdodd1999-12-031-1/+1
| | | | | | | | | | | | | | | | device_add_child_ordered(). 'ivars' may now be set using the device_set_ivars() function. This makes it easier for us to change how arbitrary data structures are associated with a device_t. Eventually we won't be modifying device_t to add additional pointers for ivars, softc data etc. Despite my best efforts I've probably forgotten something so let me know if this breaks anything. I've been running with this change for months and its been quite involved actually isolating all the changes from the rest of the local changes in my tree. Reviewed by: peter, dfr
* Kill unneeded includesimp1999-11-201-1/+0
| | | | Found by phk's script a while ago.
* Do not add children for new bus kludge version of pccard.imp1999-10-281-2/+1
| | | | Fix some compile warnings.
* Remove debug printfs and Debugger() calls.imp1999-10-251-20/+31
| | | | | | | Add support for memory mapping This should allow pccard that need memory mapping to work, but I don't have one to test against.
* Massive rewrite of pccard to convert it to newbus.imp1999-10-251-333/+94
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Remove name field from controller information. Fix name setting inimp1999-10-161-35/+40
| | | | | | | | 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.
* Reorganize the attachement point for pcic (it was unattached andimp1999-10-151-123/+45
| | | | | | | | | | | | | | | | | | | | | | floating before). Attach pccard devices to pcic, one per slot (although this may change to one per pcic). pcic is now attached to isa (to act as a bridge) and pccard is attached to pcic, cbb and pc98ic (the last two are card bus bridge and the pc98ic version of pcic, neither of which are in the tree yet). Move pccard compat code into pccard/pccard_compat.c. THIS REQUIRES A CONFIG FILE CHANGE. You must change your pcic/card entries to be: # PCCARD (PCMCIA) support controller pcic0 at isa? controller pcic1 at isa? controller card0 The old system was upside down and this corrects that problem. It will make it easier to add support for YENTA pccard/card bus bridges. Much more cleanup needs to happen before newbus devices can have pccard attachments. My previous commit's comments were premature.
* *** empty log message ***imp1999-09-261-11/+20
|
* Kludge together support for the old pccard system with newbus. Thisimp1999-09-061-1/+1
| | | | | | | | 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.
* (1) Fix a spelling mistake in a comment.billf1999-08-171-2/+3
| | | | | | (2) Add braces to avoid ambigious if/if/else Reviewed by: bde
* o Add additional printfs for error cases when we can't attach the device.imp1999-08-011-1/+1
| | | | | | | | o Add field to dev_desc for the size of the io port range. This isn't used yet in the committed sources, but will make the transition easier in the future. If you build this into your kernel, you will need to rebuild pccardd.
* Operator precedence (nit: in #if 0 code) bug.peter1999-05-021-1/+1
| | | | | PR: 11413 Submitted by: Christopher Peterson <cpeterso@cs.washington.edu>
* Well folks, this is it - The second stage of the removal for build supportpeter1999-04-171-1/+1
| | | | for LKM's..
* - Made the setting of the machdep.pccard.pcic_irq from the boot config filenate1999-03-261-5/+6
| | | | | | actually work. Reviewed by: "Sean O'Connell" <sean@stat.Duke.EDU>, msmith
* Remove static delcarations from {,un}register_pcic_intr declarationsimp1999-03-121-2/+2
| | | | | | | | in the not APIC_IO case. This should silence the warnings when building pcic.c as well as the undefined functions when the kernel links. Noticed by: several people in -current and me building the kernel
* Updated to use new APIC (SMP) safe interrupt register/unregisterroger1999-03-101-4/+44
| | | | | | | functions. Posted for review to -smp and -mobile and -hackers with no objections. Reviewed by: Nate
* On second thought: do previous fux in pcic.c better.guido1999-02-141-8/+1
| | | | Now we just untimeout the call to inserted() if it exists.
* Somehow, it is possible to get a pcicintr() when in the resume process.guido1999-02-141-1/+8
| | | | | | | This will trigger inserted()) to be called twice which confuses pccardd. Add code to not process pcicitr())'s when in the middle of a resume process. The real insertion of cards and the emulated one in the suspend/resume code really do not mix up.
* Allow the interrupt allocated to the PCIC to be tuned from the kernelmsmith1999-01-291-1/+13
| | | | | environment by setting the variable machdep.pccard.pcic_irq. If the IRQ is invalid, the PCIC will run in polled mode.
* Initial update pccard code for KLD module support. Module supportpeter1999-01-191-59/+32
| | | | | | 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).
* The "easy" fixes for compiling the kernel -Wunused: remove unreferenced staticarchie1998-12-071-1/+1
| | | | and local variables, goto labels, and functions declared but not defined.
* Add probing support for the vadem VG365 and the Vadem VG465 pcic chips.imp1998-08-251-6/+30
| | | | | | | | | 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.
* Use [u]intptr_t instead of [u_]long for casts between pointers andbde1998-08-161-1/+1
| | | | integers. Don't forget to cast to (void *) as well.
* Changed the type of an isa/general interrupt handler to take abde1998-06-181-4/+4
| | | | | | `void *' arg. Fixed or hid most of the resulting type mismatches. Handlers can now be updated locally (except for reworking their global declarations in isa_device.h).
* - Only poll the PCIC controller for insertion/removal events if thenate1998-04-201-3/+4
| | | | controller hasn't been assigned an IRQ.
* Support compiling with `gcc -ansi'.bde1998-04-151-7/+7
|
OpenPOWER on IntegriCloud