Commit Graph

95 Commits

Author SHA1 Message Date
nate
f62923dce9 - Remove the code that cleared out the registers (previously enabled by the
option PCIC_NOCLRREGS).  This is now the default behavior since it's
  apparently required for the CLPD6832, and doesn't negatively affect
  any of my test machines.

Requested by:	Ted Faber <faber@ISI.EDU>
1997-12-02 23:23:14 +00:00
nate
efe10091d3 - Add necessary include files and fix bugs in last. 1997-12-02 22:27:58 +00:00
nate
781ba4a835 - Bring in code removed from /sys/pccard/pcic.c, including DEVICE IDs, and
more bootverbose code.
- Style nits.

No significant functional changes.
1997-12-02 22:13:59 +00:00
nate
90dedcdd03 - Remove PCI code from here, now that the PCI framework lives in /sys/pci. 1997-12-02 21:31:35 +00:00
nate
56dacb56e8 - Framework for PCI/CardBus controllers running in PCMCIA emulation
mode.  Currently, the only supported controller is the Cirrus Logic
  PD6832, but others can be supported with docs on them.

Submitted by:	Ted Faber <faber@ISI.EDU>
1997-12-02 21:26:41 +00:00
nate
74865cf25a - Renamed 'card.h' to 'cardinfo.h', to avoid namespace collisions with
the card.h that config builds.

