Advertisement
Guest User

Untitled

a guest
Nov 27th, 2016
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.97 KB | None | 0 0
  1. ==========================================================================================
  2. = =
  3. = WCH Multi-I/O Board Driver Installation Guide =
  4. = =
  5. = For Kernel 2.4 & 2.6 & 3.0 =
  6. = Copyright 2012 WCH GROUP all right reserved =
  7. = Version: 2.0.0.1 =
  8. = Date: 2012/12/28 =
  9. ==========================================================================================
  10.  
  11. Item
  12.  
  13. A. Release note
  14.  
  15. B. Introduction
  16.  
  17. C. Distributions test
  18.  
  19. D. Installation
  20.  
  21. D.1 Driver install
  22. D.2 Device node creation
  23.  
  24. E. Loading driver automatic after system bootup
  25.  
  26. E.1
  27. RedHat 8
  28. Fedora Core 1
  29. Fedora Core 8
  30. Fedora Core 10
  31. Fedora Core 11
  32. Mandriva 2008
  33.  
  34. E.2
  35. Suse 9.3
  36. SuSE 11.2 Milestone 4
  37.  
  38. E.3
  39. Ubutu 8.04 Destop
  40.  
  41. E.4
  42. Turbo Liunx 10
  43. Red Hat Enterprise Liunx 4.0
  44.  
  45. E.5
  46. Others
  47.  
  48. F. Utility
  49.  
  50. F.1 wchdump
  51. F.2 wchterm
  52.  
  53. ==========================================================================================
  54.  
  55. A. Release note
  56.  
  57. Support kernel 2.4, 2.6 and 3.0 on x86 machine only. Distributions test refer to item C.
  58. Before driver installation. Make sure system with c compiler and kernel development
  59. package.
  60.  
  61. ------------------------------------------------------------------------------------------
  62.  
  63. B. Introduction
  64.  
  65. Maximum 2 boards can be installed in combination(up to 64 serial port),
  66. support wch multi i/o boards as list below.
  67.  
  68. (S - serial port)
  69.  
  70.  
  71. ------------------------------------------------------------------------------------------
  72.  
  73. C. Distributions test
  74.  
  75. Driver tested with distributions as list.
  76.  
  77. RedHat 8
  78. Fedora Core 1
  79. Fedora Core 8
  80. Fedora Core 10
  81. Fedora Core 11
  82. Mandriva 2008
  83. Turbo Liunx 10
  84. Red Hat Enterprise Liunx 4.0
  85. Suse 9.3
  86. SuSE 11.2 Milestone 4
  87. Ubutu 8.04 Destop
  88.  
  89. ------------------------------------------------------------------------------------------
  90.  
  91. D. Installation
  92.  
  93. D.1 Driver install
  94. Please create a directory under root directory, e.g /temp, do commands:
  95.  
  96. # cd /
  97. # mkdir temp
  98.  
  99. After get driver file "wch_vx.x.x.x.tar.gz". Copy file to /temp
  100. directory, then extract and install, do commands:
  101.  
  102. # cp wch_vx.x.x.x.tar.gz /temp
  103. # cd /temp
  104. # tar xvfz wch_vx.x.x.x.tar.gz
  105. # cd /temp/wch
  106. # make clean ; make install
  107.  
  108. *************************************************************
  109. * If system is Suse 9.0 and errors occur when *
  110. * "make clean ; make install", do commands: *
  111. * *
  112. * # cd /usr/src/linux/ *
  113. * # make cloneconfig *
  114. * # make dep *
  115. * *
  116. * then do "make clean ; make install" again in /temp/wch *
  117. *************************************************************
  118.  
  119. Load driver module, do command:
  120.  
  121. # modprobe wch
  122. or
  123. # insmod /temp/wch/driver/wch.ko (wch.o for kernel 2.4)
  124.  
  125.  
  126. Check driver module, do command:
  127. # lsmod | grep wch
  128.  
  129.  
  130. Unload driver, do command:
  131. # rmmod wch
  132.  
  133.  
  134. D.2 Device node creation
  135. Each serial port has one device node which is named "ttyWCH?",
  136. maximum up to 256 serial ports.
  137.  
  138. This setp will be done when do "make clean ; make install", if
  139. device nodes aren't in /dev, do commands:
  140.  
  141. # cd /temp/wch/wchmknod
  142. # ./wchmknod
  143.  
  144. This will create device nodes in /dev.
  145.  
  146. ------------------------------------------------------------------------------------------
  147.  
  148. E. Loading driver automatic after system bootup
  149.  
  150.  
  151. E.1
  152. After finish item D. Edit /etc/rc.d/rc.local for loading driver
  153. automatic after system bootup. Use vi or other editor to open rc.local,
  154. and add "modprobe wch" in last line.
  155.  
  156.  
  157. E.2
  158. After finish item D.
  159. Edit /etc/rc.d/boot.local for loading driver automatic after system bootup.
  160. Use vi or other editor to open boot.local, and add "modprobe wch" in last line.
  161. Edit /etc/rc.d/halt.lAfter finish item D. Edit /etc/rc.d/rc.local for loading driver
  162. automatic after system bootup. Use vi or other editor to open rc.local,
  163. and add "modprobe wch" in last line.ocal for unloading driver when system halt.
  164. Use vi or other editor to open halt.local, and add "rmmod wch" in last line.
  165.  
  166.  
  167. E.3
  168. After finish item D. Edit /etc/init.d/rc.local for loading driver
  169. automatic after system bootup. Use vi or other editor to open rc.local,
  170. and add words as below in last line.
  171.  
  172. modprobe wch
  173.  
  174. E.4
  175. After finish item D. Edit /etc/rc.d/rc.local for loading driver
  176. automatic after system bootup. Use vi or other editor to open rc.local,
  177. and add words as below in last lien.
  178.  
  179. modprobe wch
  180.  
  181.  
  182. E.5
  183. In general, other distributions will loading driver automatic after system bootup.
  184. If it doesn't, please refer to item E.1 or E.2. or E.3 or E.4
  185.  
  186.  
  187. ------------------------------------------------------------------------------------------
  188.  
  189. F. Utility
  190.  
  191. F1. wchdump - dump port informations, do command:
  192.  
  193. # wchdump
  194.  
  195. the informations should be like this
  196.  
  197. ================ Found 8 WCH port , list informations ====================
  198. WCH driver ver -- 2.0.0.0
  199.  
  200. ttyWCH0 --
  201. WCH CH358_8S Series (bus:1 device: 9) , base address = 9000, irq = 169
  202.  
  203. ttyWCH1 --
  204. WCH CH358_8S Series (bus:1 device: 9) , base address = 9400, irq = 169
  205.  
  206. ttyWCH2 --
  207. WCH CH358_8S Series (bus:1 device: 9) , base address = 9800, irq = 169
  208.  
  209. ttyWCH3 --
  210. WCH CH358_8S Series (bus:1 device: 9) , base address = 9c00, irq = 169
  211.  
  212. ttyWCH4 --
  213. WCH CH358_8S Series (bus:1 device: 9) , base address = 9008, irq = 169
  214.  
  215. ttyWCH5 --
  216. WCH CH358_8S Series (bus:1 device: 9) , base address = 9408, irq = 169
  217.  
  218. ttyWCH6 --
  219. WCH CH358_8S Series (bus:1 device: 9) , base address = 9808, irq = 169
  220.  
  221. ttyWCH7 --
  222. WCH CH358_8S Series (bus:1 device: 9) , base address = 9c08, irq = 169
  223. =============================================================================
  224.  
  225. In this case,
  226.  
  227. Driver version is 2.0.0.0
  228.  
  229. ttyWCH0 is the 1st serial port on wch CH358_8S series board,
  230. base address is 0x9000 and irq is 169.
  231.  
  232. ttyWCH1 is the 2nd serial port on wch CH358_8S series board,
  233. base address is 0x9400 and irq is 169.
  234.  
  235. ttyWCH2 is the 3rd serial port on wch CH358_8S series board,
  236. base address is 0x9800 and irq is 169.
  237.  
  238. ttyWCH3 is the 4th serial port on wch CH358_8S series board,
  239. base address is 0x9C00 and irq is 169.
  240.  
  241. ttyWCH4 is the 5th serial port on wch CH358_8S series board,
  242. base address is 0x9008 and irq is 169.
  243.  
  244. ttyWCH5 is the 6th serial port on wch CH358_8S series board,
  245. base address is 0x9408 and irq is 169.
  246.  
  247. ttyWCH6 is the 7th serial port on wch CH358_8S series board,
  248. base address is 0x9808 and irq is 169.
  249.  
  250. ttyWCH7 is the 8th serial port on wch CH358_8S series board,
  251. base address is 0x9C08 and irq is 169.
  252.  
  253. bus:1 means the bus number of board is 1.
  254. device:9 means the device number of board is 9.
  255.  
  256. If no information print on screen. Make sure the device node
  257. exist in /dev and driver module loaded.
  258.  
  259.  
  260.  
  261. F2. wchterm - dumb terminal for test tty device node data transmitting and receiving, do command:
  262.  
  263. # wchterm
  264.  
  265. ------------------------------------------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement