Forum Discussion
IRQ mapping in SOPC builder
I fixed up the device address (na_usb - to the address assigned to ISP1362 in SOPC builder) and irq (na_usb_irq - IRQ 4 when viewed in SOPC builder) and corrected the chip id so linux recognizes the usb port, but i get the following error about the IRQ after i plug in a USB flash drive. I checked the DE2_NET design I'm using for this experiment in SOPC builder and the IRQ for ISP1362 is 4, or should i instead be using the IRQ for the DMA?
thanks in advance! io scheduler deadline registered 116x: driver isp116x-hcd, 08 Apr 2005 116x: ISP116x Host Controller, irq 4 isp116x-hcd isp116x-hcd: new USB bus registered, assigned bus number 1 hub 1-0:1.0: USB hub found hub 1-0:1.0: 2 ports detected scheduling while atomic: swapper/0x00000002/1 Stack from 00187d40:<0> <0> 00000002<0> 000d53cc<0> 00000001<0> ffffe000<0> 00002900<0> 001922ec< 0> 00189b20<0> 00356c00<0> <0> 40408180<0> 00000002<0> 000e5504<0> ffff8c59<0> 00000006<0> 000d696c< 0> 00150020<0> 00150020<0> <0> ffff8c59<0> 4b87ad6e<0> 000170f0<0> 00182d60<0> 0014fd50<0> 00000002< 0> ffffe000<0> 80000080<0> <0> 000175bc<0> 001921c0<0> 00192280<0> 000be790<0> 001921c0<0> 00192280< 0> 000bf130<0> 000df488<0> <0> 00000000<0> 00189a20<0> 0000000d<0> 000001f4<0> 00356c04<0> 00357d9c< 0> 000600fc<0> 00179200<0> <0> 0035ada4<0> 00000000<0> 00192294<0> 00356a00<0> 00000001<0> fffffffa< 0> ffffffed<0> 000ecc94<0> Call Trace:<0> <0> [<000bcf18>]<0> [<000a1e04>]<0> [<000a1eb8>]<0> [<00000001>]<0> <0> [<00000000>]<0> [<00000000>]<0> [<000a20a8>]<0> [<00000000>]<0> <0> [<000a0e68>]<0> [<00000000>]<0> [<00000000>]<0> [<000c5c68>]<0> <0> [<00000001>]<0> [<00000000>]<0> [<00000000>]<0> [<00000000>]<0> <0> [<000001f4>]<0> [<00000001>]<0> [<00000000>]<0> [<000bf95c>]<0> <0> [<00000012>]<0> [<00000012>]<0> [<00000012>]<0> [<000c2034>]<0> <0> [<00000001>]<0> [<000a1e04>]<0> [<000a1f74>]<0> [<00000000>]<0> <0> [<000a22c8>]<0> [<00000001>]<0> [<000a2830>]<0> [<00000000>]<0> <0> [<00000000>]<0> [<00000264>]<0> [<00001d64>]<0> [<00006910>]<0> <0> [<00006968>]<0> [<0000088c>]<0> [<00000000>]<0> [<00000000>]<0> <0> [<00000000>]<0> [<000052a8>]<0> [<00000000>]<0> [<00000001>]<0> <0> [<00000b00>]<0> [<00000b00>]<0> [<0000019c>]<0> [<00000000>]<0> <0> [<00000120>]<0> [<00000001>]<0> [<00000001>]<0> [<00001d54>]<0> drivers/usb/class/bluetty.c: USB Bluetooth support registered usbcore: registered new driver bluetty drivers/usb/class/bluetty.c: USB Bluetooth tty driver v0.13 Initializing USB Mass Storage driver... usbcore: registered new driver usb-storage USB Mass Storage support registered. Freeing unused kernel memory: 348k freed (0xf2000 - 0x148000) init started: BusyBox v1.1.1-pre0 (2006.03.06-00:20+0000) multi-call binary BusyBox v1.1.1-pre0 (2006.03.06-00:20+0000) Built-in shell (msh) Enter 'help' for a list of built-in commands. # usb 1-2: new full speed USB device using isp116x-hcd and address 2 isp116x-hcd isp116x-hcd: Unlink after no-IRQ? Controller is probably using the wrong IRQ.19 Replies
- Altera_Forum
Honored Contributor
Why do you want bluetty?
If you want bluetooth support, maybe you should select from top level menuconfig, Networking --> [*] Bluetooth subsystem support ---> Bluetooth device drivers ---> [*] HCI USB driver The isp116x driver does not use DMA. It looks like the hcd driver crashed after detecting port <div class='quotetop'>QUOTE </div> --- Quote Start --- hub 1-0:1.0: 2 ports detected scheduling while atomic: swapper/0x00000002/1[/b] --- Quote End --- You should enable DEBUG in your driver, or add some printk() to find out. You should try out the 2.6.15.6 kernel in the update of the buildroot guide. - Altera_Forum
Honored Contributor
hmm, I don't see any DEBUG option in the makefile, how do i enable the debug option?
thanks! - Altera_Forum
Honored Contributor
The problem should be in arch/nios2nommu/kernel/usb.c .
But you have to enable the DEBUG in drivers/usb/host/isp116x-hcd.c to find out. you should use kernel 2.6.16 . - Altera_Forum
Honored Contributor
thanks, i've traced down the problem using the trace and printks to an msleep call in drivers/usb/core/hub.c in the 2.6.x kernel
Just tried compiling 2.6.16 kernel but it seems some of the data structures aren't complete or don't match up. the isp116x_platform_data data structure seems to be missing some things that usb.c assumes are there and is trying to initialize. - Altera_Forum
Honored Contributor
Yes, there may be new data structures and api in new kernel, which makes old driver failed.
- Altera_Forum
Honored Contributor
so in that case should i be updating the 2.6.16 kernel with the more complete code from 2.6.x? some of the code in 2.6.16 have data structures which have some data members stripped out for some reason
- Altera_Forum
Honored Contributor
<div class='quotetop'>QUOTE </div>
--- Quote Start --- some of the code in 2.6.16 have data structures which have some data members stripped out for some reason[/b] --- Quote End --- You should update arch/nios2nommu/usb.c data structure for newer kernel. - Altera_Forum
Honored Contributor
I will try to borrow a DEII board, and I will check it then.
- Altera_Forum
Honored Contributor
After some searching on web, I found this about isp1362 linux stack,
http://www.semiconductors.philips.com/acro...s/um10012_2.pdf (http://www.semiconductors.philips.com/acrobat/usermanuals/um10012_2.pdf) There is isp1362_linux_sw_stack.tar.gz http://www.semiconductors.philips.com/prod...ducts/download/ (http://www.semiconductors.philips.com/products/connectivity/usb/products/download/) Email authorization Software marked "email authorization required" needs prior approval from Philips Marketing for download. - Altera_Forum
Honored Contributor
--- Quote Start --- originally posted by hippo@Mar 29 2006, 09:17 PM after some searching on web, i found this about isp1362 linux stack,http://www.semiconductors.philips.com/acro...s/um10012_2.pdf (http://www.semiconductors.philips.com/acrobat/usermanuals/um10012_2.pdf)
there is isp1362_linux_sw_stack.tar.gz
http://www.semiconductors.philips.com/prod...ducts/download/ (http://www.semiconductors.philips.com/products/connectivity/usb/products/download/)
email authorization
software marked "email authorization required" needs prior approval from philips marketing for download.
<div align='right'><{post_snapback}> (index.php?act=findpost&pid=13910)
--- quote end ---
--- Quote End --- Thanks hippo! while looking for guides about porting over drivers, i found this for the 2.6.x distribution http://blackfin.uclinux.org/plugins/scmcvs...root=uclinux533 (http://blackfin.uclinux.org/plugins/scmcvs/cvsweb.php/uclinux-dist/linux-2.6.x/drivers/usb/host/?cvsroot=uclinux533) not sure if any changes need to be made since the hardware is different from blackfin? (in the header files) i've tried plugging in a usb flash drive but nothing happens after trying: uClinux/Nios II Altera Nios II support © 2004 Microtronix Datacom Ltd. 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: 6528k/8192k RAM, 0k/0k ROM (1090k kernel code, 460k 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 Bluetooth: Core ver 2.7 NET: Registered protocol family 31 Bluetooth: HCI device and connection manager initialized Bluetooth: HCI socket layer initialized devfs: 2004-01-31 Richard Gooch ([email protected]) devfs: boot_options: 0x1 Serial: JTAG UART driver $Revision: 1.4 $ ttyJ0 at MMIO 0x81004000 (irq = 0) is a jtag_uart io scheduler noop registered io scheduler deadline registered Initializing USB Mass Storage driver... usbcore: registered new driver usb-storage USB Mass Storage support registered. Freeing unused kernel memory: 352k freed (0x120000 - 0x177000) init started: BusyBox v1.1.1-pre0 (2006.03.06-00:20+0000) multi-call binary BusyBox v1.1.1-pre0 (2006.03.06-00:20+0000) Built-in shell (msh) Enter 'help' for a list of built-in commands. # cd proc# more mounts rootfs / rootfs rw 0 0 /proc /proc proc rw,nodiratime 0 0 sysfs /sys sysfs rw 0 0 none /proc/bus/usb usbfs rw 0 0# mount -t vfat /dev/hda1 /mnt mount: Mounting /dev/hda1 on /mnt failed: No such device or address# mount -t vfat /dev/hda /mnt mount: Mounting /dev/hda on /mnt failed: No such device or address am i using the wrong mount command? <div class='quotetop'>QUOTE </div> --- Quote Start --- 1. in root fs, you need some scsi dev nodes, eg sda, sda1... to use mass storage dev you need usbfs, too. I have setup them in the post of buildroot guide, so they are ready. 2. in kernel menuconfig, turn on file system support, eg, vfat and native lang codepage 437 turn on scsi device, scsi disk turn on host-side usb, usb dev fs, your hcd, usb device eg mass storage.[/b] --- Quote End --- for 1. do i need to do anything else for sda and sda1? - usbfs seems to be registered for 2. i've enabled all of those options. sorry about the huge post but thx in advance!