Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
19 years ago

isp1362-hcd.c USB driver help

Hi everyone...

I am trying to get the isp1362-hcd.c driver to work on a 2.6.11 kernel. the board is a ppc homebrew board...

I think I have the driver basically working but I am new to the USB stuff.... I have a dump of dmesg which seems to indicate ptd packets are going out but I don't see anything coming pack... does anyone have any experience with this driver(Lothar is the author)?? that can point me in the right direction??

or, maybe someone has a dump of a dmesg with similar output that I can compare with mine to see when my driver is going wrong??

here is the dump below, any help is appreciated!!

Thanks

Bob

I see the ptd go out:

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

isp1362_write_buffer: Read 0001 from HCuPINT[24]

EP c3c1f0c0: CC=f EP=0 DIR=0 CNT=0 LEN=8 MPS=64 TGL=0 ACT=1 FA=0 SPD=0 SF=0 PR=0 LST=0

f800 0040 0008 0000

--out->

0000: 00 05 02 00 00 00 00 00

BUT nothing seems to come in... it is like the ATL interrupt is not triggering...

9 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Thanks Hippo...

    yep, I am basically using the same source as nacide had in that message..

    (yes, it is a ppc// motorola mpc8247 processor...) I don't there is anything wrong with the driver per say... since others have used it and seems to be working for them... it is probably something I did while getting it to work with my new board we built up.. (may even be a hardware problem.. not sure..)

    I am getting the interrupts ok.. (just not the ATL one I think.... which is what seems to unload incoming ptds... at least that is my guess)..

    I get the HUB timeouts... errors -110... so it is like nothing is coming back from the flash disk.. but the dmesg output seem s to indicate something did but just didn't get retrieved from the chip.. (via the ATL interrupt)...

    at least that is my guess.. not knowing usb that well yet, I am just guessing...

    thanks!!

    --- Quote Start ---

    originally posted by hippo@Jun 8 2006, 09:23 AM

    you may check the post from nacide, who backported the isp1362 hcd to 2.6.11,

    http://forum.niosforum.com/forum/index.php?showtopic=4069 (http://forum.niosforum.com/forum/index.php?showtopic=4069)

    you should check if the platform device table is correct.

    you should check if you can access ports on the usb chip, and interrupt is routed correctly.

    but, are you working on ppc ?

    <div align='right'><{post_snapback}> (index.php?act=findpost&pid=16036)

    --- quote end ---

    --- Quote End ---

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    OH, and yes, I am posting questions to the linux-usb-devel list as well.. but I saw activity on here and was hoping by chance, I might get help here as well.

    thanks again for any insight/help...

    Bob
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    That&#39;s OK.

    You should check your hardware first before debug the software driver. You should write a simple program to do some registers access, and check the timing with a scope or LA. Hardware must be tested at much as possible.

    Then trace thourgh the isp1362-hcd.c . Watch for the reset and initialization.

    After that the usb will detect the root hub. You should read ch13 usb of the book Linux device driver 3rdEd. It will give you more insight.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    originally posted by bobw0299@Jun 8 2006, 10:40 PM

    oh, and yes, i am posting questions to the linux-usb-devel list as well.. but i saw activity on here and was hoping by chance, i might get help here as well.

    thanks again for any insight/help...

    bob

    <div align='right'><{post_snapback}> (index.php?act=findpost&pid=16038)

    --- quote end ---

    --- Quote End ---

    And this is boot log from jay_1025,

    <div class='quotetop'>QUOTE </div>

    --- Quote Start ---

    uClinux/Nios II

    Altera Nios II support © 2004 Microtronix Datacom Ltd.

    Built 1 zonelists

    Kernel command line: root=/dev/mtdblock0

    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: 6768k/8192k RAM, 0k/0k ROM (1185k kernel code, 144k data)

    Mount-cache hash table entries: 512

    SCSI subsystem initialized

    usbcore: registered new driver usbfs

    usbcore: registered new driver hub

    JFFS2 version 2.2. (NAND) © 2001-2003 Red Hat, Inc.

    io scheduler noop registered

    io scheduler deadline registered (default)

    Serial: JTAG UART driver $Revision: 1.4 $

    ttyJ0 at MMIO 0x80481120 (irq = 1) is a jtag_uart

    Altera NDK flash (AMD): Found 1 x16 devices at 0x0 in 8-bit bank

    Amd/Fujitsu Extended Query Table at 0x0040

    number of CFI chips: 1

    cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.

    cmdlinepart partition parsing not available

    RedBoot partition parsing not available

    Using Altera NDK partition definition

    Creating 1 MTD partitions on "Altera NDK flash (AMD)":

    0x00000000-0x00400000 : "jffs2"

    usbmon: debugfs is not available

    driver isp1362-hcd, 2005-04-04

    isp1362-hcd isp1362-hcd: ISP1362 Host Controller

    isp1362_hc_reset:

    isp1362-hcd isp1362-hcd: new USB bus registered, assigned bus number 1

    isp1362-hcd isp1362-hcd: irq 4, io mem 0x804810d0

    isp1362_hc_start:

    isp1362-hcd isp1362-hcd: ISP1362 Memory usage:

    isp1362-hcd isp1362-hcd: ISTL: 2 * 256: 512 @ $0000:$0100

    isp1362-hcd isp1362-hcd: INTL: 16 * ( 64+8): 1152 @ $0200

    isp1362-hcd isp1362-hcd: ATL : 32 * ( 64+8): 2304 @ $0680

    isp1362-hcd isp1362-hcd: USED/FREE: 3968 128

    usb usb1: configuration# 1 chosen from 1 choice

    hub 1-0:1.0: USB hub found

    hub 1-0:1.0: 2 ports detected

    ISP1362 Host Controller, irq 4

    Initializing USB Mass Storage driver...

    usbcore: registered new driver usb-storage

    USB Mass Storage support registered.[/b]

    --- Quote End ---

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    thanks... yep I get basically the same for the boot log... (except the timeout error occurs) does anyone out there have a dump from the dmesg file with debugging turned on?? so I might be able to compare with mine and see where it is going wrong..

    we have checked out the hardware... and I think it is ok... i can write/read the isp1362 chip ok.. and I am seeing activity on the bus...

    thanks bob
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    issue resolved.... in the end it was related to byte swapping things correctly... the ptd header needed the bytes swapped one way and the rest of the data(the urb payload) needed the bytes swapped the other way...

    there is only one function is there to write/read both (ptd header and payload) to the fifo&#39;s... so I had to make two functions and whola, it started works...

    Bob
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi bobw0299

    I found your query on Altera forum, I am doing a project on DE2 board which requires USB communication of board with PC.

    I want to transfer data from pc to board and send some command to board so that my VHDL design will perform some task.

    I wonder if you can help me regarding USB communication stuff, could you please guide me how to approach for the same using VHDL and/or C or any other method. how can I start and what issues are to b considered? how can I start writing hardware on board and driver on pc?

    your assistance will help me a lot, waiting for your reply.

    Thanks and Regards

    Kuldeep Goswami

    goswamikuldeep@gmail.com

    goswamikuldeep@yahoo.co.in