Commit Graph

34 Commits

Author SHA1 Message Date
Nicolas Souchu
3ae3f8b0be Convert inb/outb to bus_space.
Submitted by:	jcm@FreeBSD-uk.eu.org
2001-06-23 06:52:54 +00:00
Nicolas Souchu
c264e80fb7 Consider that the chipset may be in ECP mode (from BIOS settings)
even if mode PS/2 is forced with bootflags. As a matter of fact,
chipsets needs some extra configuration for accessing PS/2 mode
from ECP. The current patch is only relevant for generic chipsets
since specific code is supposed to deal with this during detection.
2001-01-25 10:51:41 +00:00
Nicolas Souchu
1afd1f9956 Fix the PR. Getting a dma channel equal to 0 remains a problem though.
PR:		i386/22568
2000-12-19 21:28:17 +00:00
Doug Rabson
ac7ba92669 Add support for the PC87303 chipset (found on Miata alphas) and add
support for relocating the port address if the isa hints specify a
different address from the address the chipset currently has.

Submitted by: Andrew M. Miklic <miklic@ibm.net>
2000-07-20 09:28:07 +00:00
Doug Rabson
6a5be8627c Add smc37c935 chipset support and clean up the code which tries to
allocate a short port range in some alpha configurations.

Submitted by: "Andrew M. Miklic" <miklic@udlkern.fc.hp.com>,
	      Mark Abene <phiber@radicalmedia.com>
2000-07-18 09:01:09 +00:00
Doug Rabson
76ea0c0c8f Only print the diagnostic about extended I/O ports if bootverbose is true. 2000-06-25 09:20:56 +00:00
Doug Rabson
5c885c3f83 Port ppc driver to alpha.
Submitted by: Andrew M. Miklic <miklic@ibm.net>
2000-05-14 13:47:57 +00:00
Garrett Wollman
7a15d61951 Enable PnP attachment for parallel port controllers.
PR:		17495
2000-04-22 15:08:50 +00:00
Peter Wemm
2b898d39e5 Remove #include "ppc.h" and #if NPPC > 0 - this is always true as it is
'optional ppc' in conf/files*
2000-01-29 14:02:30 +00:00
Doug Rabson
d64d73c906 * Don't use ivars to access resources, bus_set/get_resource is much better.
* First approximation of making this work on alpha (not working yet).
2000-01-25 22:21:45 +00:00
Peter Wemm
a9d565fcd2 Don't do device_set_desc() until after checking for PnP probes. Otherwise
things like sound cards can get called "Parallel port".  A note to the
unwary; the isa-pnp devices in the system are probed like PCI - each
device ID is passed to *all* isa probe routines to find the best match.
If the driver is not prepared to deal with this, it must abort in this
scenario or it will try and claim all PnP devices.
2000-01-14 05:03:23 +00:00
Nicolas Souchu
0f210c922b Port of ppbus standalone framework to the newbus system.
Note1: the correct interrupt level is invoked correctly for each driver.
       For this purpose, drivers request the bus before being able to
       call BUS_SETUP_INTR and BUS_TEARDOWN_INTR call is forced by the ppbus
       core when drivers release it. Thus, when BUS_SETUP_INTR is called
       at ppbus driver level, ppbus checks that the caller owns the
       bus and stores the interrupt handler cookie (in order to unregister
       it later).

       Printing is impossible while plip link is up is still TRUE.
       vpo (ZIP driver) and lpt are make in such a way that
       using the ZIP and printing concurrently is permitted is also TRUE.

Note2: specific chipset detection is not done by default. PPC_PROBE_CHIPSET
       is now needed to force chipset detection. If set, the flags 0x40
       still avoid detection at boot.

Port of the pcf(4) driver to the newbus system (was previously directly
connected to the rootbus and attached by a bogus pcf_isa_probe function).
2000-01-14 00:18:06 +00:00
Peter Wemm
c3aac50f28 $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
Peter Wemm
9d0e5f96b0 Return the port size from the probe.
"ppc0 at port 0x378 irq 7 drq 3 on isa0" becomes
"ppc0 at port 0x378-0x37f irq 7 drq 3 on isa0"
1999-04-22 13:10:43 +00:00
Nicolas Souchu
5174ad8b76 More appropriate fix to the id_irq read during probe 1999-02-14 22:02:47 +00:00
Nicolas Souchu
a1142115dd The way the interrupt id was calculated was wrong and the lpt
driver was thinking irq was enabled although it wasn't.
This case was particular to a no-interrupt static configuration.

