Commit Graph

132 Commits

Author SHA1 Message Date
Peter Wemm
e91896117b Well folks, this is it - The second stage of the removal for build support
for LKM's..
1999-04-17 08:36:07 +00:00
Nick Sayer
db49f041ae Import PCI pccard bridge chip probing from PAO. Hopeful prelude for
broadening chipset support in -current.

Reviewed by:	joerg
Obtained from:	PAO
1999-04-01 15:28:10 +00:00
Nate Williams
efc7b6fd9d - Made the setting of the machdep.pccard.pcic_irq from the boot config file
actually work.

Reviewed by:	"Sean O'Connell" <sean@stat.Duke.EDU>, msmith
1999-03-26 00:20:25 +00:00
Warner Losh
841c7bb674 Remove static delcarations from {,un}register_pcic_intr declarations
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
1999-03-12 18:45:47 +00:00
Roger Hardiman
6fe7bbc584 Updated to use new APIC (SMP) safe interrupt register/unregister
functions.
Posted for review to -smp and -mobile and -hackers with no objections.

Reviewed by:	Nate
1999-03-10 15:00:54 +00:00
Roger Hardiman
ac483aaf25 Header file for pcic interrupt register/unregister functions.
No objections from -smp or -mobile or -hackers.
1999-03-10 14:56:28 +00:00
Guido van Rooij
05440e6882 On second thought: do previous fux in pcic.c better.
Now we just untimeout the call to inserted() if it exists.
1999-02-14 20:41:01 +00:00
Guido van Rooij
a1f7e1b4c5 Somehow, it is possible to get a pcicintr() when in the resume process.
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.
1999-02-14 20:16:15 +00:00
Jun Kuriyama
a766716a9a Add "beep" ioctl. (#10 is reserved for PIOCSVIR)
Obtained from:	PAO3
Reviewed by:	-current list
1999-02-13 11:32:00 +00:00
Mike Smith
7546e83ec1 Allow the interrupt allocated to the PCIC to be tuned from the kernel
environment by setting the variable machdep.pccard.pcic_irq.  If
the IRQ is invalid, the PCIC will run in polled mode.
1999-01-29 01:18:15 +00:00
Matthew Dillon
fe08c21a53 Fix warnings in preparation for adding -Wall -Wcast-qual to the
kernel compile.

    This commit includes significant work to proper handle const arguments
    for the DDB symbol routines.
1999-01-27 23:45:44 +00:00
Bruce Evans
dc34e67676 Include <sys/select.h> -- don't depend on pollution in <sys/proc.h>. 1999-01-27 10:10:03 +00:00
Torsten Blum
de6f543955 Identify the TI1250 PCMCIA/CardBus bridge. It seems that it's compatible
to the TI1131. At least it works in my Compaq Armada 7800.
1999-01-25 12:59:31 +00:00
Peter Wemm
9b3df7693a Initial update pccard code for KLD module support. Module support
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).
1999-01-19 00:18:28 +00:00
Matthew Dillon
2cbe36f725 probe function changed from returning char * to const char *. 1998-12-14 06:37:37 +00:00
Archie Cobbs
f1d19042b0 The "easy" fixes for compiling the kernel -Wunused: remove unreferenced static
and local variables, goto labels, and functions declared but not defined.
1998-12-07 21:58:50 +00:00
Peter Wemm
08274d68df Add #include to get a prototype for update_intr_masks(). 1998-11-09 09:30:55 +00:00
Nate Williams
cf0ee54fec - Fix a bug where a "power_off_slot' timeout was not cancelled when the
computer 'suspended', although the slot was powered off.  There was a
  race where the slow could be powered off *after* it was assigned a
  new driver when the computer was 'resumed'.

Noticed by:	Brian Somers <brian@Awfulhak.org>
1998-09-24 17:56:31 +00:00
Brian Somers
8aa2558802 Make PCIC_RESUME_RESET an proper option.
My laptop (a CTX Cybernote) needs this.  It claims to have a

  PC-Card VLSI 82C146 (5 mem & 2 I/O windows)
1998-09-08 18:09:51 +00:00
Warner Losh
344131cb71 o renable pccard_remove_driver (it was used in the skel.c driver)
o update skel.c to lots of stuff that has happened since the last time
  it was updated.
