summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
authorTobias Diedrich <ranma+coreboot@tdiedrich.de>2010-06-21 06:22:36 +0000
committerTobias Diedrich <ranma+coreboot@tdiedrich.de>2010-06-21 06:22:36 +0000
commit9297a02d4964cae7727248665e278b251cac5533 (patch)
tree92ece84ce0638521d43041799c57ff1e4415e89c /firmware
parenta398c2846aa86650aa386a68cb51929477b6aa23 (diff)
downloadrockbox-9297a02d4964cae7727248665e278b251cac5533.tar.gz
rockbox-9297a02d4964cae7727248665e278b251cac5533.zip
mps depends on endpoint, I wonder why gcc didn't warn about i being used uninitialized...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27005 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r--firmware/target/arm/as3525/usb-drv-as3525.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/firmware/target/arm/as3525/usb-drv-as3525.c b/firmware/target/arm/as3525/usb-drv-as3525.c
index 2f6fa20af8..d41acc7f81 100644
--- a/firmware/target/arm/as3525/usb-drv-as3525.c
+++ b/firmware/target/arm/as3525/usb-drv-as3525.c
@@ -150,15 +150,6 @@ static void dma_desc_init(int ep, int dir)
150static void reset_endpoints(int init) 150static void reset_endpoints(int init)
151{ 151{
152 int i; 152 int i;
153 /*
154 * MPS sizes depending on speed:
155 * LS: 8 (control), no bulk available
156 * FS: 64 (control), 64 (bulk)
157 * HS: 64 (control), 512 (bulk)
158 *
159 * We don't need to handle LS since there is no low-speed only host AFAIK.
160 */
161 int mps = i == 0 ? 64 : (usb_drv_port_speed() ? 512 : 64);
162 153
163 /* 154 /*
164 * OUT EP 2 is an alias for OUT EP 0 on this HW! 155 * OUT EP 2 is an alias for OUT EP 0 on this HW!
@@ -171,6 +162,17 @@ static void reset_endpoints(int init)
171 endpoints[2][1].state |= EP_STATE_ALLOCATED; 162 endpoints[2][1].state |= EP_STATE_ALLOCATED;
172 163
173 for(i = 0; i < USB_NUM_EPS; i++) { 164 for(i = 0; i < USB_NUM_EPS; i++) {
165 /*
166 * MPS sizes depending on speed:
167 * LS: 8 (control), no bulk available
168 * FS: 64 (control), 64 (bulk)
169 * HS: 64 (control), 512 (bulk)
170 *
171 * We don't need to handle LS since there is no low-speed only
172 * host AFAIK.
173 */
174 int mps = i == 0 ? 64 : (usb_drv_port_speed() ? 512 : 64);
175
174 if (init) { 176 if (init) {
175 endpoints[i][0].state = 0; 177 endpoints[i][0].state = 0;
176 wakeup_init(&endpoints[i][0].complete); 178 wakeup_init(&endpoints[i][0].complete);