LinuxÒÁµéÔ°ÂÛ̳'s Archiver

lxdy ·¢±íÓÚ 2006-8-21 11:48

½ô¼±ÇóÖú£ººìÆì5.0ÏÂÔõÑù×°´®¿Ú¿¨Çý¶¯£¿

Çý¶¯¹âÅÌÀïµÄÓÐÕâÑùÈý¸öÎļþ£º
1£©Linux_note.pdf
ÎļþÄÚÈÝ£º22 April 2003  Dear Customer:
Please make sure you follow the installation instructions for both the serial and parallel
ports if the product you are trying to install has serial and parallel ports (products 9835,9735)  Regards,sales
2)Linux_P.txt
ÎļþÄÚÈÝ£ºInstallation Guide for PCI Parallel Ports

This installation guide describes the procedure to install the Nm9705CV, Nm9735CV, Nm9805CV, Nm9715CV, Nm9835CV, Nm9755CV PCI parallel ports in Linux platform.

Linux kernel provide a 'parport' code to support parallel port (/dev/lp0,  /dev/lp1, /dev/lp2). This code provides the ability to share one port between multiple devices. And it is loadable when kernel is running.

The 'parport' code is split into two parts : generic (which deals with port sharing) and architecture-dependent eg. X86, SPARC. (which deals with actually using the port). Thus, please take the following steps to install 'parport' module!

Check the on-board parallel port's hardware resources

Most likely each motherboard has a built-in parallel port. And its hardware resources are settable with BIOS utility.

Enter the command  more  /proc/pci

The response is similar to the following
      
             Bus 0, Device 11, function 0:
             Serial controller : Unknown vendor Unknown device (rev 01).
             Vendor id=9710, Device id=9705
                     Device id=9735
                     Device id=9805
                     Device id=9815
                     Device id=9835
                     Device id=9855

             Medium devsel. Fast back-to-back capable. IRQ 11
            
             Board with Nm9705CV part
             I/O at 0xc000 [0xc001]    printer port
                    0xc008 [0xc009]    ECP/EPP config registers

             Board with Nm9735CV part
             I/O at 0xc000 [0xc001]    not used
                    0xc008 [0xc009]    not used
                    0xc010 [0xc011]    printer port
                    0xc018 [0xc019]    ECP/EPP config registers
            
             Board with Nm9805CV part
             I/O at 0xc000 [0xc001]    printer port
             I/O at 0xc400 [0xc401]    ECP/EPP config registers
             I/O at 0xc800 [0xc801]    not used
             I/O at 0xd000 [0xd001]    not used
             I/O at 0xd400 [0xd401]    not used
             I/O at 0xd800 [0xd801]    not used

             Board with Nm9715CV part
             I/O at 0xc000 [0xc001]    printer port 1
             I/O at 0xc400 [0xc401]    ECP/EPP config registers 1
             I/O at 0xc800 [0xc801]    printer port 2
             I/O at 0xd000 [0xd001]    ECP/EPP config registers 2
             I/O at 0xd400 [0xd401]    not used
             I/O at 0xd800 [0xd801]    not used

             Board with Nm9835CV part
             I/O at 0xc000 [0xc001]    not used
             I/O at 0xc400 [0xc401]    not used
             I/O at 0xc800 [0xc801]    printer port
             I/O at 0xd000 [0xd001]    ECP/EPP config registers
             I/O at 0xd400 [0xd401]    not used
             I/O at 0xd800 [0xd801]    not used

             Board with Nm9755CV part
             I/O at 0xc000 [0xc001]    printer port 1
             I/O at 0xc400 [0xc401]    ECP/EPP config registers 1
             I/O at 0xc800 [0xc801]    printer port 2
             I/O at 0xd000 [0xd001]    ECP/EPP config registers 2
             I/O at 0xd400 [0xd401]    not used
             I/O at 0xd800 [0xd801]    not used




Install 'parport' module

To load the generic 'parport' code

Type             insmod parport.o
         
To load the architecture-dependent code to tell 'parport' code

             insmod parport_pc.o  io=0x378,0xc000,0xc800
             irq=7, irq=11, none
            
             or

             insmod parport_pc.o  io=0x378,0xc000,0xc800
             irq=7,11,none   
         
You have three PC-style ports, one at 0x378 with IRQ 7, one at
0xc000 with  IRQ11, one at 0xc800 with no IRQ.


Check the attached printer device [optional]

Once the architecture-dependent part of the paraport code is loaded into the kernel. You could enter the following command

              insmod parport_probe.o

To check any attached devices and log a message similar to

             parport0: Printer, epson


Then             /dev/lp0, /dev/lp1 and /dev/lp2 are ready for service

