SGI O2 Parallel Port Support for Linux/MIPS

The built-in parallel port on the SGI 02 workstation (a.k.a. IP32) is an IEEE 1284 parallel port driven by a Texas Instrument TL16PIR552PH chip (at least on my R5000). This chip supports SPP, bidirectional, EPP and ECP modes. It has a 16 byte FIFO buffer and supports DMA transfers.

The parallel port connector is an IEEE 1284-C connector. The cable pin-out assignments can be found on SGI TPL (Hardware: End-User/O2_OG - Appendix A. Technical Specifications).

Theoretically, we could simply use the parport_pc module. It is however not so simple. The parport_pc code assumes that the parallel port registers are port-mapped. On the O2, they are memory-mapped. Furthermore, each register is replicated on 256 consecutive addresses (as it is for the built-in serial ports on the same chip).

Linux Kernel Module: parport_ip32

That's why I wrote a low-level parallel port driver for the built-in port on SGI IP32. The module is named parport_ip32. The latest Linux kernel patch is available here. The patch is normally against the latest 2.6 Linux/MIPS kernel at published date.

The module supports the following parameters:

features (uint)
Bit mask of features to enable
verbose_probing (bool)
Log chit-chat during initialization.

Current Status

The driver (in its 0.6 version) has been included in Linux 2.6.16-rc3.

What works:

What remains to do:

All tests were done with an HP LaserJet 5MP connected to a R5000 SGI O2.

History

See the full ChangeLog for more details.

Version 0.6 - Tue, 24 Jan 2006 (Linux/MIPS 2.6.15)
More code cleanup.
Version 0.5 - Fri, 20 Jan 2006 (Linux/MIPS 2.6.15)
Code cleanup.
Version 0.4 - Sat, 12 Nov 2005 (Linux/MIPS 2.6.14)
Add EPP and ECP support.
Version 0.3 - Fri, 11 Nov 2005 (Linux/MIPS 2.6.14)
Add DMA support. Lots of code cleanup.
Version 0.2 - Mon, 24 Oct 2005 (Linux/MIPS 2.6.14-rc2)
Fix serious bugs in FIFO transfer mode.
Version 0.1 - Sat, 22 Oct 2005 (Linux/MIPS 2.6.14-rc2)
First public release.

Sample Kernel Logs

parport_ip32: SGI IP32 built-in parallel port driver v0.6
parport_ip32: Compiled on Jan 24 2006, 21:31:04
parport_ip32: 0x1f380000: Found working ECR register
parport_ip32: 0x1f380000: PWord is 8 bits
parport_ip32: 0x1f380000: FIFO is 16 PWords deep
parport_ip32: 0x1f380000: writeIntrThreshold is 12
parport_ip32: 0x1f380000: readIntrThreshold is 12
parport_ip32: 0x1f380000: Interrupt support enabled
parport_ip32: 0x1f380000: DMA support enabled
parport_ip32: 0x1f380000: Hardware support for SPP mode enabled
parport_ip32: 0x1f380000: Hardware support for EPP mode enabled
parport_ip32: 0x1f380000: Hardware support for ECP mode enabled
parport0: SGI IP32 at 0x1f380000 (0x1f388000), irq 49 [PCSPP,TRISTATE,COMPAT,EPP,ECP,DMA]
parport0: Printer, Hewlett-Packard HP LaserJet 5MP
lp0: using parport0 (interrupt-driven).

Related Links

Feedback

If you actually tried this driver, I would appreciate your feedback. Just send me a mail at <arnaud.giersch@free.fr>.


Arnaud Giersch
Last modified: Tue Feb 28 11:52:05 CET 2006