Reported by: "Norman C. Rice" <nrice@emu.sourcee.com>
1999-02-14 17:09:59 +00:00
Nicolas Souchu
3ab971c14f Fix interrupt handling with DMA. Bit nFault was tested in the control reg.
instead of the status reg. and check ECP mode before considering nFault.
1999-02-14 12:03:35 +00:00
Nicolas Souchu
c9ab07382c Fix compile warnings about missing braces around static initialization of unions. 1999-01-31 11:52:04 +00:00
Nicolas Souchu
20240fa3ad Distinguish EPP address/data register. Add EPP address register access to ppi.
Change microseq offsets. Previously, offsets of the program counter where
added to the index of the current microinstruction. Make them rely on the
index of the next executed microinstruction.

Suggested by: Luigi Rizzo <luigi@labinfo.iet.unipi.it>
1999-01-30 15:35:39 +00:00
Nicolas Souchu
a7006f894f Fix broken low level ppb_rxxx() return type: char becomes u_char.
Submitted by: Bruce Evans <bde@zeta.org.au>

Some ppb bootup printfs simplified.
1999-01-10 16:41:14 +00:00
Nicolas Souchu
bc35c17446 Major ppbus commit with:
+ ECP parallel port chipset FIFO detection
	+ DMA+FIFO parallel I/O handled as chipset specific
	+ nlpt updated in order to use the above enhanced parallel I/O.
	  Use 'lptcontrol -e' to use enhanced I/O
	+ Various options documented in LINT
	+ Full IEEE1284 NIBBLE and BYTE modes support. See ppbus(4) for
	  an overview of the IEEE1284 standard
	+ Detection of PnP parallel devices at boot
	+ Read capability added to nlpt driver to get IEEE1284 compliant
	  printer status with a simple 'cat /dev/lpt0'
	+ IEEE1284 peripheral emulation added to BYTE mode. Two computers
	  may dialog according to IEEE1284 signaling method.
	  See PERIPH_1284 option and /sys/dev/ppbus/ppi.c

All this code is supposed to provide basic functions for IEEE1284 programming.
ppi.c and nlpt.c may act as examples.
1999-01-10 12:04:56 +00:00
Tim Vanderhoek
dea9268b70 Silence -Wtrigraph.
Submitted by:	Bradley Dunn <bradley@dunn.org>  (pr: kern/8817)
1998-12-30 00:37:44 +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
Nicolas Souchu
af5487872e pcf.c: timeout management added
ppc.c: nsc code improved. Actually, a complete rewrite.
1998-10-31 11:37:09 +00:00
Bruce Evans
fe310de802 Initialize isa_devtab entries for interrupt handlers in individual
device drivers, not in ioconf.c.  Use a different hack in isa_device.h
so that a new config(8) is not required yet.

pc98 parts approved by: kato
1998-10-22 05:58:45 +00:00
Nicolas Souchu
0a40e22a5d - program counter was previously an index in the microsequence, now pc
is struct ppb_microseq* pointing directly into the microsequence
1998-09-20 14:47:01 +00:00
Nicolas Souchu
41990851b8 invalid printf call fixed -> compile time warning removed 1998-09-13 20:57:06 +00:00
Nicolas Souchu
54ad6085b1 ppbus enhanced to support ZIP+ : microseq improved 1998-09-13 18:26:44 +00:00
Nicolas Souchu
edcfcf270b printing with compatible mode fixed if ECP available + more verbose if bootverbose set 1998-09-02 20:34:34 +00:00
Bruce Evans
00671271c3 Fixed printf format errors. Only one left in LINT on i386's. 1998-08-24 02:28:16 +00:00
Mike Smith
46f3ff7986 Major ppbus updates from the author.
- ppbus now supports PLIP via the if_plip driver
 - ieee1284 infrastructure added, including parallel-port PnP
 - port microsequencer added, for scripting the sort of port I/O
   that is common with parallel devices without endless calls up and down
   through the driver structure.
 - improved bus ownership behaviour among the ppbus-using drivers.
 - improved I/O chipset feature detection

The vpo driver is now implemented using the microsequencer, leading to
some performance improvements as well as providing an extensive example
of its use.

Reviewed by:	msmith
Submitted by:	Nicolas Souchu <Nicolas.Souchu@prism.uvsq.fr>
1998-08-03 19:14:33 +00:00
Dag-Erling Smørgrav
dc73342347 Seventy-odd "its" / "it's" typos in comments fixed as per kern/6108. 1998-04-17 22:37:19 +00:00
Bruce Evans
0ec3217356 Removed unused #includes. 1997-09-01 02:08:42 +00:00
Mike Smith
676465394a ISA Parallel-Port Bus chipset driver.
Submitted by:	Nicolas Souchu <Nicolas.Souchu@prism.uvsq.fr>
1997-08-14 14:01:36 +00:00