3£©Linux_S.txt
ÎļþÄÚÈÝ£ºThis installation guide describes the procedures to install NetMos Technology Nm9735CV, Nm9745CV, Nm9835CV, Nm9845CV PCI serial ports in Linux platform.

Linux Platform

l Operating System        : RedHat, SuSe
l Terminal Emulation AP        : minicom
l Internet Dialer        : Kppp


Find the available serial ports

Since Linux only support 4 serial ports (ttyS0, ttyS1, ttyS2, ttyS3) under the default condition. Most likely, ttyS0 & ttyS1 are supported by mother board's built-in serial controllers and ttyS2 & ttyS3 are free for additional I/O card.

Serial ports could be checked by the following commands.

setserial  /dev/ttyS0 -a         (COM-1)
setserial  /dev/ttyS1 -a         (COM-2)
setserial  /dev/ttyS2 -a         (COM-3)
setserial  /dev/ttyS3 -a         (COM-4)

If COM-1 is used by mouse, the response is similar to

/dev/ttyS0 : Device or resource busy   

If the COM-1 does not attach any device, the response is similar to

/dev/ttyS0, Line 0,     UART: 16550A, Port: 0x3f8, irq: 4
                      Baud_base: 115200, clos_delay: 50, divisor: 0
                      closing_wait: 3000, closing_wait2: infinite
                      Flags: spd_normal skip_test

In case ttyS2 (COM-3) is free, the response for command  setserial /dev/ttyS2 -a is shown below.

/dev/ttyS2, Line 2,     UART: unknown, Port: 0x3e8, irq: 4
                          Baud_base: 115200, clos_delay: 50, divisor: 0
                          closing_wait: 3000, closing_wait2: infinite
                          Flags: spd_normal skip_test

Find the PCI card resource ( I/O port address & IRQ) for the serial ports

Enter the command  more  /proc/pci

The response is similar to the following
      
             Bus 0, Device 11, function 0:
             Serial controller : Unknown vendor Unknown device (rev 01).
             Vendor id=9710, Device id=9735
                     Device id=9745
                     Device id=9820
                     Device id=9825
                     Device id=9835
                     Device id=9845

             Medium devsel. Fast back-to-back capable. IRQ 11

             Board with Nm9735CV part
             I/O at 0xc000 [0xc001]    serial port 1
                    0xc008 [0xc009]    serial port 2

             Board with Nm9745CV part
             I/O at 0xc000 [0xc001]    serial port 1
                    0xc008 [0xc009]    serial port 2
                    0xc010 [0xc011]    device 1
                    0xc018 [0xc019]    device 2
                    0xc020 [0xc021]    device 3
                    0xc028 [0xc029]    device 4

             Board with Nm9820CV part
             I/O at 0xc000 [0xc001]    serial port 1
             I/O at 0xc400 [0xc401]    not used
             I/O at 0xc800 [0xc801]    not used
             I/O at 0xd000 [0xd001]    not used
             I/O at 0xd400 [0xd401]    not used
             I/O at 0xd800 [0xd801]    not used

             Board with Nm9825CV part
             I/O at 0xc000 [0xc001]    serial port 1
                 
             Board with Nm9835CV part
             I/O at 0xc000 [0xc001]    serial port 1
             I/O at 0xc400 [0xc401]    serial port 2
             I/O at 0xc800 [0xc801]    not used
             I/O at 0xd000 [0xd001]    not used
             I/O at 0xd400 [0xd401]    not used
             I/O at 0xd800 [0xd801]    not used

             Board with Nm9845CV part
             I/O at 0xc000 [0xc001]    serial port 1
             I/O at 0xc400 [0xc401]    serial port 2
             I/O at 0xc800 [0xc801]    device 1
             I/O at 0xd000 [0xd001]    device 2
             I/O at 0xd400 [0xd401]    device 3
             I/O at 0xd800 [0xd801]    device 4

             Board with Nm9755CV part
             I/O at 0xc000 [0xc001]    not used
             I/O at 0xc400 [0xc401]    not used
             I/O at 0xc800 [0xc801]    device 1
             I/O at 0xd000 [0xd001]    device 2
             I/O at 0xd400 [0xd401]    device 3
             I/O at 0xd800 [0xd801]    device 4


From the  /proc/pci file, it is possible to find the PCI card's I/O port address and IRQ. Especially, the NetMos parts always shows

             Vendor id=9710, Device id=9735
                     Device id=9745
                     Device id=9820
                     Device id=9825
                     Device id=9835
                     Device id=9845
     
Configure the parameters for ttyS2 or ttyS3

Enter (if ttyS2 or ttyS3 are free)

            setserial  /dev/ttyS2 port 0xc000 UART 16550A
                        irq 11 Baud_base 115200

            setserial  /dev/ttyS3 port 0xc008 UART 16550A
                        irq 11 Baud_base 115200

