summaryrefslogtreecommitdiffstats
path: root/sys/pccard/pcic_pci.c
Commit message (Collapse)AuthorAgeFilesLines
* /* -> /*- for license, minor formatting changesimp2005-01-071-1/+1
|
* Convert callers to the new bus_alloc_resource_any(9) API.njl2004-03-171-6/+6
| | | | | Submitted by: Mark Santcroos <marks@ripe.net> Reviewed by: imp, dfr, bde
* Change all SYSCTLS which are readonly and have a related TUNABLEsilby2003-10-211-6/+6
| | | | | from CTLFLAG_RD to CTLFLAG_RDTUN so that sysctl(8) can provide more useful error messages.
* Add comment point o2micro people to NEWCARDimp2003-08-011-0/+2
|
* OLDCARD is OBSOLETE_IN_6. Tag it as such.imp2003-06-121-0/+2
|
* Add SMC 34C90. Not tested, but should be a no-op except for the id string.imp2003-02-261-1/+4
| | | | Print the sockbase when we can't get the memory for debug.
* Merge from P4:imp2003-01-041-27/+42
| | | | | | | | | | | o Update copyright. o Add a tunable to allow the ti12xx to initialize the pci clock. Some rare cards need it. o rename 67xx -> 6729 since there's really only one chip in this family. o from pcic_pci_pd6729_init call the routing code o Fix some comments out routing on the TI-1130 class (1030, 1130 and 1131) MFC: After RE@ says it is ok.
* MFp4: Comment about not assuming INTA# for 6729imp2002-10-071-0/+3
|
* SMIENB not needed, but maybe PCI_CLOCK is, so put it in #if 0'd outimp2002-09-291-6/+8
|
* MFp4:imp2002-07-261-122/+131
| | | | | | | | | | | o reduce the extra-long ID names. o TI-1510, 1520 and 4510 support. o MFUNC is the name of the register on TI 1200 and newer chips (except 125x and 1450). Initialize it in the func routine, but only if NO_MFUNC isn't set. o better comments about above workaround o register definitions for MFUNC. o move zoom video disable to a better place.
* Add support for writing to mapping high memory for pccard memoryimp2002-07-201-0/+2
| | | | | | | | | | windows. Right now we only support pci chips that are memory mapped. These are the most common bridges in use today and will help a large majority of the users. I/O mapped PCI chips support this functionality in a different way, as do some of the ISA bridges (but only when mounted on a motherboard). These chips are not supported by this change.
* Some strange hacks for the clpd6729:imp2002-07-181-13/+44
| | | | | | | | | | | | | | o It needs to have pcic_isa_intr intrrupt handler o for pci interrupts, in the func interrupt handler it needs to check the isa registers rather than the pci ones for card present. o better commentary for some of the strangeness of the 6729 on pci o fix some crunchy comments to better reflect reality. With this I almost have the WL200 working, but an interrupt storm after attach is causing problems for reasons unknown. This code doesn't seem to break the normal clpd6729 case, and I'd like others with 6729 cards to try to test it (there were some that were used for external pccard slots in pci only systems).
* Better verbage on hw.pcic sysctls, delete now obsolete commentimp2002-07-171-10/+8
|
* o Remove workaround that I put in to mask the BadVcc problem.imp2002-07-171-33/+70
| | | | | | | | | | | o Add preliminary support for Cirrus Logic CL-PD6729 using PCI interrupts. To use it you you need to set hw.pcic.pd6729_intr_path to 2. This is allow us to still default to ISA intrrupt path for this part (which is found much more often in laptops using ISA IRQs). But some PCI cards have this part on them and this should allow them to be used. It is untested on PCI, but it seems to not break the ISA case. o Better sysctl descriptions (I hope).
* Lots of people have had to hack around the fixed address for cardbusimp2002-06-271-1/+1
| | | | | | bridges in modern hardware (that hardware w/ lots of RAM). Raise the address from 0x44000000 to 0x88000000 to match what we do with NEWCARD. However, this really should be done in the pci layer.
* Leave it to a non-native speaker of English to catch another typo: "do do" ->imp2002-06-271-1/+1
| | | | | | "to do" submitted by: marius@alchemy.franken.de
* Spell less like a 'merkin and more like a speaker of Englishimp2002-06-271-1/+1
|
* What:imp2002-06-231-49/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | o ToPIC is happy with two cards now, even when the two cards are modems. o Fix (all?) hangs on boot when power is applied to the card. I suspect that this will make the Ricoh bridges happier and also make a lot of VAIO owners happy (confirm to me in private email please :-). o All Cardbus bridges should now support 3.3V, X.XV and Y.YV cards, to the extent that the underlying hardware supports such cards. (X.X and Y.Y haven't been assigned values yet :-). o Better 3.3V support for Ricoh ISA bridges. How: o Don't mess with the power register when scanning the cards. It is unnecessary and causes BADVcc conditions on many chipsets. These in turn can cause an interrupt storm. o Make pcic_disable reset the slot's voltage. o Move initializing voltage for the slot until after it has been disabled. o Fix a lot of issues with the pcic_cardbus_power routine. We now properly enable the card and take it out of reset after a power change. o When detecting the card's voltage, if we're in a BadVcc state, direct the bridge to rescan the card for what it supports. (we might need to in the future set the power register to 0 before doing this). o Don't preserve CLKSTOP. need to revisit this. o Better support for Ricoh ISA bridges for 3.3V cards. o Don't write to PCIC_POWER directly as offten, but instead go through the pcic_power interface. o All cardbus bridges now default to use cardbus power control. o Add misc register definitions. o remove some (now) bogus comments. Extra Special Thanks To: Scott Lamber for his kind and generous loan of a Toshiba laptop with a ToPIC 100 in it for my use.
* hw.pcic.ignore_pciimp2002-06-131-1/+9
| | | | | Set this to 1 to ignore cardbus bridges and work entirely in legacy ISA mode. This may help some folks.
* Get the generic name rightimp2002-03-031-1/+1
|
* Add recognition of the Omega 83C094 PCI <-> PCMCIA bridge chip set.imp2002-01-141-1/+5
| | | | MFC after: 5 days
* Better error message when cardtype is not recognizedimp2001-11-131-1/+1
|
* Do not assume that a I/O based bridge is a 6729. Intel made a funky chipimp2001-11-111-1/+1
| | | | that I have the datasheet on the way for that also does this.
* o Try to do 3.3V support better for the 6722 and 6729/30.imp2001-11-091-5/+5
| | | | | | | | | | | | | o Bite the bullet and create controller types for the 6729 and also for the 673x. Rename the 672x to 6722. o Define minimal extended register info (just register 0xa for reading VS[12]). # I think the last version may have broken 673x controllers, but this should # fix them. Tested on the 6722, but not the 6729. Ideas from: Chiharu Shibata-san's article in bsd-nomads:15866
* Restore the main BAR for the bridge on resume. Some machines don't saveimp2001-10-301-1/+21
| | | | | | | | | | | | this accross suspend/resume events and this was causing the dreaded false positive hit on my "static bug" test. Note: the PCI bus code should do this for us. Note2: We don't do the same for I/O based pci devices since it is more code and doesn't appear to be necessary. Submitted by: Toshiyuki Kawashima-san <tos@fa2.so-net.ne.jp> Obtained from: bsd-nomads:16012
* Print 4 per line. To do this, we test against i % 16 == 0 rather than i % 4imp2001-10-171-1/+1
| | | | since that's always true for this loop.
* ToPIC fixes. scale back what we do for functional interrupts becauseimp2001-10-171-1/+2
| | | | | | it appears to break at least the ToPIC 100. Submitted by: Mark Santcroos <marks@ripe.net>
* takashi shibagaki-san posted a similar patch to nomads. It seems thatimp2001-10-111-1/+6
| | | | | more laptops work w/o the shutdown code than with it on reboot. So let's disable it for a while.
* Use the NetBSD init code for the TOPIC parts as a more complete basisimp2001-10-111-8/+33
| | | | | | for initializing the parts. Since I don't have any of these parts in any of my working laptops, I'm committing this to allow people to test it. Will MFC when I receive reports of it working.
* Fix, I think, The second slot problem with Cirrus Logic PD6729/30 parts:imp2001-09-211-6/+5
| | | | | | | o Move initialization of the slot bst and bsh to inside the for loop. o move sc there as well. o Remove debug printf that prints the ID of the first slot twice. o Use the sp for the relevant slot in getb, rather than for the 0th slot.
* Ian Dowse had closed the race a little more in card ejection events.imp2001-09-161-16/+18
| | | | Maybe this will also fix the suprious eject events that we're seeing?
* <jkh> "Hey Rocky, watch me eject this pccard outta my laptop!" "What,imp2001-09-131-15/+78
| | | | | | | | | | | | | | | | | | | | | | again? That NEVER works!" "This time for sure!" Minor overhaul of how we do interrupts for the pci interrupt routing case to cope with card ejection better (read: make it not hand on so many cards): o Reintroduce func_intr and func_arg and use the to store the interrupt handler to call. o Create a pcic_pci_func_intr to call the real interrupt handler iff the card hasn't been ejected. o Remove some checks in pcic_setup_intr now that it is used exclusively for isa routed interrupts. o Defer the eject event until later too, but make sure we can't do any client driver ISR calling in the interrum. o Add some simple code to make sure that we don't attach more than one child. This should fix pccardd starting twice problem (ala single user -> multi-user when you started pccardd by hand in SU). MFC: after jkh thinks I've put the crack pipe away.
* Call pcic_teardown_intr to make sure that we disestablish theimp2001-09-121-1/+1
| | | | | | | | interrupt for the card. This seems to fix hangs on my machine. MFC: pending re approval.
* When booting verbose, print the config space for this device. Thisimp2001-09-091-0/+19
| | | | | will help debugging problem systems as it will reduce the number of commands the user needs to type and send me the output of.
* Don't panic when we don't know the exact chip that is being used.imp2001-09-061-4/+44
| | | | | | | | Also, add support for the following parts: O2micro 6912/6972, 6922, 6933 Cirrus Logic PD6834 TI PCI-1260 and PCI-1421 MFC: Soon
* Patric Gualat tells me that I can't do basic bit math. He's right.imp2001-09-051-4/+4
| | | | | | | | When either bit 3 or 4 is set, we need to *SET* bit 5, not clear it in the card control register. This makes TI PCI-1030, 1130 and 1131 not work anymore without this fix. MFC: soon
* Don't report power interrupts.imp2001-09-041-2/+0
|
* Make the csc and function interrupts ISA on shutdown. This shouldimp2001-09-041-1/+13
| | | | | | | help with the hanging problem on reboot. Note: we need to do the other things as well. Also, turn off the bits in the stat change interrupt mask and the cardbus interrupt mask as well in an attempt to shut off all interrupt sources.
* Kill init_t type, and minor white space changes to match original -stable ↵imp2001-09-041-4/+1
| | | | version
* Add support for changing the way that ToPIC csc interrupts are routed.imp2001-09-041-4/+36
| | | | | | | | | # Note: The ToPIC 100 and the ToPIC 97 datasheets are in disagreement # as to if this bit is supposed to be set or cleared to enable INTA routing # so I made my best guess. Also, comments about the various chipsets, including some grumpy ones about how vague the O2micro datasheets are.
* Move to using a chip function + function pointers to deal with theimp2001-09-041-128/+460
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | function and csc interrupt routing path (eg, ISA or PCI) so that we can more easily switch between the two. When we don't have a card ISR, put the function interrupt into ISA mode. This effectively masks the interrupt since it happens once, and not again until we have an ISR. This should help hangs, and might help people that unwisely update the kernel w/o updating pccardd. This is done at mapirq time. Force CL-PD6729/30 to use ISA interrupt routing and maybe even detect the number of pccard slots properly (this is still WIP). We aren't going to support PCI interrupts for this release. A future release should support them, however. Shibata-san's 3.3V fixes are not included. Add a hack which should, in i386, rewrite IRQ 0 cardbus bridges to be IRQ 255, which should cause interrupts to be routed. This is mostly untested since my one tester disappeared after reporting nothing changed. Implement, but do not use, a power method called cardbus. It looked like a great way to get around the 3.3V problem, but it seems that you can only use it to power cardbus cards (I get no CIS when I enable it, so maybe we're programming things bogusly). GC the intr and argp stuff from the slot database. Improve the ToPIC support with the power hacks that Nakagawa-san published in FreeBSD Press and that Hiroyuki Aizu-san ported to -stable. The ToPIC hacks were for 3.3V support in ToPIC 100, but it looks like the '97 also has identical registers, so use them too. Add some #defines for the cardbus power stuff. Finally implement making CSC on the Ricoh chips ISA or PCI. This will allow polling mode to work on vaios, I think. Add some minor debugging. This should likely be cleaned up or put behing a bootverbose. Some of this work, and earlier work, was influanced by Chiharu Shibata-san's power handing patches posted to bsd-nomads:15866. MFC: Soon, if possible.
* Add recognition for ToPIC95Bimp2001-09-031-0/+3
|
* Add names for the TI PCI-1210, TI PCI-4410 and TI PCI-4450 parts. I hadimp2001-08-301-0/+9
| | | | this for a while, and don't know how it didn't make it into the tree.
* Note the status of the card, so we don't print inserted lines twice onimp2001-08-291-0/+3
| | | | boot.
* Fix typo in my last commitimp2001-08-271-1/+1
|
* CL-PD6729 and CLPD-6730 chips (the only ones with I/O bars in the pciimp2001-08-271-5/+4
| | | | | | | | config space that I'm aware of) work. I'm committing this from such a machine. Remove warning about I/O based bridges. Warn users that the PCI routing of interrupts still doesn't work for these cards.
* A number of fixes for the TI-1130 and ISA interrupt routing cases:imp2001-08-271-13/+23
| | | | | | | | | | | | | | | | | | | | | | | o For TI PCI-1130, you need to set bit 5 of register 91 if you want ANY pci interrupts. Then set bits 3 and/or 4 as appropriate. This will fix those people with 1030, 1130 and 1131 in their machines trying to do PCI interrupts. o Fix case where we were trying to automatically fail back to ISA interrupt routing. We were dereferencing a NULL pointer. This was true of ANY chipset. o The bus_setup_intr method needs to be pcic_setup_intr so that "FAST" interrupts fail on PCI case (modems act flakey if we don't force them to fall back to normal interrupts). Also needed so that the proper ISA IRQ can be set in the ExCA register. This fixes the people whose ISA routing was failing[*]. o When we find a generic yenta/pccard bridge, go ahead and print its vendor ID in boot verbose. Machine with theses symptoms and a serial console by: jedgar [*] Looks like my pc98 machine has some interrupt source on IRQ 15 that gave about 30 interrupts per second, which masked this problem on my PC-9821Nr15.
* Stop dereferencing 'r' unconditionally. Maybe it is NULL when ISAimp2001-08-261-6/+5
| | | | mode and using polling mode.
* Fix last second typoimp2001-08-251-1/+1
|
* Back out the isa/pci string reporting. It may cause panics.imp2001-08-251-17/+2
|
OpenPOWER on IntegriCloud