1 |
1275 |
phoenix |
README for embedded host controller SL811 (i386)
|
2 |
|
|
================================================
|
3 |
|
|
|
4 |
|
|
Original drivers from Pei Liu for ARM architecture only.
|
5 |
|
|
Documentaion and readme for Architecture x86 (ADNP/1486) premealy.
|
6 |
|
|
|
7 |
|
|
|
8 |
|
|
Kernel configuration:
|
9 |
|
|
---------------------
|
10 |
|
|
o Patch USB drivers into your kerneltree
|
11 |
|
|
cd Your_kernel_root
|
12 |
|
|
|
13 |
|
|
gunzip linux-2.4.20-usb-1.patch.gz
|
14 |
|
|
patch -p1 -T < linux-2.4.20-usb*.patch
|
15 |
|
|
OR
|
16 |
|
|
gunzip -dc linux-2.4.20-usb*.patch.gz | patch -p1 -T
|
17 |
|
|
|
18 |
|
|
o Load default configuration for CP486SX/2 with ADNP/1486 and USB
|
19 |
|
|
arch/i386/adnp1486-usb104-SSV20030516
|
20 |
|
|
|
21 |
|
|
o Run "make configure" and set / verify this entries
|
22 |
|
|
Code maturity level options --->
|
23 |
|
|
[*] Prompt for development and/or incomplete code/drivers
|
24 |
|
|
General setup --->
|
25 |
|
|
[*] PCI support
|
26 |
|
|
(BIOS) PCI access mode
|
27 |
|
|
[ ] PCI device name database
|
28 |
|
|
SCSI support --->
|
29 |
|
|
SCSI support
|
30 |
|
|
SCSI disk support
|
31 |
|
|
(8) Maximum number of SCSI disks that can be loaded as modules
|
32 |
|
|
... Disable all other options ...
|
33 |
|
|
SCSI low-level drivers --->
|
34 |
|
|
... Disable all low level drivers ...
|
35 |
|
|
Input core support --->
|
36 |
|
|
Input core support (Need only for Keyboard or Mouse)
|
37 |
|
|
Keyboard support
|
38 |
|
|
Mouse support
|
39 |
|
|
Character devices --->
|
40 |
|
|
[*] Virtual terminal (Need only for Keyboard)
|
41 |
|
|
Console drivers --->
|
42 |
|
|
[*] VGA text console (Need only for Key/Mouse)
|
43 |
|
|
Frame-buffer support ---> (... or use FB)
|
44 |
|
|
USB support --->
|
45 |
|
|
Support for USB
|
46 |
|
|
[ ] USB verbose debug messages (Optional)
|
47 |
|
|
[*] Preliminary USB device filesystem (Optional for debugging)
|
48 |
|
|
--- USB Host Controller Drivers
|
49 |
|
|
SL811HS Alternate (support isochronous mode)
|
50 |
|
|
...
|
51 |
|
|
SL811HS (x86, StrongARM) support (old driver)
|
52 |
|
|
Disable all others "USB Host Controller Drivers"
|
53 |
|
|
--- USB Device Class drivers
|
54 |
|
|
USB Mass Storage support
|
55 |
|
|
... and some aditional devices ...
|
56 |
|
|
USB Printer support
|
57 |
|
|
USB HIDBP Keyboard (basic) support
|
58 |
|
|
USB HIDBP Mouse (basic) support
|
59 |
|
|
USB Serial Converter support --->
|
60 |
|
|
USB Serial Converter support
|
61 |
|
|
USB FTDI Single Port Serial Driver
|
62 |
|
|
o We have no PCI- and no SCSI-System, but all USB-drivers need CONFIG_PCI=y.
|
63 |
|
|
USB-Floppy driver need the SCSI-Subsystem, so we must enable this global
|
64 |
|
|
and disable all low level drivers in this menu.
|
65 |
|
|
--- OR ---
|
66 |
|
|
Download origanal kerneltree, and patch comlplete ADNP
|
67 |
|
|
with USB support and load configuration for this:
|
68 |
|
|
bunzip2 -c linux-2.4.20.tar.bz2 | tar xvf -
|
69 |
|
|
gunzip -c linux-2.4.20-SSV20030516.diff.gz | patch -p1 -T
|
70 |
|
|
Configuration: arch/i386/adnp1486-usb104-SSV20030516
|
71 |
|
|
|
72 |
|
|
o Compile the kernel
|
73 |
|
|
make dep
|
74 |
|
|
make ROOT_DEV=/dev/ram0 zImage
|
75 |
|
|
make modules
|
76 |
|
|
export INSTALL_MOD_PATH="`pwd`/_install" ; make modules_install
|
77 |
|
|
|
78 |
|
|
|
79 |
|
|
Default device configuration hc_sl811.o for USB1/104:
|
80 |
|
|
-----------------------------------------------------
|
81 |
|
|
io = 0x220
|
82 |
|
|
irq = 12
|
83 |
|
|
Remember: Second Controller was handled internal with IO offset +2.
|
84 |
|
|
|
85 |
|
|
|
86 |
|
|
Installation hc_sl811.o for CF1/USB:
|
87 |
|
|
------------------------------------
|
88 |
|
|
Compact Flash to USB adapter in io address of ide driver. It is for embedded
|
89 |
|
|
deviced only.
|
90 |
|
|
Please disable IDE driver in kernel configuration or do not load IDE drivers!
|
91 |
|
|
Change MAX_CONTROLERS = 1 into source asm/sl811-hw.h, recompile driver!
|
92 |
|
|
First Controller only
|
93 |
|
|
insmod hc_sl811.o io=0x1F0 irq=14
|
94 |
|
|
Second Controller only
|
95 |
|
|
insmod hc_sl811.o io=0x3F6 irq=14
|
96 |
|
|
|
97 |
|
|
Driver hc_sl811.o can not handle both controllers at same time.
|
98 |
|
|
This driver need a address-offset of 2 between controllers.
|
99 |
|
|
Please use alternate driver sl811.o instand.
|
100 |
|
|
|
101 |
|
|
|
102 |
|
|
Installation Alternate driver sl811.o:
|
103 |
|
|
--------------------------------------
|
104 |
|
|
This driver have a better interrupt handler, but don't tested with all devices.
|
105 |
|
|
|
106 |
|
|
Install both controllers on USB1-104 (default):
|
107 |
|
|
insmod sl811.o io=0x220,0x222 irq=12,12
|
108 |
|
|
|
109 |
|
|
Install both controllers on CF/USB1:
|
110 |
|
|
insmod sl811.o io=0x1f0,0x3f6 irq=14,14
|
111 |
|
|
|
112 |
|
|
Second controller can disable with specific IOBASE=0 for this controller.
|
113 |
|
|
|
114 |
|
|
|
115 |
|
|
General about USB:
|
116 |
|
|
------------------
|
117 |
|
|
Please install first the driver for hardware,
|
118 |
|
|
and than plugin the hardware into first USB port.
|
119 |
|
|
|
120 |
|
|
If your hardware find no driver the usbcore give ub a massage for missing
|
121 |
|
|
driver on conole or in file /proc/kmsg such as:
|
122 |
|
|
new USB device -1.9, assigned address 7
|
123 |
|
|
USB device 7 (vend/prod 0x403/0x8372) is not claimed by any active drive
|
124 |
|
|
In this case remove the hardware from USB port, install the driver and
|
125 |
|
|
than plugin hardware again.
|
126 |
|
|
A list of driver for this missing hardware can found in file
|
127 |
|
|
/_install/lib/modules/2.4.20/modules.usbmap
|
128 |
|
|
Search the number 8372 in this file an verify the vendor ID. So you will
|
129 |
|
|
find the driver name "ftdi_sio" in this file.
|
130 |
|
|
If your hardware not listen in this file. Look into source and search your
|
131 |
|
|
numbers in source.
|
132 |
|
|
More read file:/Documentation/usb/proc_usb_info.txt
|
133 |
|
|
|
134 |
|
|
Drivers are all under contructions. So some drivers make a kernel panic. In
|
135 |
|
|
this case read all about the drivers dokumentaiona and the drivers source.
|
136 |
|
|
Some drivers need a other kernel driver, but not strictly checked in kenel
|
137 |
|
|
configuration. Here can help the ksymsoops.
|
138 |
|
|
|
139 |
|
|
|
140 |
|
|
|
141 |
|
|
Install a Floppy (NEC UF0001) or USB Stick Fujitsu/Siemens/iomega:
|
142 |
|
|
------------------------------
|
143 |
|
|
Copy files to target (FTP) and load all drivers.
|
144 |
|
|
Load Generic USB-Handler
|
145 |
|
|
insmod usbcore.o
|
146 |
|
|
Load USB-Host controller, parameters are optional (default urb_debug=0 io=220 irq=12)
|
147 |
|
|
insmod hc_sl811.o
|
148 |
|
|
Run the USB-Filesystem
|
149 |
|
|
mount -t usbdevfs usbdevfs /proc/bus/usb
|
150 |
|
|
Load drivers for disk storage and file systems
|
151 |
|
|
insmod scsi_mod.o
|
152 |
|
|
insmod usb-storage.o
|
153 |
|
|
insmod fat.o
|
154 |
|
|
insmod vfat.o
|
155 |
|
|
insmod sd_mod.o
|
156 |
|
|
Create node for floppy
|
157 |
|
|
mknod /dev/sda b 8 0
|
158 |
|
|
|
159 |
|
|
Put a disk into your floppy anth than plugin a USB-Floppy (such NEC Model UF0001)
|
160 |
|
|
into first USB-Port. Some Messages will be list on console or in file /proc/kmsg.
|
161 |
|
|
The disk is power on and the SCSI driver will search some partions on disk. Floppy
|
162 |
|
|
have no partions, so must use the first SCSI device without a partion number for mount.
|
163 |
|
|
Than mount the floppy:
|
164 |
|
|
mount /dev/sda /mnt -t vfat
|
165 |
|
|
|
166 |
|
|
If you see a partions check with valid partion 1, you should mount this partion.
|
167 |
|
|
Mostly Memory Sticks are formated with one partion. But if Windows format it again,
|
168 |
|
|
no partions is use.
|
169 |
|
|
|
170 |
|
|
You see that:
|
171 |
|
|
Partition check:
|
172 |
|
|
sda: sda1
|
173 |
|
|
Than mount with follow steps:
|
174 |
|
|
mknod /dev/sda1 b 8 1
|
175 |
|
|
mount /dev/sda1 /mnt -t vfat
|
176 |
|
|
|
177 |
|
|
Create complete list of nodes for SCSI-devices:
|
178 |
|
|
# First inserted device
|
179 |
|
|
echo -n "Create /dev/sda... "
|
180 |
|
|
mknod /dev/sda b 8 0
|
181 |
|
|
for i in 1 2 3 4 5 6 7
|
182 |
|
|
do
|
183 |
|
|
echo -n "$i "
|
184 |
|
|
mknod sda$i c 8 $i
|
185 |
|
|
done
|
186 |
|
|
# Second inserted device
|
187 |
|
|
echo -n "Create /dev/sdb... "
|
188 |
|
|
mknod /dev/sdb b 8 16
|
189 |
|
|
mknod /dev/sdb1 b 8 17
|
190 |
|
|
echo " done"
|
191 |
|
|
# Set some rights
|
192 |
|
|
chown root.disk sd*
|
193 |
|
|
chmod 660 sd*
|
194 |
|
|
|
195 |
|
|
|
196 |
|
|
Install a Keyboard:
|
197 |
|
|
-------------------
|
198 |
|
|
Copy files to target (FTP) and load all drivers.
|
199 |
|
|
Load Generic USB-Handler
|
200 |
|
|
insmod usbcore.o
|
201 |
|
|
Load USB-Host controller, parameters are optional (default urb_debug=0 io=220 irq=12)
|
202 |
|
|
insmod hc_sl811.o
|
203 |
|
|
Run the USB-Filesystem
|
204 |
|
|
mount -t usbdevfs usbdevfs /proc/bus/usb
|
205 |
|
|
Load drivers for USB-Keyboard
|
206 |
|
|
insmod input.o
|
207 |
|
|
insmod keybdev.o
|
208 |
|
|
insmod usbkbd.o
|
209 |
|
|
Now you can plugin Keyboard into first USB-Port and login on first console.
|
210 |
|
|
|
211 |
|
|
Something stuff:
|
212 |
|
|
"Undefined Symbols handle_scancode, keyboard_tasklet, kbd_ledfunc" at install ???
|
213 |
|
|
USB keyboard need PC-style keyboard driver, because the USB driver
|
214 |
|
|
simulate standard AT-Keycodes. A normaly AT- or PS/2-Keyboard must not
|
215 |
|
|
exist for this. The driver says normaly error (Timeout) on boot.
|
216 |
|
|
You must enable CONFIG_VT in kernel konfiguration!
|
217 |
|
|
Character devices --->
|
218 |
|
|
[*] Virtual terminal
|
219 |
|
|
[ ] Support for console on virtual terminal
|
220 |
|
|
|
221 |
|
|
Read
|
222 |
|
|
|
223 |
|
|
|
224 |
|
|
Install a Mouse:
|
225 |
|
|
----------------
|
226 |
|
|
Load Generic USB-Handle
|
227 |
|
|
insmod usbcore.o
|
228 |
|
|
Load USB-Host controller
|
229 |
|
|
insmod hc_sl811.o
|
230 |
|
|
Run the USB-Filesystem
|
231 |
|
|
mount -t usbdevfs usbdevfs /proc/bus/usb
|
232 |
|
|
Load Generic Input device
|
233 |
|
|
insmod input.o
|
234 |
|
|
Load USB-Mouse driver
|
235 |
|
|
insmod input.o
|
236 |
|
|
insmod mousedev.o
|
237 |
|
|
insmod usbmouse.o
|
238 |
|
|
|
239 |
|
|
Read
|
240 |
|
|
|
241 |
|
|
|
242 |
|
|
Install a serial adapter (Sample FTDI):
|
243 |
|
|
---------------------------------------
|
244 |
|
|
Load Generic USB-Handle
|
245 |
|
|
insmod usbcore.o
|
246 |
|
|
Load USB-Host controller
|
247 |
|
|
insmod hc_sl811.o
|
248 |
|
|
Run the USB-Filesystem
|
249 |
|
|
mount -t usbdevfs usbdevfs /proc/bus/usb
|
250 |
|
|
Load Generic derial device and hardware specific device
|
251 |
|
|
insmod usbserial.o
|
252 |
|
|
insmod ftdi_sio.o
|
253 |
|
|
Create node entry for this device
|
254 |
|
|
mknod /dev/ttyUSB0 c 188 0
|
255 |
|
|
Than plugin the hardware into first USB port and
|
256 |
|
|
use serial device on /dev/ttyUSB0, such call a login:
|
257 |
|
|
/sbin/getty 115200 ttyUSB0 vt100 &
|
258 |
|
|
|
259 |
|
|
|
260 |
|
|
USB-Utils:
|
261 |
|
|
----------
|
262 |
|
|
- usb-0.6-7.rpm, usb-0.6-7.src.rpm
|
263 |
|
|
/usr/sbin/lsusb, /usr/share/usb.ids
|
264 |
|
|
Good tool to list devices parameters.
|
265 |
|
|
You must load usbcore.o, hc_sl811.o and proc-usb before
|
266 |
|
|
program works right (use script usb.sh).
|
267 |
|
|
More details: Install usb-0.6-7.rpm on Your desktop and use "man lsusb".
|
268 |
|
|
|
269 |
|
|
|
270 |
|
|
Known Bugs:
|
271 |
|
|
-----------
|
272 |
|
|
|
273 |
|
|
PL2302 Profilic USB to serial converter will not work with hc_sl811.c (Bulk/Timeout).
|
274 |
|
|
USB Floppy will not work with alternate driver sl811.o (Sector not found)
|
275 |
|
|
|
276 |
|
|
|
277 |
|
|
CHANGELOG:
|
278 |
|
|
----------
|
279 |
|
|
* Fri 03 Okt 2003 hne
|
280 |
|
|
- Patch for 2.4.23-pre6
|
281 |
|
|
- Only low level port io in hardware include as inline functions.
|
282 |
|
|
- Move hc_sl811 and sl811 into host directory.
|
283 |
|
|
- sl811 for two controllers (alternate x86 only).
|
284 |
|
|
|
285 |
|
|
* Mit 24 Sep 2003 hne
|
286 |
|
|
- Misplaced "host/uhci.o" in Makefile.
|
287 |
|
|
- Move all x86/arm arch depens from main sl811.c to sl811-hw.h.
|
288 |
|
|
|
289 |
|
|
* Die 23 Sep 2003 hne
|
290 |
|
|
- Put arm and x86 architectur into separate file in include directory.
|
291 |
|
|
- Modifications for both controllers on CF/USB1, alternate sl811 only.
|
292 |
|
|
Parameter for CF/USB1: "io=0x1f0,0x3f6 irq=14".
|
293 |
|
|
|
294 |
|
|
* Fri 19 Sep 2003 hne
|
295 |
|
|
- First version for both controllers on USB1-104.
|
296 |
|
|
- Alternative driver sl811.c from kernel 2.4.22 (thanks Yinah),
|
297 |
|
|
also for 2.4.20. USB Sticks works, Floppy not.
|
298 |
|
|
|
299 |
|
|
* Die 02 Sep 2003 hne
|
300 |
|
|
- IO range only 2 address. For CF1USB we need io addres 3F6 and 3F7,
|
301 |
|
|
but do not use 3f8 (ttyS0).
|
302 |
|
|
|
303 |
|
|
* Mon 11 Aug 2003 hne
|
304 |
|
|
- Comments for using iomega Memory Stick
|
305 |
|
|
|
306 |
|
|
* Don 12 Jun 2003 hne
|
307 |
|
|
- Added Bus-Name for Kernel 2.4.20, no pattern_test at unload driver.
|
308 |
|
|
- more doc
|
309 |
|
|
|
310 |
|
|
* Fri May 16 2003 hne
|
311 |
|
|
- More comments, new patchfile, include usb-konfiguration as file
|
312 |
|
|
|
313 |
|
|
* Wed May 14 2003 hne
|
314 |
|
|
- Patch error: Old Sources was in Kerneltree!
|
315 |
|
|
|
316 |
|
|
* Mon Mar 17 2003 hne
|
317 |
|
|
- Copy usb SL811 from 2.4.19-rc into 2.4.20 kerneltree
|
318 |
|
|
- Add SL811 in Config and Make
|
319 |
|
|
|
320 |
|
|
* 18.11.2002 hne
|
321 |
|
|
- hc_sl811_rh.c:
|
322 |
|
|
rh_unlink_urb: Use usb_dec_dev_use instand of usb_put_dev. Function
|
323 |
|
|
usb_put_dev isn't known in this module. Some others have a macro for
|
324 |
|
|
this. What is right usb_put_dev or usb_dec_dev_use?
|
325 |
|
|
- hc_sl811.c:
|
326 |
|
|
Split into 3 files. Arcitectures store in hc_sl811-arm.c and hc_sl811-x86.c
|
327 |
|
|
Correct release_region() for both io address, so we can unload modul and
|
328 |
|
|
load again without reboot.
|
329 |
|
|
All IO access use 8 bit Data and register number (type __u8).
|
330 |
|
|
All functions static.
|
331 |
|
|
Only x86: base_addr renamed to io. data_reg_addr not used.
|