Check the setting for ttyS2 or ttyS3

Type setserial  /dev/ttyS2 -a

                   /dev/ttyS2, Line 2, UART: 16550A, Port: 0xc000, irq: 11
                      Baud_base: 115200, clos_delay: 50, divisor: 0
                      closing_wait: 3000, closing_wait2: infinite
                      Flags: spd_normal skip_test


The ttyS2 or ttyS3 are ready for application


ÎÒ¸ÃÔõÑù°ÑÕâ¸ö´®¿Ú¿¨Çý¶¯ÆðÀ´£¿Õý³£¹¤×÷¡£ÎÒ»úÆ÷±¾ÉíÒѾ­ÓÐÒ»¸ö´®¿Ú¡£

lxdy ·¢±íÓÚ 2006-8-21 11:52

ÎҵĵçÄÔ¶Ë¿ÚÐÅÏ¢£º
[root@localhost ~]# setserial /dev/ttyS0 -a
/dev/ttyS0, Line 0, UART: 16550A, Port: 0x03f8, IRQ: 4
        Baud_base: 115200, close_delay: 500, divisor: 0
        closing_wait: 30000
        Flags: spd_normal skip_test auto_irq

[root@localhost ~]# setserial /dev/ttyS1 -a
/dev/ttyS1, Line 1, UART: unknown, Port: 0x02f8, IRQ: 3
        Baud_base: 115200, close_delay: 500, divisor: 0
        closing_wait: 30000
        Flags: spd_normal skip_test auto_irq

[root@localhost ~]# setserial /dev/ttyS2 -a
/dev/ttyS2, Line 2, UART: unknown, Port: 0x03e8, IRQ: 4
        Baud_base: 115200, close_delay: 500, divisor: 0
        closing_wait: 30000
        Flags: spd_normal skip_test auto_irq

lxdy ·¢±íÓÚ 2006-8-21 11:54

Ö÷°åPCIÐÅÏ¢£º
[root@localhost ~]# more /proc/pci
PCI devices found:
  Bus  0, device   0, function  0:
    Class 0600: PCI device 1106:3148 (rev 0).
      Master Capable.  Latency=8.
      Prefetchable 32 bit memory at 0xe0000000 [0xe3ffffff].
  Bus  0, device   1, function  0:
    Class 0604: PCI device 1106:b091 (rev 0).
      Master Capable.  No bursts.  Min Gnt=12.
  Bus  0, device   9, function  0:
    Class 0400: PCI device 109e:036e (rev 17).
      IRQ 17.
      Master Capable.  Latency=64.  Min Gnt=16.Max Lat=40.
      Prefetchable 32 bit memory at 0xdfffe000 [0xdfffefff].
  Bus  0, device   9, function  1:
    Class 0480: PCI device 109e:0878 (rev 17).
      IRQ 17.
      Master Capable.  Latency=64.  Min Gnt=4.Max Lat=255.
      Prefetchable 32 bit memory at 0xdffff000 [0xdfffffff].
  Bus  0, device  10, function  0:
    Class 0780: PCI device 9710:9845 (rev 1).
      IRQ 18.
      Master Capable.  Latency=64.
--More--(0%)

lxdy ·¢±íÓÚ 2006-8-21 11:57

