summaryrefslogtreecommitdiffstats
path: root/sys/dev/pccbb
Commit message (Collapse)AuthorAgeFilesLines
* o transition from exca_write to exca_putb and read->getb. This is so thatimp2003-02-141-15/+7
| | | | | | | | | | we can have additional different types of bridges. o remove now bogus comment. o Don't clear CARD_OK when we can't attach a card. o minor style nits # this make kldload of cardbus drivers work for me when the card is # present on boot.
* Remove a comple of bogus debug printfs that snuck in during someimp2002-11-232-5/+2
| | | | | | | debugging I was doing 3 months ago :-(. Noticed by: scottl Aproved by: the re blanket (different than the security blanket).
* MFp4:imp2002-11-141-0/+12
| | | | o Add support for bus_child_present call by implementing that method for cbb.
* MFp4:imp2002-11-141-4/+7
| | | | | o Make this code a little easier to understand by using simpler if statements, but nesting them.
* Detach the pccard bus children when we eject a 16-bit card, not theimp2002-11-041-1/+1
| | | | 32-bit ones. This was introduced in the last commit.
* MFp4:imp2002-11-021-4/+9
| | | | | | | | | | | | | | | o Always release the resources on device detach. o Attach resources the same with driver added as we do we do in the insert case (maybe this should be a routine). o signal the wakeup of the thread on resume instead of trying to force an interrupt. o Minor debug hacks. o use 0xffffffff instead of -1 for uint32_t items. o Don't complain when we're asked to detach no cards. This is normal. o Eliminate the now worthless second parameter to card_detach_card. o minor style(9)isms Some of these patches may be from: iwasaki-san, jhb, iadowse
* o Set CBB_CARD_OK just before CARD_ATTACH_CARD. If ATTACH_CARD fails, thenimp2002-10-111-12/+14
| | | | | | | | | clear the bit. This allows ata driver to attach its children because it needs the interrupts enabled to succeed. Submitted by: iwasaki-san o Spell CardBus as CardBus, not Cardbus or CardBUS while I'm here.
* Make kldunload cbb work:imp2002-10-081-22/+17
| | | | | | | | | o Implement the thread killing interlock as described by jhb in arch@ while talking to markm. o Hold Giant around cbb_insert()/cbb_remove(). Deep in the belly of the vm code we panic if we don't hold this when we activate the memory for reading the CIS. o If we had to do the kludge alloc, then do a kludge free.
* MFp4:imp2002-10-072-46/+76
| | | | | | | | | | | | | | 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.
* Some kernel threads try to do significant work, and the default KSTACK_PAGESscottl2002-10-021-1/+1
| | | | | | | | | | | | | doesn't give them enough stack to do much before blowing away the pcb. This adds MI and MD code to allow the allocation of an alternate kstack who's size can be speficied when calling kthread_create. Passing the value 0 prevents the alternate kstack from being created. Note that the ia64 MD code is missing for now, and PowerPC was only partially written due to the pmap.c being incomplete there. Though this patch does not modify anything to make use of the alternate kstack, acpi and usb are good candidates. Reviewed by: jake, peter, jhb
* reprobe not needed here eitherimp2002-09-101-30/+0
|
* Fix typos: s/O2Mirco/O2Micro/blackend2002-08-241-6/+6
| | | | Approved by: imp
* Rename the pccbb device to cbb.imp2002-08-152-311/+318
|
* When we allocate our bus address via the kludge that we have in theimp2002-08-102-16/+23
| | | | | | | | | 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.
* confirmed OZ6912 and 6972 share same pci IDimp2002-08-101-1/+1
|
* No doubt about it, I gotta get a better hat:imp2002-07-261-0/+1
| | | | | | Add the definition for sockbase that I accidentally removed two revisions ago and didn't notice until some kind soul pointed it out to me.
* Looks like a last second change wasn't completely backed out.imp2002-07-261-1/+0
|
* MFp4:imp2002-07-264-127/+156
| | | | | | | | | | | | | | | | | 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.
* Reset the 16-bit bus and turn off power. More work in this area mayimp2002-07-211-1/+7
| | | | be needed, but this seems sane on my laptop.
* Use a cv rather than tsleep and friends to do the sleep/wakeupimp2002-06-132-7/+15
| | | | | | | | 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)
* Make oldcard and newcard kernel module work.takawata2002-05-301-0/+4
|
* Spell hw.cbb.start_memory the same in the HINT as well as the sysctl.imp2002-04-291-1/+1
| | | | Noted by: bde
* Make sysctl RWimp2002-04-291-4/+4
|
* Restore NetBSD copyrights that shouldn't have been removed in the first place.imp2002-04-132-0/+60
|
* Change callers of mtx_init() to pass in an appropriate lock type name. Injhb2002-04-041-1/+1
| | | | | | | most cases NULL is passed, but in some cases such as network driver locks (which use the MTX_NETWORK_LOCK macro) and UMA zone locks, a name is used. Tested on: i386, alpha, sparc64
* Check the status of the card bridge first thing, rather than last inimp2002-02-201-10/+16
| | | | | the loop. This fixes the "my card is in the laptop on boot, but doesn't attach" problem.
* Bulk changes made during the BSDcon kernel summit and travel afterwards.imp2002-02-173-582/+669
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* I am sick of being told that "cstsevent occures".des2002-02-161-2/+2
|
* o Use INTR_TYPE_AV (the highest possible) rather than INTR_TYPE_BIOimp2002-02-101-7/+51
| | | | | | | | o Don't allow INTR_TYPE_FAST. Since we are sharing the interrupt between CSC and the functions, they can't be FAST because fast interrupts can't be shared. o Add the same workaround for resume that we have in OLDCARD. o Also, return the error from bus_generic_resume rather than ignoring it.
* Default debugging to OFF now.imp2002-02-041-2/+0
|
* Migrate towards using the new exca module for 16bit stuff. This is aimp2002-01-292-566/+121
| | | | | | WIP, but works for me. Also do some minor code factoring and code cleanup while I'm here.
* Minor sorting ordersimp2002-01-291-2/+2
|
* better namespsace of static functionsimp2002-01-151-5/+9
|
* o Sync the device list with OLDCARD.imp2002-01-151-51/+46
| | | | | | | | o Remove bogus flags that aren't used (if we need them in the future, we can add them back). o Add support for the TI-1031. This is the only YENTA compatible PCI-PCMCIA bridge that I'm aware of (all the others are PCIC on a PCI bus, which is different).
* use bus_space(9) rather than the memory mapped register set. This isimp2002-01-143-82/+115
| | | | the first step towrads merging pcic and pccbb for 16-bit cards.
* Add support for suspending/resuming CardBus bridges.imp2001-12-151-2/+55
| | | | | | | We really should have and use power state information, but none exists today. Submitted by: YAMAMOTO Shigeru-san <shigeru@iij.ad.jp>
* Make the start memory address that we use configurable via a bootimp2001-11-261-5/+16
| | | | | | | | | loader parameter. This allows us to more easily boot on big memory configuration machines. hw.pccbb.start_mem. Reflect this in a sysctl so we can read it from userland. # Note: we need a TUNABLE_ULONG to do this right. I'll add that to # kernel.h soon.
* style(9) fixes:imp2001-11-261-162/+148
| | | | | | | o declare variables at the start of the function, not the start of a block. o return (retval); o minor {} tweaks.
* peter pointed out that I missed a hard coded location for the memory.imp2001-11-261-4/+5
| | | | Also add a define for I/O stuff (for cardbus).
* Make the address we kludily allocate in pccbb be a #define for easierimp2001-11-261-3/+5
| | | | | | | | changing. Also change it from 0x44000000 to 0x84000000 for large memory machines. # the PCI bus code should do this for us. This is a bandaide, not a # solution.
* Move Intel 82092AA into the list of devices. It appears to be a oneimp2001-11-111-1/+1
| | | | | | | | | | | off chip that was on one prototype board. However, this appears to be a design that many chipsets are compatible with its PPEC register set (eg the Omega 82c094). Through the kindness of the Red Hat developer David Woodhouse, I now have this datasheet. I may take the advise of one of the bsd-nomads (whose name unfortunately escapes me at the moment) and split out all these 16-bit I/O mapped PCI devices into a separate driver...
* Add Omega 82c094 PCI PCMCIA bridge. It is similar to the CL-PD6729 inimp2001-11-111-3/+3
| | | | | | | | | | | | | | | that it has one BAR that's mapped to 0x3e0 and is I/O only. It does not conform to the Yenta spec, like other PCI PCMICA bridges do (eg the TI 1031, which is mostly a 1131 w/o 32bit card support). It appears that this chip may also need to not route PCI interrupts as well. This chip is used in the NEC Versa 2430CD (and it appears that sometimes it works, while other times it doesn't) and others in the 2400 series. While the NEC website claims Cardbus support, I can't figure out how that is possible. Submitted by: Ben Timby <ben@webexc.com>
* Add PCIC_TI4410phk2001-11-031-0/+2
| | | | (patch probably from imp@, can't remember figuring this out myself.)
* Surf the net again and find more device IDs:imp2001-09-061-6/+24
| | | | | | | | | | | | | | | | | | | | | | | Cirrus Logic PD6834 O2micro OZ6836 O2micro OZ6912/6972 O2micro OZ6922 O2micro OZ6933 TI1260 Note: These two aren't on TI's site, but are in TI1260B http://www.yourvote.com/pci/vendors.txt Plus comments for other chips found in Windows INF files, and also referenced in various spots on the net: * Intel 82092AA 0x12218086 16bit * smc/Databook DB87144 0x310610b3 * SMC/databook smc34c90 0xb10610b3 * Omega/Trident 82c094 0x00940123? * Omega/Trident 82c194 0x01941023 * Omega/Trident 82c722 0x07221023? * Opti 82c814 0xc8141045 * Opti 82c824 0xc8241045 * NEC uPD66369 0x003e1033
* minor commentaryimp2001-09-061-0/+10
|
* First, The Ricoh 5C47x chips don't have the disable the 3e0 bits.imp2001-08-291-5/+11
| | | | | | | | Second, the TI 1130 need to have the PCI_INTR set, not cleared. This gets Soren's machine working with NEWCARD again. # The whole initialization is a mess and needs to be organized ala OLDCARD.
* Fix the hack that allocates memory when the bios haven't already done so.jon2001-08-271-1/+1
| | | | | We can't rely on rman to give us a useable memory window if we tell it to do auto-allocation. This should probably be fixed on the pci bus/rman side.
* Note difficulties we had in OLDCARD using NEWCARD's methods of debouncing ↵imp2001-08-271-0/+6
| | | | card event interrupts.
* Part two of this NEWCARD update:jon2001-08-272-290/+466
| | | | | | | | | | | | | | | | 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-264-626/+624
| | | | | | | | | | | | 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.)
OpenPOWER on IntegriCloud