==========================================================================================
=                                                                                        =
=                   Golden Series Board Driver Installation Guide                        =
=                                                                                        =
=                                 For Kernel 2.4 & 2.6                                   =
=                                                                                        =
=                                                               Version: 1.0.9.0         =
=                                                               Date: 2008/05/12         =
==========================================================================================

Item

A. Release note

B. Introduction

C. Distributions test

D. Installation
   D.1 Driver install
   D.2 Device node creation
	
E. Loading driver automatic after system bootup
   
   E.1 
       RedHat 8
       Fedora Core 1
       Fedora Core 8
       Mandriva 2008
       		
   E.2 
       Suse 9.3

   E.3 
       Ubutu 8.04 Destop
	
   E.4 
       Turbo Liunx 10
       Red Hat Enterprise Liunx 4.0 	
       
   E.5 
       Others	

F. Utility
   F.1  snxdump
   F.2	snxterm

==========================================================================================

A. Release note

	Support kernel 2.4 and 2.6 on x86 machine only. Distributions test refer to item C. 
	Before driver installation. Make sure system with c compiler and kernel development 
	package.
	
	2006/07/10 - Ver:1.02
		1) Add snxterm program into driver package
		2) Fix read fcr register in driver and backup a fcr register value in struct
		3) Test RedHat Enterprise Linux AS 4.0 and ES 4.0
		
	2006/10/02 - Ver:1.03
		1) Add GNU information in driver
		2) Test SlackWare 10.2 (kernel 2.6.13)
		3) Support 4027D, 4037D and 4056D

	2006/10/12 - Ver:1.04
		1) Fix system hanged. Modem interrupt can't be cleared by reading iir and msr
		   register for SUN1699 chip

	2006/12/01 - Ver:1.05
		1) Fix system hanged. Data coming but device node didn't opened, when open, system 
		   maybe crash
		2) Add version information in /var/log/messages
		3) Test TurboLinux 10
	
	2007/03/31 - Ver:1.06
		1) Fix data receiving function
		2) Modify ioctl function for dump port informations

	2007/08/08 - Ver:1.07
		1) Support kernel up to 2.6.22
		2) Add driver version information in snxdump
		3) snxterm update to V1.01, make snxterm simply

	2007/09/14 - Ver:1.08
		1) Support kernel 2.6 and 2.4 both
		2) snxterm update to V1.02
		
	2008/05/12 - Ver:1.0.9.0
		1) Fix setserial command fail
		2) Support Golden series multi I/O board

------------------------------------------------------------------------------------------

B. Introduction

	Maximum 4 boards can be installed in combination(up to 32 serial port and 2 parallel port), 
	support golden series boards as list below.

	(S - serial port, P - parallel port)


	1S -
		4027T
		4027A
		4027AL
		4027D
		4027DL
		4027P

	2S -
		4037T
		4037A
		4037AL
		4037D
		4037U
		4037P
		4037PL	
		
	4S -
		4056A
		4056A3
		4056A4
		4056AL
		4056D
		4056J
		4056U
		4056UE
		4056P
		4056PL
		4056PM		
		4055WN
		
		4056DW
		4056AM
		4056LM
		4056LL
		4056JM
		4056LV
		4000A
		4000AL
		4000P
		4000PL	

	8S -
		4066R
		4066U
		4066UE

		4066WM
		4066RM
		4066JM
		8000A
		8000AL		
		
	2S1P -
		4079AT		
				
				
	2S2P -
		4089AM
		
		
	4S2P - 
		4096A
		

------------------------------------------------------------------------------------------

C. Distributions test

       Driver tested with distributions as list.

       RedHat 8
       Fedora Core 1	
       Fedora Core 8
       Mandriva 2008
       Turbo Liunx 10
       Red Hat Enterprise Liunx 4.0 
       Suse 9.3
       Ubutu 8.04 Destop

------------------------------------------------------------------------------------------

D. Installation
	
	D.1 Driver install
		Please create a directory under root directory,  e.g /temp, do commands:

		# cd /
		# mkdir temp

		After get driver file "golden_Vx.x.x.x.tar.gz". Copy file to /temp
		directory, then extract and install, do commands:

		# cp golden_Vx.x.x.x.tar.gz /temp 
		# cd /temp
		# tar xvfz golden_Vx.x.x.x.tar.gz
		# cd /temp/golden
		# make clean ; make install

		*************************************************************
		* If system is Suse 9.0 and errors occur when               *
		* "make clean ; make install", do commands:                 *
		*                                                           *
		* # cd /usr/src/linux/                                      *
		* # make cloneconfig                                        *
		* # make dep                                                * 
		*                                                           *
		* then do "make clean ; make install" again in /temp/golden *
		*************************************************************

		Load driver module, do command:

		# modprobe snx_golden
		or
		# insmod /temp/golden/driver/snx_golden.ko (snx_golden.o for kernel 2.4)


		Check driver module, do command:
		# lsmod | grep snx_golden


		Unload driver, do command:
		# rmmod snx_golden


	D.2 Device node creation 
		Each serial port has one device node which is named "ttySNX?",
		maximum up to 32 serial ports.
		
		Each parallel port has two device node which is name "lp?" and
		"parport?". This step will backup lp2~lp3 and parport2~parport3 
		to lp?.bak and parport?.bak in /dev for your system first. Then,
		create lp2~lp3 and parport2~parport3 in /dev for Golden driver,
		maximum up tp 2 parallel ports.
		
		This setp will be done when do "make clean ; make install", if
		device nodes aren't in /dev, do commands:
				
		# cd /temp/golden/snxmknod
		# ./snxmknod

		This will create device nodes in /dev.

		If there are more than two boards installed, serial port device
		nameing convention as list below.

		Board Number    Device Name
		1st board       ttySNX0  ~ ttySNX7
		2nd board       ttySNX8  ~ ttySNX15
		3rd board       ttySNX16 ~ ttySNX23
		4th board       ttySNX24 ~ ttySNX31
		

