Forum Discussion

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

isp1362 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's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    originally posted by goral@Apr 23 2006, 01:08 PM

    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

    --- quote end ---

    --- 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&#39;t a prototype

    drivers/usb/host/isp1362-hcd.c: in function `isp1362_urb_enqueue&#39;:

    drivers/usb/host/isp1362-hcd.c:1295: error: `hcd&#39; 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&#39; undeclared (first use in this function)

    drivers/usb/host/isp1362-hcd.c:1333: error: `hep&#39; undeclared (first use in this function)

    drivers/usb/host/isp1362-hcd.c:1334: error: `mem_flags&#39; undeclared (first use in this function)

    drivers/usb/host/isp1362-hcd.c:1341: warning: implicit declaration of function `hc_is_running&#39;

    drivers/usb/host/isp1362-hcd.c: in function `isp1362_mem_config&#39;:

    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&#39;:

    drivers/usb/host/isp1362-hcd.c:2776: error: `hc_state_running&#39; 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&#39; specified in initializer

    drivers/usb/host/isp1362-hcd.c:2819: error: unknown field `bus_resume&#39; specified in initializer

    drivers/usb/host/isp1362-hcd.c: in function `isp1362_remove&#39;:

    drivers/usb/host/isp1362-hcd.c:2828: warning: implicit declaration of function `platform_get_drvdata&#39;

    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&#39;

    drivers/usb/host/isp1362-hcd.c: in function `isp1362_probe&#39;:

    drivers/usb/host/isp1362-hcd.c:2927: error: too many arguments to function `usb_create_hcd&#39;

    drivers/usb/host/isp1362-hcd.c:2932: error: structure has no member named `rsrc_start&#39;

    drivers/usb/host/isp1362-hcd.c:2958: warning: implicit declaration of function `usb_add_hcd&#39;

    drivers/usb/host/isp1362-hcd.c: at top level:

    drivers/usb/host/isp1362-hcd.c:3043: error: variable `isp1362_driver&#39; has initializer but incomplete type

    drivers/usb/host/isp1362-hcd.c:3044: error: unknown field `probe&#39; 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&#39;)

    drivers/usb/host/isp1362-hcd.c:3045: error: unknown field `remove&#39; 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&#39;)

    drivers/usb/host/isp1362-hcd.c:3047: error: unknown field `suspend&#39; 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&#39;)

    drivers/usb/host/isp1362-hcd.c:3048: error: unknown field `resume&#39; 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&#39;)

    drivers/usb/host/isp1362-hcd.c:3049: error: unknown field `driver&#39; 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&#39;)

    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&#39;)

    drivers/usb/host/isp1362-hcd.c: in function `isp1362_init&#39;:

    drivers/usb/host/isp1362-hcd.c:3063: warning: implicit declaration of function `platform_driver_register&#39;

    drivers/usb/host/isp1362-hcd.c: in function `isp1362_cleanup&#39;:

    drivers/usb/host/isp1362-hcd.c:3070: warning: implicit declaration of function `platform_driver_unregister&#39;

    drivers/usb/host/isp1362-hcd.c: at top level:

    drivers/usb/host/isp1362-hcd.c:3043: error: storage size of `isp1362_driver&#39; isn&#39;t known

    drivers/usb/host/isp1362-hcd.c:1581: warning: &#39;isp1362_bus_suspend&#39; declared `static&#39; 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

    --- 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 ?

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

    [/b]

    --- Quote End ---

    These error come from the difference of data structures and APIs between 2.6.11-uc0 and 2.6.16.1 .

    Please switch back to your previous thread, and switch back to 2.6.16.1 kernel.

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

    jay_1025 is also working on this driver, maybe you can help each other.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I had the same errors when compiling after applying the patch isp1362 to the Microtronix 2.6.11 kernel. I think the patch is still for 2.6.16 but I did not patch the kernel, instead I backported the sources to 2.6.11.

    Get the isp1362-hcd.c and isp1362.h file with a description how to go on after applying hippos patch.

    my webpage (http://www.8ung.at/nacide_manfred/linuxtutorial.html)
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi,hippo,i did everything you told about isp1362,but in menuconfig Device

    Drivers ===>

    USB support ===>

    the HID input layer support can&#39;t be chose.

    and when i build the project ther are errors in usb.c.

    can you tell me why ?

    Thank you very much.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    originally posted by hua124@Oct 14 2006, 09:22 PM

    hi,hippo,i did everything you told about isp1362,but in menuconfig device

    drivers ===>

    usb support ===>

    the hid input layer support can&#39;t be chose.

    and when i build the project ther are errors in usb.c.

    can you tell me why ?

    thank you very much.

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

    --- quote end ---

    --- Quote End ---

    You should have post this as a new topic.

    I tried the compilation, but didn&#39;t see the error. What is your error message?

    --- USB Input Devices

    [*] USB Human Interface Device (full HID) support

    with or without,

    --- Input core support is needed for USB HID input layer or HIDBP

    [*] /dev/hiddev raw HID device support