LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   parallel port PCI card : changing modes (https://www.linuxquestions.org/questions/linux-hardware-18/parallel-port-pci-card-changing-modes-559359/)

slg23 06-05-2007 11:36 AM

parallel port PCI card : changing modes
 
I recently installed a parallel port PCI card into my computer because the motherboard did not come with one. I need it for the Xilinx download cable used to program FPGAs, and it must run in ECP mode. Right now it is set up for [PCSPP, TRISTATE, EPP].

Here's the info:

Computer's running Red Hat Fedora Core 2 with a 2.6.5-1.358 kernel.

In the BIOS I set for the parallel port: address 0x378, mode ECP.
After booting I rang:

modprobe parport_pc io=0x378,0xc400


+From dmesg:

parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE,EPP]
parport0: irq 7 detected
parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE,EPP]
parport0: irq 7 detected
lp0: using parport0 (polling).
parport0: PC-style at 0x378 (0x778), irq 0 [PCSPP,TRISTATE,EPP]
parport0: irq 0 in use, resorting to polled operation
parport1: PC-style at 0xc400, irq 0 [PCSPP,TRISTATE,EPP]
parport1: irq 0 in use, resorting to polled operation

(parport0 is for a non-existent motherboard parallel port correct? Don't know why ECP isn't an option. I assume info before the lp0 is before modprobe and rest after modprobe run.)

+Relevant info from /proc/pci:

Bus 4, device 1, function 0:
Class 0780: PCI device 9710:9805 (rev 1).
IRQ 9.
Master Capable. Latency=64.
I/O at 0xc400 [0xc407].
I/O at 0xc000 [0xc007].
I/O at 0xb800 [0xb807].
I/O at 0xb400 [0xb407].
I/O at 0xb000 [0xb007].
I/O at 0xa800 [0xa80f].

So how can I change the mode for parport1 to ECP? Should I just try the BIOS again even though it didn't work the first time?

theNbomr 06-05-2007 03:32 PM

The libieee1284 library provides the negotiate function to invoke different modes. It seems possible, probable even, that the application that uses this port will be built using libieee1284, and will therefore use said function to do the right thing. If not, have a look at the library docs, and see if you can see how to write a simple tool to set the mode of the port. If you aren't a (C) programmer, I may be able to provide you with enough code to get you going. There are also a few example applications 'out there' that use libieee1284.
Linux pretty much ignores the BIOS, so setting in there are unlikely to have much effect.

--- rod.


All times are GMT -5. The time now is 12:05 AM.