²ì¿´/proc/pciÎļþÏÔʾ£º
PCI devices found:
  Bus  0, device   0, function  0:
    Class 0600: PCI device 1106:3148 (rev 0).
      Master Capable.  Latency=8.  
      Prefetchable 32 bit memory at 0xe0000000 [0xe3ffffff].
  Bus  0, device   1, function  0:
    Class 0604: PCI device 1106:b091 (rev 0).
      Master Capable.  No bursts.  Min Gnt=12.
  Bus  0, device   9, function  0:
    Class 0400: PCI device 109e:036e (rev 17).
      IRQ 17.
      Master Capable.  Latency=64.  Min Gnt=16.Max Lat=40.
      Prefetchable 32 bit memory at 0xdfffe000 [0xdfffefff].
  Bus  0, device   9, function  1:
    Class 0480: PCI device 109e:0878 (rev 17).
      IRQ 17.
      Master Capable.  Latency=64.  Min Gnt=4.Max Lat=255.
      Prefetchable 32 bit memory at 0xdffff000 [0xdfffffff].
  Bus  0, device  10, function  0:
    Class 0780: PCI device 9710:9845 (rev 1).
      IRQ 18.
      Master Capable.  Latency=64.  
      I/O at 0xef00 [0xef07].
      I/O at 0xee80 [0xee87].
      I/O at 0xee00 [0xee07].
      I/O at 0xed80 [0xed87].
      I/O at 0xed00 [0xed07].
      I/O at 0xec80 [0xec8f].
  Bus  0, device  16, function  2:
    Class 0c03: PCI device 1106:3038 (rev 128).
      IRQ 21.
      Master Capable.  Latency=64.  
      I/O at 0xec00 [0xec1f].
  Bus  0, device  16, function  1:
    Class 0c03: PCI device 1106:3038 (rev 128).
      IRQ 21.
      Master Capable.  Latency=64.  
      I/O at 0xe080 [0xe09f].
  Bus  0, device  16, function  0:
    Class 0c03: PCI device 1106:3038 (rev 128).
      IRQ 21.
      Master Capable.  Latency=64.  
      I/O at 0xe000 [0xe01f].
  Bus  0, device  16, function  3:
    Class 0c03: PCI device 1106:3104 (rev 130).
      IRQ 21.
      Master Capable.  Latency=64.  
      Non-prefetchable 32 bit memory at 0xffaff800 [0xffaff8ff].
  Bus  0, device  17, function  0:
    Class 0601: PCI device 1106:3177 (rev 0).
  Bus  0, device  17, function  1:
    Class 0101: PCI device 1106:0571 (rev 6).
      IRQ 255.
      Master Capable.  Latency=32.  
      I/O at 0xfc00 [0xfc0f].
  Bus  0, device  17, function  5:
    Class 0401: PCI device 1106:3059 (rev 80).
      IRQ 22.
      I/O at 0xe400 [0xe4ff].
  Bus  0, device  18, function  0:
    Class 0200: PCI device 1106:3065 (rev 116).
      IRQ 23.
      Master Capable.  Latency=64.  Min Gnt=3.Max Lat=8.
      I/O at 0xe800 [0xe8ff].
      Non-prefetchable 32 bit memory at 0xffaffc00 [0xffaffcff].
  Bus  1, device   0, function  0:
    Class 0300: PCI device 5333:8d04 (rev 0).
      IRQ 16.
      Master Capable.  Latency=64.  Min Gnt=4.Max Lat=255.
      Non-prefetchable 32 bit memory at 0xff980000 [0xff9fffff].
      Prefetchable 32 bit memory at 0xd0000000 [0xd7ffffff].

lxdy ·¢±íÓÚ 2006-8-21 12:00

Íü¼Ç˵ÎÒµÄpci´®¿Ú¿¨Ð¾Æ¬Ðͺţºmsc9845cv  £¬4´®¿Ú¿¨

lxdy ·¢±íÓÚ 2006-8-21 12:03

×ÀÃæÏÔʾΪһ°ãÉ豸£¬²¢´ø£¿ºÅ

lxdy ·¢±íÓÚ 2006-8-21 17:14

ÎÒ²»Çå³þÎÒµÄÖ÷°æÄĸöÊÇ´®¿Ú¿¨ ×ÊÔ´£¿ÎҵĵçÄÔ¾ßÌåÓ¦¸ÃÈçºÎÅäÖã¿

lxdy ·¢±íÓÚ 2006-8-21 17:20

ÕÒ³öPCI¿¨×ÊÔ´£¬ÕâÀïÊÇÖжÏ11£¬¶Ë¿Ú0xc000
ÅäÖô®¿Ú
setserial /dev/ttyS2 port 0xc000 UART 16550A
irq 11 Baud_base 115200

setserial /dev/ttyS3 port 0xc008 UART 16550A
irq 11 Baud_base 115200

ÕâÀï˵µÄÅäÖô®¿Ú£¬ÔÚʲôµØ·½ÅäÖã¿£¿£¿ ¾ßÌåÄĸöÎļþ£¿£¿£¿

lxdy ·¢±íÓÚ 2006-8-22 09:58

¸÷λÀÏ´óÃDz»ÒªÕâÑùÀäÄ®°¡£¡£¡£¡£¡£¡£¡£¡£¡£¡£¡£¡£¡£¡£¡£¡£¡£¡£¡£¡£¡£¡

lxdy ·¢±íÓÚ 2006-8-22 09:59

ÒªÓеãÖúÈËΪÀֵľ«Éñ°¡£¡£¡£¡£¡»òÕßÎÒÄÄÀï×ö´íÁË£¬ÄãÃÇ¿ÉÒÔÖ¸³öÀ´°¢£¿£¿£¿£¿

QQ°Ö°Ö ·¢±íÓÚ 2006-9-1 12:33

ͬÎÊ, ÎÒÒ²Óöµ½ÀàËÆÎÊÌâ.  Ô­À´µçÄÔÖ÷°åÓÐÁ½¸öCOM¿Ú, ÄÜÈϳöÀ´,µ«ÁíÍâ¼ÓµÄPCIת´®¿ÚµÄ¾Íû·¨Ê¹ÓÃÁË.

Ò³: [1]

Powered by Discuz! Archiver 6.1.0  © 2001-2007 Comsenz Inc.