Forum Discussion
Altera_Forum
Honored Contributor
20 years agoisp1362 usb hcd driver
this is the philips isp1362 usb hcd driver, ported from blackfin linux 2.6.16.1 .
this is back ported patches for nios2 linux 2.6.11-uc0 . http://forum.niosforum.com/forum/index.php...ype=post&id=142 (http://forum.niosforum.com/forum/index.php?act=attach&type=post&id=142) The io ports fixup is for DE2 dev board, in arch/nios2nommu/kernel/usb.c . Fix it , if your board is not DE2. to select this driver in kernel config, drivers --> usb --> host --> isp1362 hcd I didn't have DE2 board to test this driver, only compile passed. Shindou had been testing the same patches for nios2 linux 2.6.16.1 . http://forum.niosforum.com/forum/index.php?showtopic=3552 (http://forum.niosforum.com/forum/index.php?showtopic=3552) But I don't know if he has progress.15 Replies
- Altera_Forum
Honored Contributor
TO_BE_DONE
- Altera_Forum
Honored Contributor
You should not select isp116x driver in kernel config.
You should not change nios2_system.h, too. jay_1025 is also testing the same isp1362 driver, on previous thread. http://forum.niosforum.com/forum/index.php?showtopic=3706 (http://forum.niosforum.com/forum/index.php?showtopic=3706) - Altera_Forum
Honored Contributor
Hi,
I complie the isp1362 after I update my kernel 2.6.16.1, and there is no error now, and then I changed the usb Makefile ISP1362X to ISP1362, but I couldn't found the isp1362.o in host folder. When I boot uClinux on DE II board, I couldn't got any message about ISP1362. <div class='quotetop'>QUOTE </div> --- Quote Start --- uClinux/Nios II Altera Nios II support © 2004 Microtronix Datacom Ltd. setup_arch: No persistant network settings signature at 008F0000 Built 1 zonelists Kernel command line: PID hash table entries: 64 (order: 6, 1024 bytes) Dentry cache hash table entries: 2048 (order: 1, 8192 bytes) Inode-cache hash table entries: 1024 (order: 0, 4096 bytes) Memory available: 6272k/8192k RAM, 0k/0k ROM (1332k kernel code, 471k data) Mount-cache hash table entries: 512 (order: 0, 4096 bytes) NET: Registered protocol family 16 SCSI subsystem initialized usbcore: registered new driver usbfs usbcore: registered new driver hub Serial: JTAG UART driver $Revision: 1.4 $ ttyJ0 at MMIO 0x81004000 (irq = 1) is a jtag_uart io scheduler noop registered io scheduler deadline registered dmfe_probe:eth0, 50000 Khz Nios <DM9000> eth0 I/O: 80900090, VID: 90000a46 ADDR: 00:07:ed:00:00:00 dmfe_probe:eth1, 50000 Khz Nios Initializing USB Mass Storage driver... usbcore: registered new driver usb-storage USB Mass Storage support registered. NET: Registered protocol family 2 IP: routing cache hash table of 512 buckets, 4Kbytes TCP established hash table entries: 512 (order: 0, 4096 bytes) TCP bind hash table entries: 512 (order: -1, 2048 bytes) TCP: Hash tables configured (established 512 bind 512) NET: Registered protocol family 1 NET: Registered protocol family 17 Freeing unused kernel memory: 352k freed (0x15e000 - 0x1b5000) init started: BusyBox v1.1.1-pre0 (2006.04.18-08:58+0000) multi-call binary BusyBox v1.1.1-pre0 (2006.04.18-08:58+0000) Built-in shell (msh) Enter 'help' for a list of built-in commands. # [/b] --- Quote End --- I think ISP1362 wasn't work, how to solve it? - Altera_Forum
Honored Contributor
--- Quote Start --- originally posted by goral@Apr 22 2006, 09:28 AM hi,i complie the isp1362 after i update my kernel 2.6.16.1, and there is no error now, and then i changed the usb makefile isp1362x to isp1362, but i couldn't found the isp1362.o in host folder.
when i boot uclinux on de ii board, i couldn't got any message about isp1362.
<div class='quotetop'>quote
--- quote end ---
--- quote start ---
uclinux/nios ii
altera nios ii support © 2004 microtronix datacom ltd.
setup_arch: no persistant network settings signature at 008f0000
built 1 zonelists
kernel command line:
pid hash table entries: 64 (order: 6, 1024 bytes)
dentry cache hash table entries: 2048 (order: 1, 8192 bytes)
inode-cache hash table entries: 1024 (order: 0, 4096 bytes)
memory available: 6272k/8192k ram, 0k/0k rom (1332k kernel code, 471k data)
mount-cache hash table entries: 512 (order: 0, 4096 bytes)
net: registered protocol family 16
scsi subsystem initialized
usbcore: registered new driver usbfs
usbcore: registered new driver hub
serial: jtag uart driver $revision: 1.4 $
ttyj0 at mmio 0x81004000 (irq = 1) is a jtag_uart
io scheduler noop registered
io scheduler deadline registered
dmfe_probe:eth0, 50000 khz nios
<dm9000> eth0 i/o: 80900090, vid: 90000a46
addr: 00:07:ed:00:00:00
dmfe_probe:eth1, 50000 khz nios
initializing usb mass storage driver...
usbcore: registered new driver usb-storage
usb mass storage support registered.
net: registered protocol family 2
ip: routing cache hash table of 512 buckets, 4kbytes
tcp established hash table entries: 512 (order: 0, 4096 bytes)
tcp bind hash table entries: 512 (order: -1, 2048 bytes)
tcp: hash tables configured (established 512 bind 512)
net: registered protocol family 1
net: registered protocol family 17
freeing unused kernel memory: 352k freed (0x15e000 - 0x1b5000)
init started: busybox v1.1.1-pre0 (2006.04.18-08:58+0000) multi-call binary
busybox v1.1.1-pre0 (2006.04.18-08:58+0000) built-in shell (msh)
enter 'help' for a list of built-in commands.
# --- Quote End --- I think ISP1362 wasn't work, how to solve it? <div align='right'><{post_snapback}> (index.php?act=findpost&pid=14559)</div> [/b] --- Quote End --- There is a bug in the patch. Please fix drivers/usb/Makefile to inlcude host dir for isp1362 just like the one for isp116x .
- Altera_Forum
Honored Contributor
<div class='quotetop'>QUOTE </div>
--- Quote Start --- There is a bug in the patch. Please fix drivers/usb/Makefile to inlcude host dir for isp1362 just like the one for isp116x .[/b] --- Quote End --- THX , I've changed it after I read Shindou's topic, these boot message generate was I changed the Makefile. - Altera_Forum
Honored Contributor
--- Quote Start --- originally posted by goral@Apr 22 2006, 11:36 PM <div class='quotetop'>quote--- quote end ---
--- quote start ---
there is a bug in the patch.
please fix drivers/usb/makefile to inlcude host dir for isp1362 just like the one for isp116x . --- Quote End --- THX , I've changed it after I read Shoidou's topic, these boot message generate was I changed the Makefile. <div align='right'><{post_snapback}> (index.php?act=findpost&pid=14566)</div> [/b] --- Quote End --- Do you have isp1362-hcd.o in drivers/usb/host/ dir ?
- Altera_Forum
Honored Contributor
iI couldn't find it !
- Altera_Forum
Honored Contributor
<div class='quotetop'>QUOTE </div>
--- Quote Start --- obj-$(CONFIG_USB) += core/ obj-$(CONFIG_USB_EHCI_HCD) += host/ obj-$(CONFIG_USB_OHCI_HCD) += host/ obj-$(CONFIG_USB_UHCI_HCD) += host/ obj-$(CONFIG_USB_SL811_HCD) += host/ obj-$(CONFIG_USB_ISP116X_HCD) += host/ obj-$(CONFIG_USB_ISP1362_HCD) += host/ obj-$(CONFIG_ETRAX_USB_HOST) += host/ obj-$(CONFIG_USB_ACM) += class/ obj-$(CONFIG_USB_AUDIO) += class/ obj-$(CONFIG_USB_BLUETOOTH_TTY) += class/ obj-$(CONFIG_USB_MIDI) += class/ obj-$(CONFIG_USB_PRINTER) += class/ ... [/b] --- Quote End --- This is my Makefile in /drivers/usb/ - Altera_Forum
Honored Contributor
hi guys,
sorry - was a bit busy the last 2 wks so didn't get a chance to get further with it yet. as for the missing object file problem - as i recall, one of the Makefiles in the directory structure wasn't point to the right directory so the file's not compiled - i'll check up on that tmrw when i take a look at it. - Altera_Forum
Honored Contributor
When clean all work before I do, I compile my kernel, I got so many errors, I using isp1362.diff to patch the usb driver.
<div class='quotetop'>QUOTE </div> --- Quote Start --- CC drivers/usb/host/isp1362-hcd.o drivers/usb/host/isp1362-hcd.c:1293: error: syntax error before "gfp_t" drivers/usb/host/isp1362-hcd.c:1294: warning: function declaration isn't a prototype drivers/usb/host/isp1362-hcd.c: In function `isp1362_urb_enqueue': drivers/usb/host/isp1362-hcd.c:1295: error: `hcd' undeclared (first use in this function) drivers/usb/host/isp1362-hcd.c:1295: error: (Each undeclared identifier is reported only once drivers/usb/host/isp1362-hcd.c:1295: error: for each function it appears in.) drivers/usb/host/isp1362-hcd.c:1296: error: `urb' undeclared (first use in this function) drivers/usb/host/isp1362-hcd.c:1333: error: `hep' undeclared (first use in this function) drivers/usb/host/isp1362-hcd.c:1334: error: `mem_flags' undeclared (first use in this function) drivers/usb/host/isp1362-hcd.c:1341: warning: implicit declaration of function `HC_IS_RUNNING' drivers/usb/host/isp1362-hcd.c: In function `isp1362_mem_config': drivers/usb/host/isp1362-hcd.c:2415: warning: int format, long unsigned int arg (arg 5) drivers/usb/host/isp1362-hcd.c:2418: warning: int format, long unsigned int arg (arg 5) drivers/usb/host/isp1362-hcd.c: In function `isp1362_hc_start': drivers/usb/host/isp1362-hcd.c:2776: error: `HC_STATE_RUNNING' undeclared (first use in this function) drivers/usb/host/isp1362-hcd.c: At top level: drivers/usb/host/isp1362-hcd.c:2818: error: unknown field `bus_suspend' specified in initializer drivers/usb/host/isp1362-hcd.c:2819: error: unknown field `bus_resume' specified in initializer drivers/usb/host/isp1362-hcd.c: In function `isp1362_remove': drivers/usb/host/isp1362-hcd.c:2828: warning: implicit declaration of function `platform_get_drvdata' drivers/usb/host/isp1362-hcd.c:2828: warning: initialization makes pointer from integer without a cast drivers/usb/host/isp1362-hcd.c:2834: warning: implicit declaration of function `usb_remove_hcd' drivers/usb/host/isp1362-hcd.c: In function `isp1362_probe': drivers/usb/host/isp1362-hcd.c:2927: error: too many arguments to function `usb_create_hcd' drivers/usb/host/isp1362-hcd.c:2932: error: structure has no member named `rsrc_start' drivers/usb/host/isp1362-hcd.c:2958: warning: implicit declaration of function `usb_add_hcd' drivers/usb/host/isp1362-hcd.c: At top level: drivers/usb/host/isp1362-hcd.c:3043: error: variable `isp1362_driver' has initializer but incomplete type drivers/usb/host/isp1362-hcd.c:3044: error: unknown field `probe' specified in initializer drivers/usb/host/isp1362-hcd.c:3044: warning: excess elements in struct initializer drivers/usb/host/isp1362-hcd.c:3044: warning: (near initialization for `isp1362_driver') drivers/usb/host/isp1362-hcd.c:3045: error: unknown field `remove' specified in initializer drivers/usb/host/isp1362-hcd.c:3045: warning: excess elements in struct initializer drivers/usb/host/isp1362-hcd.c:3045: warning: (near initialization for `isp1362_driver') drivers/usb/host/isp1362-hcd.c:3047: error: unknown field `suspend' specified in initializer drivers/usb/host/isp1362-hcd.c:3047: warning: excess elements in struct initializer drivers/usb/host/isp1362-hcd.c:3047: warning: (near initialization for `isp1362_driver') drivers/usb/host/isp1362-hcd.c:3048: error: unknown field `resume' specified in initializer drivers/usb/host/isp1362-hcd.c:3048: warning: excess elements in struct initializer drivers/usb/host/isp1362-hcd.c:3048: warning: (near initialization for `isp1362_driver') drivers/usb/host/isp1362-hcd.c:3049: error: unknown field `driver' specified in initializer drivers/usb/host/isp1362-hcd.c:3049: error: extra brace group at end of initializer drivers/usb/host/isp1362-hcd.c:3049: error: (near initialization for `isp1362_driver') drivers/usb/host/isp1362-hcd.c:3052: warning: excess elements in struct initializer drivers/usb/host/isp1362-hcd.c:3052: warning: (near initialization for `isp1362_driver') drivers/usb/host/isp1362-hcd.c: In function `isp1362_init': drivers/usb/host/isp1362-hcd.c:3063: warning: implicit declaration of function `platform_driver_register' drivers/usb/host/isp1362-hcd.c: In function `isp1362_cleanup': drivers/usb/host/isp1362-hcd.c:3070: warning: implicit declaration of function `platform_driver_unregister' drivers/usb/host/isp1362-hcd.c: At top level: drivers/usb/host/isp1362-hcd.c:3043: error: storage size of `isp1362_driver' isn't known drivers/usb/host/isp1362-hcd.c:1581: warning: 'isp1362_bus_suspend' declared `static' but never defined make[3]: *** [drivers/usb/host/isp1362-hcd.o] Error 1 make[2]: *** [drivers/usb/host] Error2 make[1]: *** [drivers/usb] Error 2 make: *** [drivers] Error 2[/b] --- Quote End --- I clean my work like as hippo mentioned in this topic: http://forum.niosforum.com/forum/index.php?showtopic=3706 (http://forum.niosforum.com/forum/index.php?showtopic=3706) <div class='quotetop'>QUOTE </div> --- Quote Start --- # remove old linux source rm -rf ~/linux-2.6.x ~/mysvn/2.6.11-uc0# kernel 2.6.11-uc0 source ported by microtronix cp -a ~/download/mx140/plugins/com.microtronix.nios2linux.kernel_1.4.0/linux-2.6.x ~ cd ~/linux-2.6.x patch -p0 <~/download/kernel.diff cp ~/download/kernel.config ~/linux-2.6.x/.config patch -p0 <~/download/isp1362.diff[/b] --- Quote End --- Need I update my kernel or how to solve ?