PCI serial card with PCI 9052?
Hi,
I have a PCI card with two serial ports on it. It has PLX Technology PCI9052 and HOLTEK HT6552IR chips. Pictures of that card are at
http://www.janik.cz/tmp/pci9052/.
lspci:
00:08.0 Network controller: PLX Technology, Inc. PCI <-> IOBus Bridge (rev 02)
Subsystem: Unknown device d841:0200 Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- Status: Cap- 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- Interrupt: pin A routed to IRQ 11 Region 0: Memory at e400b000 (32-bit, non-prefetchable) [size=128] Region 1: I/O ports at d400 [size=128] Region 2: I/O ports at d800 [size=8] Region 3: I/O ports at dc00 [size=8]
00: b5 10 50 90 03 00 80 02 02 00 80 02 08 00 00 00 10: 00 b0 00 e4 01 d4 00 00 01 d8 00 00 01 dc 00 00 20: 00 00 00 00 00 00 00 00 00 00 00 00 41 d8 00 02 30: 00 00 00 00 00 00 00 00 00 00 00 00 0b 01 00 00
Is this card supported? Tim?
Signature · 6 lines
Pavel Janík
/* After several hours of tedious analysis, the following hash
* function won. Do not mess with it... -DaveM
*/
-- 2.2.16 fs/buffer.cQuoted 17 lines · Pavel Jan?k
Hi,
I have a PCI card with two serial ports on it. It has PLX Technology PCI9052 and HOLTEK HT6552IR chips. Pictures of that card are at
http://www.janik.cz/tmp/pci9052/.lspci:
00:08.0 Network controller: PLX Technology, Inc. PCI <-> IOBus Bridge (rev 02)
Subsystem: Unknown device d841:0200 Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- Status: Cap- 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- Interrupt: pin A routed to IRQ 11 Region 0: Memory at e400b000 (32-bit, non-prefetchable) [size=128] Region 1: I/O ports at d400 [size=128] Region 2: I/O ports at d800 [size=8] Region 3: I/O ports at dc00 [size=8]
Quoted 6 lines
00: b5 10 50 90 03 00 80 02 02 00 80 02 08 00 00 00 10: 00 b0 00 e4 01 d4 00 00 01 d8 00 00 01 dc 00 00 20: 00 00 00 00 00 00 00 00 00 00 00 00 41 d8 00 02 30: 00 00 00 00 00 00 00 00 00 00 00 00 0b 01 00 00
Is this card supported? Tim?
First we need to know is it 8250 compatible. You need to make some experiments with setserial to test compatibility.
For example:
setserial /dev/ttyS5 port=0xd800 irq=11
then try to open /dev/ttyS5 with minicom or other terminal program.
Signature · 2 lines
Andrey Panin | Embedded systems software developer [email protected] | PGP key: wwwkeys.eu.pgp.net
From: Andrey Panin <[email protected]>
Date: Wed, 20 Nov 2002 12:56:18 +0300
Hi Andrey,
Quoted 3 lines
Quoted 3 lines
I have a PCI card with two serial ports on it. It has PLX Technology PCI9052 and HOLTEK HT6552IR chips. Pictures of that card are at
http://www.janik.cz/tmp/pci9052/.
[...]
Quoted 7 lines
First we need to know is it 8250 compatible. You need to make some experiments with setserial to test compatibility.
For example:
setserial/dev/ttyS5port=0xd800 irq=11then try to open
/dev/ttyS5with minicom or other terminal program.
I have tried to cat /dev/ttyS5 after
setserial /dev/ttyS5 port 0xd800 irq 11
[ I tried 0xd400 and 0xd800] and everything went to
cat: /dev/ttyS5: Input/output error
So, maybe this card is not 8250 compatible :-(
The card has one region of size 128:
Region 1: I/O ports at d400 [size=128]
I think that it is EEPROM, because there is a driver for EEPROM on this PLX chip somewhere on the Internet (I do not have that link here).
Signature · 4 lines
Pavel Janík
I think I started with hitting C-h a lot. Really a LOT.
-- Kai Grossjohann in gnu.emacs.help about Emacs knowledgeQuoted 3 lines · Pavel Janík
I have tried to cat
/dev/ttyS5aftersetserial
/dev/ttyS5port0xd800irq 11
I think you actually want:
setserial /dev/ttyS5 port 0xd800 irq 11 autoconfig
and then cat /proc/tty/driver/serial and see if the 5: line has changed from uart:unknown.
Signature · 2 lines
Russell King ([email protected]) The developer of ARM Linux http://www.arm.linux.org.uk/personal/aboutme.html
Quoted 9 lines · Russell King
Quoted 5 lines · Pavel Janík
I have tried to cat
/dev/ttyS5aftersetserial
/dev/ttyS5port0xd800irq 11
Quoted 7 lines
I think you actually want:
setserial
/dev/ttyS5port0xd800irq 11 autoconfigand then cat
/proc/tty/driver/serialand see if the 5: line has changed from uart:unknown.
Given the fact HT6552IR is a (very old?) ISA Super IO chip with:
* Support two serial ports.
Support one printer port with EPP/ECP/SPP function.
*Parallel Port and Serial Port IO Base Address Select:
378, 278, 3BC, 358, 258, 398, 298, 3F8, 2F8, 3E8,
2E8, 35C, 25C, 2BC, 39C, 29C * Seven IRQ selectable (IRQ 3,4,5,7,10,11,12)
* All port is designed for disable and enable.
it surely is 8250 compatible.
As you have two 8port regions for two serial ports these should be the correct locations.
From: Russell King <[email protected]>
Date: Sun, 24 Nov 2002 11:43:07 +0000
Hi,
Quoted 11 lines · Pavel Janík
Quoted 3 lines
I have tried to cat
/dev/ttyS5aftersetserial
/dev/ttyS5port0xd800irq 11I think you actually want:
setserial
/dev/ttyS5port0xd800irq 11 autoconfigand then cat
/proc/tty/driver/serialand see if the 5: line has changed from uart:unknown.
yes, that's it:
mirka:~ # grep ^5: /proc/tty/driver/serial
5: uart:unknown port:1A8 irq:9
mirka:~ # setserial /dev/ttyS5 port 0x9800 irq 11 autoconfig mirka:~ # grep ^5: /proc/tty/driver/serial
5: uart:16550A port:9800 irq:11 baud:9600 tx:0 rx:0
So, adding this patch should help me. I can not test it right now, because I do not have any serial device here at home, but will test it on monday.
Thank you for your help.
drivers/char/serial.c +7 -1
@@ -4181,7 +4181,7 @@#ifdef SERIAL_DEBUG_PCI printk (KERN_DEBUG " Subsystem ID %lx (intel 960)\n" , - (unsigned long ) board->subdevice); + (unsigned long ) dev->subsystem_device);#endif /* is firmware started? */ pci_read_config_dword (dev,0x44 , (void *) &oldval);
@@ -4340,6 +4340,7 @@ pbn_panacom2, pbn_panacom4, pbn_plx_romulus, + pbn_plx_9052, pbn_oxsemi, pbn_timedia, pbn_intel_i960,
@@ -4425,6 +4426,8 @@ 0x400, 7, pci_plx9050_fn }, {SPCI_FL_BASE2 ,4 ,921600 ,/* pbn_plx_romulus */ 0x20, 2, pci_plx9050_fn, 0x03 }, + { SPCI_FL_BASE2, 2, 115200, /* pbn_plx_9052 */ + 0x400},/* This board uses the size of PCI Base region 0 to * signal now many ports are available */ { SPCI_FL_BASE0 | SPCI_FL_REGION_SZ_CAP, 32, 115200 }, /* pbn_oxsemi */
@@ -4707,6 +4710,9 @@ {PCI_VENDOR_ID_PLX ,PCI_DEVICE_ID_PLX_ROMULUS ,0x10b5 ,0x106a ,0 ,0 , pbn_plx_romulus }, + { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9050, +0xd841 ,0x0200 ,0 ,0 , + pbn_plx_9052 }, { PCI_VENDOR_ID_QUATECH, PCI_DEVICE_ID_QUATECH_QSC100,PCI_ANY_ID ,PCI_ANY_ID ,0 ,0 , pbn_b1_4_115200 },
Signature · 4 lines
Pavel Janík
I can't make such predictions--my crystal ball is cloudy today.
-- Richard Stallman in emacs-develHi,
patch looks good, but here is yet another thing to test. We need to know base baudrate of this card. I failed to find HT6552 datasheet on Holtek site, so we need another experiment.
You can test it this way:
1) connect one port of this card with normal serial port or any serial device with known baudrate;
2) test data transfer, if it fails try to set lower speed on PCI card's port.
3) if you found needed speed, calculate base baudrate
<base baudrate> = (<speed of normal port> / <speed of PCI card port>) * 115200
Good luck.
Signature · 2 lines
Andrey Panin | Embedded systems software developer [email protected] | PGP key: wwwkeys.eu.pgp.net
From: Andrey Panin <[email protected]>
Date: Mon, 25 Nov 2002 12:48:28 +0300
Hi Andrey,
Quoted 1 line
patch looks good, but here is yet another thing to test.
I think that this will be additional thing to do. Right now, I have this:
serial.c renamed from drivers/char/serial.c +9 -3
@@ -139,8 +139,8 @@#undef SERIAL_DEBUG_OPEN#undef SERIAL_DEBUG_FLOW#undef SERIAL_DEBUG_RS_WAIT_UNTIL_SENT -#undef SERIAL_DEBUG_PCI -#undef SERIAL_DEBUG_AUTOCONF +#define SERIAL_DEBUG_PCI +#define SERIAL_DEBUG_AUTOCONF /* Sanity checks */
@@ -4181,7 +4181,7 @@#ifdef SERIAL_DEBUG_PCI printk (KERN_DEBUG " Subsystem ID %lx (intel 960)\n" , - (unsigned long ) board->subdevice); + (unsigned long ) dev->subsystem_device);#endif /* is firmware started? */ pci_read_config_dword (dev,0x44 , (void *) &oldval);
@@ -4340,6 +4340,7 @@ pbn_panacom2, pbn_panacom4, pbn_plx_romulus, + pbn_plx_9052, pbn_oxsemi, pbn_timedia, pbn_intel_i960,
@@ -4425,6 +4426,8 @@ 0x400, 7, pci_plx9050_fn }, {SPCI_FL_BASE2 ,4 ,921600 ,/* pbn_plx_romulus */ 0x20, 2, pci_plx9050_fn, 0x03 }, + { SPCI_FL_BASE2, 2, 115200, /* pbn_plx_9052 */ + 0x8 },/* This board uses the size of PCI Base region 0 to * signal now many ports are available */ { SPCI_FL_BASE0 | SPCI_FL_REGION_SZ_CAP, 32, 115200 }, /* pbn_oxsemi */
@@ -4707,6 +4710,9 @@ {PCI_VENDOR_ID_PLX ,PCI_DEVICE_ID_PLX_ROMULUS ,0x10b5 ,0x106a ,0 ,0 , pbn_plx_romulus }, + { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9050, +0xd841 ,0x0200 ,0 ,0 , + pbn_plx_9052 }, { PCI_VENDOR_ID_QUATECH, PCI_DEVICE_ID_QUATECH_QSC100,PCI_ANY_ID ,PCI_ANY_ID ,0 ,0 , pbn_b1_4_115200 },
kernel boots with:
Serial driver version 5.05c (2001-07-08) with MANY_PORTS MULTIPORT SHARE_IRQ SERIAL_PCI ISAPNP enabled Testing ttyS0 (0x03f8, 0x0000)...
Testing ttyS1 (0x02f8, 0x0000)...
Testing ttyS2 (0x03e8, 0x0000)...
serial: ttyS2: simple autoconfig failed (ff, ff)
Testing ttyS3 (0x02e8, 0x0000)...
serial: ttyS3: simple autoconfig failed (ff, ff)
ttyS00 at 0x03f8 (irq = 4) is a 16550A
ttyS01 at 0x02f8 (irq = 3) is a 16550A
Entered probe_serial_pci()
Setup PCI/PNP port: port fcf0, irq 9, type 0
Testing ttyS4 (0xfcf0, 0x0000)...
ttyS04 at port 0xfcf0 (irq = 9) is a 16550A
Setup PCI/PNP port: port fcf8, irq 9, type 0
Testing ttyS5 (0xfcf8, 0x0000)...
ttyS05 at port 0xfcf8 (irq = 9) is a 16550A
Leaving probe_serial_pci() (probe finished)
/proc/pci contains:
PCI devices found:
Bus 0, device 0, function 0:
Class 0000: PCI device 1106:0505 (rev 0).
Bus 0, device 15, function 0:
Class 0300: PCI device 5333:8811 (rev 0).
Non-prefetchable 32 bit memory at 0xfe000000 [0xfe7fffff].
Bus 0, device 18, function 0:
Class 0280: PCI device 10b5:9050 (rev 2).
IRQ 9.
Non-prefetchable 32 bit memory at 0xfedffc00 [0xfedffc7f].
I/O at 0xfc00 [0xfc7f].
I/O at 0xfcf0 [0xfcf7].
I/O at 0xfcf8 [0xfcff]./proc/tty/driver/serial:
serinfo:1.0 driver:5.05c revision:2001-07-08
0: uart:16550A port:3F8 irq:4 baud:9600 tx:0 rx:0 RTS|DTR
1: uart:16550A port:2F8 irq:3 baud:9600 tx:0 rx:0
4: uart:16550A port:FCF0 irq:9 baud:9600 tx:40 rx:57 brk:2 oe:1 RTS|DTR|DSR 5: uart:16550A port:FCF8 irq:9 baud:9600 tx:5 rx:0 RTS|DTR
There are two ports on that PCI card, ttyS4 and ttyS5. I have serial printer and serial mouse. Flags are dependant on the status of the port. Empty port: RTS | DTR. Printer plugged: RTS | CTS | DTR | DSR.
Mouse plugged: RTS | DTR | DSR. So I think that the port is ready for
communication. But I do not see anything coming from it :-(
So the question now is: what should I do next? Trying to play with setserial?
Signature · 4 lines
Pavel Janík
Avoid unnecessary branches.
-- The Elements of Programming Style (Kernighan & Plaugher) From: [email protected] (Pavel Janík)
Date: Mon, 25 Nov 2002 21:47:37 +0100
Quoted 1 line
I think that this will be additional thing to do. Right now, I have this:
I find more info about that card - it is MP9050 by
http://www.megapower-int.com.tw/.
Signature · 4 lines
Pavel Janík
Don't compare floating point numbers just for equality.
-- The Elements of Programming Style (Kernighan & Plaugher)Quoted 7 lines · Pavel Jan?k
From: [email protected] (Pavel Jan?k)
Date: Mon, 25 Nov 2002 21:47:37 +0100Quoted 1 line
I think that this will be additional thing to do. Right now, I have this:
I find more info about that card - it is MP9050 by
http://www.megapower-int.com.tw/.
Does it support baudrates more than 115200 per manufacturer description ?
Signature · 2 lines
Andrey Panin | Embedded systems software developer [email protected] | PGP key: wwwkeys.eu.pgp.net
From: Andrey Panin <[email protected]>
Date: Wed, 27 Nov 2002 15:06:47 +0300
Hi,
Quoted 4 lines
Quoted 2 lines
I find more info about that card - it is MP9050 by
http://www.megapower-int.com.tw/.Does it support baudrates more than 115200 per manufacturer description ?
they do not tell anything about their products :-(
Signature · 4 lines
Pavel Janík
Were you born rude, or did you have to practice it?
-- Richard Gooch in LKMLQuoted 11 lines · Pavel Jan?k
From: Andrey Panin <[email protected]>
Date: Wed, 27 Nov 2002 15:06:47 +0300Hi,
Quoted 4 lines
Quoted 2 lines
I find more info about that card - it is MP9050 by
http://www.megapower-int.com.tw/.Does it support baudrates more than 115200 per manufacturer description ?
they do not tell anything about their products :-(
Hmm, how do they sell them ? :))
BTW you can also report PCI ids of this card to the Linux PCI ID's Project at http://pciids.sf.net/
Signature · 2 lines
Andrey Panin | Embedded systems software developer [email protected] | PGP key: wwwkeys.eu.pgp.net
A message that is not in the archive (sent off-list or not yet received): [email protected]
From: Russell King <[email protected]>
Date: Sun, 1 Dec 2002 11:02:02 +0000
Hi Russell,
Quoted 9 lines
Looking at all information in this thread so far, I think that you want to use the existing
pbn_b2_bt_2_115200entry rather than creating an additional entry for a card:{ SPCI_FL_BASE2 | SPCI_FL_BASE_TABLE, 2, 115200 }, /* pbn_b2_bt_2_115200 */-> Two ports, one at BASE2 the other at BASE3 running at a max baud of
115200.
yes, this is it:
drivers/char/serial.c +4 -0
@@ -4672,6 +4678,10 @@PCI_SUBVENDOR_ID_KEYSPAN ,PCI_SUBDEVICE_ID_KEYSPAN_SX2 ,0 ,0 , pbn_panacom }, +// PJ: New entry + { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9050, +0xd841 ,0x0200 ,0 ,0 , + pbn_b2_bt_2_115200 }, { PCI_VENDOR_ID_PANACOM, PCI_DEVICE_ID_PANACOM_QUADMODEM,PCI_ANY_ID ,PCI_ANY_ID ,0 ,0 , pbn_panacom4 },
On the other hand, that card worked only with "IRQ" 0, ie. polling. We could not got it running with the IRQ the PCI bus told us (there was only one PCI card in the machine, no peripherals, no interrupt conflict...).
Quoted 3 lines
Your bios appears to have assigned the ports so that your patch will work, but only if your bios keeps the (base3 = base2 + 8) relationship (which isn't guaranteed.)
Yes, in the other machine, the difference was different.
Signature · 4 lines
Pavel Janík
Don't stop with your first draft.
-- The Elements of Programming Style (Kernighan & Plaugher)On Tue, Dec 10, 2002 at 08:07:46AM +0100, Pavel Jan?k wrote:
[snip]
Quoted 3 lines
On the other hand, that card worked only with "IRQ" 0, ie. polling. We could not got it running with the IRQ the PCI bus told us (there was only one PCI card in the machine, no peripherals, no interrupt conflict...).
Looks like this card needs special PLX related magic to work with interrupts. Can you try to set pci_plx9050_fn() as init function for this card ?
Signature · 2 lines
Andrey Panin | Embedded systems software developer [email protected] | PGP key: wwwkeys.eu.pgp.net
From: Andrey Panin <[email protected]>
Date: Tue, 10 Dec 2002 10:30:21 +0300
Hi,
Quoted 2 lines
Looks like this card needs special PLX related magic to work with interrupts. Can you try to set
pci_plx9050_fn()as init function for this card ?
of course - immediately after setserial autoconfig the system goes to Hollywood :-( I did not got the chance to debug it further, unfortunately.
Signature · 5 lines
Pavel Janík
Q: Why are we hiding from the police daddy?
A: Because we use vi son, they use emacs.
-- Thinkgeek.com T-Shirt