------------------------------------------------------------------------------------------

E. Loading driver automatic after system bootup

  	
	E.1 
	    After finish item D. Edit /etc/rc.d/rc.local for loading driver 
	    automatic after system bootup. Use vi or other editor to open rc.local, 
	    and add "modprobe snx_golden" in last line.


	E.2 
	    After finish item D.
	    Edit /etc/rc.d/boot.local for loading driver automatic after system bootup. 
	    Use vi or other	editor to open boot.local, and add "modprobe snx_golden" in last line.
	    Edit /etc/rc.d/halt.lAfter finish item D. Edit /etc/rc.d/rc.local for loading driver 
	    automatic after system bootup. Use vi or other editor to open rc.local, 
	    and add "modprobe snx_golden" in last line.ocal for unloading driver when system halt. 
	    Use vi or other editor to open halt.local, and add "rmmod snx_golden" in last line.
	    
	    
	E.3 
	    After finish item D. Edit /etc/init.d/rc.local for loading driver 
	    automatic after system bootup. Use vi or other editor to open rc.local, 
	    and add words as below in last line.

		mv /dev/lp2 /dev/lp2.bak
		mv /dev/lp3 /dev/lp3.bak
		mknod /dev/lp2 c 246 2
		mknod /dev/lp3 c 246 3
		chmod a+w /dev/lp2
		chmod a+w /dev/lp3
	
		mv /dev/parport2 /dev/parport2.bak
		mv /dev/parport3 /dev/parport3.bak
		mknod /dev/parport2 c 247 2
		mknod /dev/parport3 c 247 3
		chmod a+w /dev/parport2
		chmod a+w /dev/parport3
				
		modprobe snx_golden

		
	E.4 
	    After finish item D. Edit /etc/rc.d/rc.local for loading driver 
	    automatic after system bootup. Use vi or other editor to open rc.local, 
	    and add words as below in last lien. 

			
		mv /dev/lp2 /dev/lp2.bak
		mv /dev/lp3 /dev/lp3.bak
		mknod /dev/lp2 c 246 2
		mknod /dev/lp3 c 246 3
			
		mv /dev/parport2 /dev/parport2.bak
		mv /dev/parport3 /dev/parport3.bak
		mknod /dev/parport2 c 247 2
		mknod /dev/parport3 c 247 3
		
		modprobe snx_golden
		
		
	E.5 
	    In general, other distributions will loading driver automatic after system bootup.		
	    If it doesn't, please refer to item E.1 or E.2. or E.3 or E.4
						
------------------------------------------------------------------------------------------

F. Utility

	F1. snxdump - dump port informations, do command:

		# snxdump

		the informations should be like this

		================ Found  4 GOLDEN port, list informations ====================
        		                                     GOLDEN driver ver -- 1.0.9.0

		ttySNX0 --
		GOLDEN 4089 Series (bus:2 device: 2) , base address = a000,    irq = 16

		ttySNX1 --
		GOLDEN 4089 Series (bus:2 device: 2) , base address = a008,    irq = 16

		lp2, parport2 --
		GOLDEN 4089 Series (bus:2 device: 2) , base addr = a400, extd addr = a800

		lp3, parport3 --
		GOLDEN 4089 Series (bus:2 device: 2) , base addr = ac00, extd addr = b000

		=============================================================================



		In this case, 

		Driver version is 1.0.9.0

		ttySNX0 is the 1st serial port on golden 4089 series board, 
		base address is 0xa000 and irq is 16.

		ttySNX1 is the 2nd serial port on golden 4089 series board, 
		base address is 0xa008 and irq is 16.

		lp2, parport2 is the 1st parallel port on golden 4089 series board, 
		base address is 0xa400 and extended address is 0xa800.  

		lp3, parport3 is the 2nd parallel port on golden 4089 series board, 
		base address is 0xac00 and extended address is 0xb000.

		bus:2 means the bus number of board is 2.
		device:2 means the device number of board is 2.


		If no information print on screen. Make sure the device node
		exist in /dev and driver module loaded.


		
		
	F2. snxterm - dumb terminal for test tty device node data transmitting and receiving
		      , do command:

		# snxterm

------------------------------------------------------------------------------------------

