This change makes PCMCIA cards work again on my machine.
Unfortunately, some of the DELAY_MS() are called when the current
process is not the cardbus thread, that is, on interrupt contexts.
I confirmed these are actually used in interrupt context and replaced
them with delay()s. However, I haven't confirmed other DELAY_MS()s
are always on the cardbus thread.
This shall be a temporary fix. The driver needs being rewritten
not to use such delay()s, of course.
pci_attach_args *" instead of from four separate parameters which in
all cases were extracted from the same "struct pci_attach_args".
This both simplifies the driver api, and allows for alternate PCI
interrupt mapping schemes, such as one using the tables described in
the Intel Multiprocessor Spec which describe interrupt wirings for
devices behind pci-pci bridges based on the device's location rather
the bridge's location.
Tested on alpha and i386; welcome to 1.5Q
provides better (not perfect) reset sequence. The most significant
change is asserting output enable reg before power up. Stop routing
interrupt during reset.
pccbbattach(). This is necessary as pccbb_chipinit() is deferred, and
may not run until after the pcic is already attached.
Now pcics are properly disabled on Sony VAIO, f'rinstance.
timeout()/untimeout() API:
- Clients supply callout handle storage, thus eliminating problems of
resource allocation.
- Insertion and removal of callouts is constant time, important as
this facility is used quite a lot in the kernel.
The old timeout()/untimeout() API has been removed from the kernel.
2. Do not avoid ISA hole when a device requires more than
256-byte io space.
3. Remove sending CardBus bridge's function number to
cardbus stack. This number is not needed for anyone.
* Initialize PCIC_INTR and PCIC_CSC_INTR on all chips, not just TI.
* Leave card detect interrupts enabled in PCIC_CSC_INTR. (This requires
reading PCIC_CSC in the interrupt handler on some chips, so do that too.)
* Leave PCIC_INTR_ENABLE set, as some chips require this to post card detect
interrupts while in PCMCIA mode.
* Leave PCIC_INTR_RESET (which is inverted) set at all times *except* when
powering up a socket, as some chips will use it to drive RESET# low even
while a CardBus card is in the slot.
This makes PCMCIA and CardBus cards works with some TI chips. Cross-checked
with a Toshiba ToPIC 95B.
after resume from suspend, as i82365.c does.
This is a workaround for newer Sony VAIO notebook.
Patch is submitted by Atsushi Onoe (onoe@sm.sony.co.jp) in PR#9463.