diff options
-rw-r--r-- | firmware/target/arm/usb-fw-pp502x.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/firmware/target/arm/usb-fw-pp502x.c b/firmware/target/arm/usb-fw-pp502x.c index e76c2509ad..76bd7281f5 100644 --- a/firmware/target/arm/usb-fw-pp502x.c +++ b/firmware/target/arm/usb-fw-pp502x.c | |||
@@ -91,7 +91,9 @@ void usb_init_device(void) | |||
91 | 91 | ||
92 | void usb_enable(bool on) | 92 | void usb_enable(bool on) |
93 | { | 93 | { |
94 | #ifndef HAVE_USBSTACK | 94 | #ifdef HAVE_USBSTACK |
95 | (void)on; | ||
96 | #else | ||
95 | /* This device specific code will eventually give way to proper USB | 97 | /* This device specific code will eventually give way to proper USB |
96 | handling, which should be the same for all PP502x targets. */ | 98 | handling, which should be the same for all PP502x targets. */ |
97 | if (on) | 99 | if (on) |
@@ -102,7 +104,7 @@ void usb_enable(bool on) | |||
102 | 104 | ||
103 | #if defined(IRIVER_H10) || defined (IRIVER_H10_5GB) | 105 | #if defined(IRIVER_H10) || defined (IRIVER_H10_5GB) |
104 | if(button_status()==BUTTON_RIGHT) | 106 | if(button_status()==BUTTON_RIGHT) |
105 | #endif | 107 | #endif /* defined(IRIVER_H10) || defined (IRIVER_H10_5GB) */ |
106 | { | 108 | { |
107 | ata_sleepnow(); /* Immediately spindown the disk. */ | 109 | ata_sleepnow(); /* Immediately spindown the disk. */ |
108 | sleep(HZ*2); | 110 | sleep(HZ*2); |
@@ -112,14 +114,14 @@ void usb_enable(bool on) | |||
112 | memcpy((void *)0x40017f00, "diskmode\0\0hotstuff\0\0\1", 21); | 114 | memcpy((void *)0x40017f00, "diskmode\0\0hotstuff\0\0\1", 21); |
113 | #elif CONFIG_CPU == PP5022 | 115 | #elif CONFIG_CPU == PP5022 |
114 | memcpy((void *)0x4001ff00, "diskmode\0\0hotstuff\0\0\1", 21); | 116 | memcpy((void *)0x4001ff00, "diskmode\0\0hotstuff\0\0\1", 21); |
115 | #endif | 117 | #endif /* CONFIG_CPU */ |
116 | #endif | 118 | #endif /* IPOD_ARCH */ |
117 | 119 | ||
118 | system_reboot(); /* Reboot */ | 120 | system_reboot(); /* Reboot */ |
119 | } | 121 | } |
120 | #endif | 122 | #endif /*defined(IPOD_ARCH) || defined(IRIVER_H10) || defined (IRIVER_H10_5GB)*/ |
121 | } | 123 | } |
122 | #endif | 124 | #endif /* !HAVE_USBSTACK */ |
123 | } | 125 | } |
124 | 126 | ||
125 | bool usb_detect(void) | 127 | bool usb_detect(void) |