[ Repository renaming done in the background to save the card.h history ]
1997-11-18 21:04:01 +00:00
nate
0bdadfcd1b MF22:
(update_intr_masks might not need to be done in 3.X, but the new generic
 interrupt code is incomplete w/regard to support for the PCCARD code, so
 to avoid any potential problems use it.  It can't hurt).

- Correctly register pcic_imask with the system interrupt code.

- Call update_intr_masks() so that pcic_imask modifications that occur
  when card interrupts are registered get updated in the system
  interrupt code.
1997-11-15 14:20:31 +00:00
nate
dc73737576 - Reset the pcic controller interrupt 'poll' timeout *after* we call the
interrupt routine.
1997-11-04 17:50:23 +00:00
nate
f6deed1a05 - More style nits (sorry, I should have done this last time). 1997-10-28 20:58:53 +00:00
nate
44f2868788 - Style nit. 1997-10-28 20:50:58 +00:00
nate
2e553bc250 - Disable cards when doing a suspend by emulating that they have been
removed.  Add a new state 'suspend' so we 'fake' insertion events at
  resume time for the cards that have been suspended.

[
The code still works if you remove the card during suspend, switch the
card during suspend, or combinations of both.
]

Reviewed by:	frf@xocolatl.com
1997-10-28 17:51:25 +00:00
nate
fa55951ed5 - Instead of relying on a functional call to register PCARD-capable drivers,
use a Linker Set.  Note, if a driver is loaded as an LKM  if will have
  to use the function call, but since none of the existing drivers
  are loadable, this made things cleaner and boot messages nicer.

Obtained from:	PAO-970616
1997-10-26 21:08:42 +00:00
nate
84c3cb0136 - Patch the 'skeleton' example driver to be more consistant with the new
state of the world.
1997-10-26 21:01:44 +00:00
nate
0689fa1ceb - 'Beep' support now happens in it's own separate file, so you can mess
around with different noises for the different events and not have it
  affect other files.

Inspired by:	PAO
1997-10-26 06:06:54 +00:00
nate
2f55d3018b - Functional changes to PCCARD support.
* Kill individual drivers 'suspend' routines, since there's no simple/safe
   way to suspend/resume a card w/out going through the complete probe
   at initialization time.
 * Default to using the apm_pccard_resume sysctl code, which basically
   pretends the card was removed, and then re-inserted.  Suspend/resume
   is now 'emulated' with a fake insert/removal.  (Hence we no longer
   need the driver-specific suspend routines.)
1997-10-26 04:54:16 +00:00
nate
c68183d0b8 - Do a bunch of gratuitous changes intended to make the code easier to
follow.
 * Rename/reorder all of the pccard structures, change many of the member
   names to be descriptive, and follow more closely other 'bus' drivers
   naming schemes.
 * Rename a bunch of parameter and local variable names to be more
   consistant in the code.
 * Renamed the PCCARD 'crd' device to be the 'card' device
 * KNF and make the code consistant where it was obvious.
 * ifdef'd out some unused code
1997-10-26 04:36:24 +00:00
nate
bc21da1f3f - Call 'callout_handle_init' on the two timeout channels after they are
created in the new slot controller structure.
1997-10-26 02:55:31 +00:00
nate
35f6cb0d89 - KNF the PCI stuff, no functional changes. 1997-10-25 21:02:44 +00:00
nate
3eaafbfd4a - Recognize the Cirrus Logic PD6729/6730 PC-Card Controller behind the
PCI bus.

[ Re-organized the code to be easier to extend, based on Michael's patch ]

Submitted by:	Michael Reifenberger <root@totum.plaut.de>
1997-10-24 15:39:00 +00:00
nate
58e051f462 - Use the definitions found in <i386/isa/isa.h> instead of rolling our
own definition of ISA_HOLE_START.  We shouldn't need to include
  bus/processor specific code in here, but it is required.  At least by
  doing it this way it becomes more obvious where the bogusness is.

Obtained from:	email with bde
1997-10-24 15:27:16 +00:00
nate
ec74e6f8df - defined constant ISA_HOLE_START (would be nice to include machine/pmap.h,
but it has too much baggage).
- create a new routine 'unregister_device_interrupt', which is now used
  instead of having two routines with the same code snippet.
- Minor cleanups and commenting.

[ No functional changes, just moving things around ]
1997-10-23 22:54:47 +00:00
nate
26825b2fa5 - Move the untimeout code call out of the check for pwr_off_pending. It
shouldn't make any difference, but did on a couple of test systems.
1997-10-23 19:00:16 +00:00
nate
a952c7a5aa - Fix braino in last commit. (Slow networks should be outlawed!) 1997-10-23 04:53:32 +00:00
nate
fdcf922d4f - When doing suspend/resume, only try to suspend those drivers on active
slots.  Otherwise, we try to suspend drivers who have been disabled
  already.

[
The only reason the drivers are still on the list is because of race
conditions where the card is removed while the driver is in use.  We
leave the drivers on the slot list (leaving all of their structures in
place in case a process is using it) but set it's state to empty so that
further uses by the pccard code know not to expect active cards.
]
1997-10-23 02:30:39 +00:00
nate
74b704148b Back our V1.36, due to reports of badness. (IRQ's are again allocated
from the 'lower' interrupts to the 'higher' interrupts.)  We need to
find a way to set the interrupt for the controller in the config file.

Determined by:	handy@sag.space.lockheed.com
1997-10-23 02:25:14 +00:00
nate
251c8be0fe - Simplify code by removing a variable which was initialized once, never
modified, and was expected to have the initialized value.
1997-10-23 00:51:29 +00:00
wollman
2ab6ede5b5 LEarn about the TI 1131. 1997-10-17 16:34:08 +00:00
nate
ecf78217f1 - Bring in APM_PCCARD_RESUME support from PAO, FreeBSD style. This new
sysctl option 'fakes' like a card was removed and inserted when the
  machine is brought up again from a suspend.  It is disabled by default,
  and the old code is used.
Obtained from:	PAO
1997-10-06 05:46:03 +00:00
nate
f58026beed - Include <sys/interrupt.h> to avoid compiler errors. 1997-10-06 04:32:42 +00:00
nate
8c30ca691b - Fix braino in last commit. 1997-10-06 04:02:42 +00:00
nate
6bcfcc5792 Modem cards send the speaker audio (dialing noises) to the host's
speaker.  Cirrus Logic PCIC chips must enable this.  There is also a Low
Power Dynamic Mode bit that claims to reduce power consumption by 30%,
so enable it and hope for the best.

PR:		4650
Submitted by:	Nick Sayer <nsayer@quack.kfu.com>
1997-10-06 03:17:36 +00:00
nate
46da712d66 - Allocate the 'PCIC' interrupt from the last available (higher #) IRQ
instead of the first available, like Win95 does.  This appears to help
  on some machines, and avoids potential problems with built-in serial
  ports which tend to live at IRQ 3, which is usually picked with the
  old method.
1997-10-06 02:56:15 +00:00
nate
d4fe8d6ee9 - Don't start at IRQ 0 in build-freelist, but instead start at IRQ 1.
(Not sure if this makes muich difference, but you never know.)
1997-10-06 02:54:19 +00:00
nate
34e8b1944e - Style police
- Updated some comments using data from the most recent PAO release.

Obtained (partially) from:	PAO-970616
1997-10-06 02:46:38 +00:00
gibbs
a415512fd4 Update for new callout interface. 1997-09-21 22:02:25 +00:00
peter
796eb5ce0a Update select -> poll in drivers. 1997-09-14 03:19:42 +00:00
bde
c38ba7cecc Oops, unremoved used #include. 1997-07-21 16:55:28 +00:00
bde
59566a1491 Use soft_imask instead of SWI_MASK in the LKM version. SWI_MASK shouldn't
have been visible in LKMs, since it had the wrong value for the APIC_IO
case.

Removed unused #includes.
1997-07-21 16:50:46 +00:00
jkh
638e50507c Make this puppy compile again - add two includes. 1997-06-01 05:04:39 +00:00
phk
3de9539eca Don't apply 5V when we want 3.3V.
Kludge around the case where the PCIC refuses to use 5V because it knows
better than us.
1997-05-22 07:29:24 +00:00
phk
1fb6a2bbba Recognize, but don't actually do much with a TI PCI1130 PcCard/CardBus bridge. 1997-05-03 13:57:26 +00:00
phk
8f01634fd1 1. i82365.h: Chip identifiers should not be #ifdef PC98. Add identifier
(pt. unused) for TI PCI1130.

2. pccard.c: PCIC_RESUME_RESET is now (also) a sysctl.  (Never make it
    a #ifdef if it can be made a sysctl!)

3. pcic.c: make getb() and putb() proper member functions of struct
    pcic_slot.  Add a couple of missing casts.
1997-04-20 07:21:12 +00:00
dufault
e62e4c624a Make MOD_* macros almost consistent:
Use the name argument almost the same in all LKM types.  Maintain
the current behavior for the external (e.g., modstat) name for DEV,
EXEC, and MISC types being #name ## "_mod" and SYCALL and VFS only
#name.  This is a candidate for change and I vote just the name without
the "_mod".

Change the DISPATCH macro to MOD_DISPATCH for consistency with the
other macros.

Add an LKM_ANON #define to eliminate the magic -1 and associated
signed/unsigned warnings.

Add MOD_PRIVATE to support wcd.c's poking around in the lkm structure.

Change source in tree to use the new interface.

Reviewed by:	Bruce Evans
1997-04-06 11:14:13 +00:00
nate
00632c9a58 Argh, this time get the parentheses right. This hasn't been a good day for me. 1997-02-21 05:46:57 +00:00
nate
5bd7bd7fd0 Whoops, make sure we have enough parenthesis.
Pointed out by:	bde
1997-02-21 01:29:32 +00:00
nate
ecb2d8d8e0 Try to make the BROKEN_VLSI chipset detection better, and not break
non-broken chipssets whose ID is 0x84, such as the one found in the NEC
6030H.

> The code relies on the assumption that on a genuine_broken vlsi, you
> don't get 0x84 when probing slot 1 in the normal location.  On the versa I
> do get 0x84 when probing slot 1 in the normal location.  What you get on
> genuine_broken at the normal slot 1 location is unknown to me;

Submitted by:	Chris Timmons <skynyrd@opus.cts.cwu.edu>
1997-02-18 19:20:52 +00:00
nate
7217fae5fe In the disable_slot() routine, the variable "i" was
being used without ever being initialized.  From examining
the rest of the routine, it looks like this is a typo,
and it really should have been "1" instead of "i".

Submitted by:	mpp
1997-02-11 17:22:46 +00:00
kato
2c5877c139 Deleted obsolete structure, pc98_device. 1997-02-04 22:29:50 +00:00
nate
911d47a567 One other minor include file change.
Submitted by:	bde
1997-01-14 16:29:05 +00:00
nate
c18aed3391 Include file cleanups.
Submitted by:	bde
1997-01-13 21:51:13 +00:00