1998-08-26 07:09:58 +00:00
Warner Losh
6e73d499d8 Add probing support for the vadem VG365 and the Vadem VG465 pcic chips.
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.
1998-08-25 22:46:44 +00:00
Bruce Evans
18df27bda2 Fixed printf format errors. 1998-08-18 00:32:50 +00:00
Bruce Evans
86a14a7a0a Use [u]intptr_t instead of [u_]long for casts between pointers and
integers.  Don't forget to cast to (void *) as well.
1998-08-16 01:21:52 +00:00
Bruce Evans
9a2daf9190 Changed the type of an isa/general interrupt handler to take a
`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).
1998-06-18 15:32:09 +00:00
Doug Rabson
ecbb00a262 This commit fixes various 64bit portability problems required for
FreeBSD/alpha.  The most significant item is to change the command
argument to ioctl functions from int to u_long.  This change brings us
inline with various other BSD versions.  Driver writers may like to
use (__FreeBSD_version == 300003) to detect this change.

The prototype FreeBSD/alpha machdep will follow in a couple of days
time.
1998-06-07 17:13:14 +00:00
KATO Takenori
a6ed0310a9 Include pc98.h instead of isa.h when PC98 is defined. 1998-05-05 13:21:08 +00:00
Nate Williams
480895cbea - Give up trying for a simple solution for correctly recognizing if a card
was really removed, or simply 'faked' by a suspend/resume.  Keep track
  of both current and previous state, and send that information to the
  userland programs.

[
XXX - This breaks binary compatability with older pccardd programs, but
they don't work reliably. :(
]
1998-04-20 15:21:02 +00:00
Nate Williams
e4c50d858a - Only poll the PCIC controller for insertion/removal events if the
controller hasn't been assigned an IRQ.
1998-04-20 15:15:20 +00:00
Bruce Evans
c1087c1324 Support compiling with `gcc -ansi'. 1998-04-15 17:47:40 +00:00
Nate Williams
c839c3ace3 - Whoops, better have the structure created before trying to use it in
the patch I just submitted.

Noticed by:     phk
1998-04-09 14:01:13 +00:00
Nate Williams
9d24fe0e45 - Fix bug I introduced a few months ago. If a driver fails the probe,
correctly unregister the interrupt from the system.

[ My fix is much simpler than the one provided in the PR ]

PR:		6249
1998-04-08 15:00:02 +00:00
Tatsumi Hosokawa
bf595ed7c2 Uninitialized pointer reference may happen on particular environment.
(for example, it kills my new laptop, Toshiba Libretto 100....)
1998-03-19 16:19:16 +00:00
Bruce Evans
6b16931c00 Removed unused #includes. 1998-02-25 05:58:50 +00:00
Nate Williams
9dda04f1e2 - Removed typo in Copyright and added Id. 1998-02-07 20:41:20 +00:00
Eivind Eklund
7b778b5e61 Make all file-system (MFS, FFS, NFS, LFS, DEVFS) related option new-style.
This introduce an xxxFS_BOOT for each of the rootable filesystems.
(Presently not required, but encouraged to allow a smooth move of option *FS
to opt_dontuse.h later.)

LFS is temporarily disabled, and will be re-enabled tomorrow.
1998-01-24 02:54:56 +00:00
Nate Williams
a9b9e46550 - Support for multiple PD6832 controllers. Each found 6832 is assigned
and initializes the next two ports in order starting at 03e0.  This
  also patches pcic_p.h to reduce the I/O ports mapped from 4 to 2.

Submitted by:	Ted Faber <faber@ISI.EDU>
1998-01-20 21:11:03 +00:00
Mike Smith
53922aaf18 Specify the minor number correctly when creating devfs entries. 1998-01-02 13:35:06 +00:00
Nate Williams
abacde6281 - 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 Williams
80ae4948b8 - Add necessary include files and fix bugs in last. 1997-12-02 22:27:58 +00:00
Nate Williams
12defa4078 - 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 Williams
b4a6741e01 - Remove PCI code from here, now that the PCI framework lives in /sys/pci. 1997-12-02 21:31:35 +00:00
Nate Williams
030713d715 - 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 Williams
052492ab36 - 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 Williams
40b8c3d008 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 Williams
e7f1b188ac - Reset the pcic controller interrupt 'poll' timeout *after* we call the
interrupt routine.
1997-11-04 17:50:23 +00:00
Nate Williams
57bb328afe - More style nits (sorry, I should have done this last time). 1997-10-28 20:58:53 +00:00
Nate Williams
6a6dd364ab - Style nit. 1997-10-28 20:50:58 +00:00
Nate Williams
ec510cabb0 - 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 Williams
075a76a29e - 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 Williams
6794cb8989 - Patch the 'skeleton' example driver to be more consistant with the new
state of the world.
1997-10-26 21:01:44 +00:00