diff options
author | Frank Gevaerts <frank@gevaerts.be> | 2008-02-20 22:54:26 +0000 |
---|---|---|
committer | Frank Gevaerts <frank@gevaerts.be> | 2008-02-20 22:54:26 +0000 |
commit | 07427592a928ab3d164fbcca842399af6d5ca7ef (patch) | |
tree | eb7b1b748f8ac9ea28ce357290bc5992f5e2403f /firmware/target/arm/usb-fw-pp502x.c | |
parent | 6af732d17aa1eb882e3c52242b2bf7f2fcccc752 (diff) | |
download | rockbox-07427592a928ab3d164fbcca842399af6d5ca7ef.tar.gz rockbox-07427592a928ab3d164fbcca842399af6d5ca7ef.zip |
Major USB stack improvements. It now works at nearly the maximum speed for a full speed connection, and does seem stable.
Still not enabled by default, #define USE_ROCKBOX_USB is still required to enable it.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16360 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/usb-fw-pp502x.c')
-rw-r--r-- | firmware/target/arm/usb-fw-pp502x.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/firmware/target/arm/usb-fw-pp502x.c b/firmware/target/arm/usb-fw-pp502x.c index 46a5b9942f..4ac515ba1c 100644 --- a/firmware/target/arm/usb-fw-pp502x.c +++ b/firmware/target/arm/usb-fw-pp502x.c | |||
@@ -34,6 +34,7 @@ void usb_init_device(void) | |||
34 | { | 34 | { |
35 | /* enable usb module */ | 35 | /* enable usb module */ |
36 | outl(inl(0x7000002C) | 0x3000000, 0x7000002C); | 36 | outl(inl(0x7000002C) | 0x3000000, 0x7000002C); |
37 | |||
37 | DEV_EN |= DEV_USB0; | 38 | DEV_EN |= DEV_USB0; |
38 | DEV_EN |= DEV_USB1; | 39 | DEV_EN |= DEV_USB1; |
39 | 40 | ||
@@ -46,6 +47,7 @@ void usb_init_device(void) | |||
46 | #if CONFIG_CPU == PP5020 | 47 | #if CONFIG_CPU == PP5020 |
47 | DEV_INIT2 |= INIT_USB; | 48 | DEV_INIT2 |= INIT_USB; |
48 | #endif | 49 | #endif |
50 | |||
49 | while ((inl(0x70000028) & 0x80) == 0); | 51 | while ((inl(0x70000028) & 0x80) == 0); |
50 | outl(inl(0x70000028) | 0x2, 0x70000028); | 52 | outl(inl(0x70000028) | 0x2, 0x70000028); |
51 | udelay(0x186A0); | 53 | udelay(0x186A0); |
@@ -68,9 +70,8 @@ void usb_init_device(void) | |||
68 | void usb_enable(bool on) | 70 | void usb_enable(bool on) |
69 | { | 71 | { |
70 | if (on) { | 72 | if (on) { |
71 | #ifdef USE_ROCKBOX_USB | ||
72 | usb_core_init(); | 73 | usb_core_init(); |
73 | #else | 74 | #if !defined(USE_ROCKBOX_USB) |
74 | /* until we have native mass-storage mode, we want to reboot on | 75 | /* until we have native mass-storage mode, we want to reboot on |
75 | usb host connect */ | 76 | usb host connect */ |
76 | #if defined(IRIVER_H10) || defined (IRIVER_H10_5GB) | 77 | #if defined(IRIVER_H10) || defined (IRIVER_H10_5GB) |