diff options
Diffstat (limited to 'firmware/target/arm/usb-s3c6400x.c')
-rw-r--r-- | firmware/target/arm/usb-s3c6400x.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/firmware/target/arm/usb-s3c6400x.c b/firmware/target/arm/usb-s3c6400x.c index fbf9a4d483..af90be6944 100644 --- a/firmware/target/arm/usb-s3c6400x.c +++ b/firmware/target/arm/usb-s3c6400x.c | |||
@@ -48,7 +48,11 @@ struct ep_type | |||
48 | } ; | 48 | } ; |
49 | 49 | ||
50 | static struct ep_type endpoints[USB_NUM_ENDPOINTS]; | 50 | static struct ep_type endpoints[USB_NUM_ENDPOINTS]; |
51 | static struct usb_ctrlrequest ctrlreq USB_DEVBSS_ATTR; | 51 | static union |
52 | { | ||
53 | unsigned char data[64]; | ||
54 | struct usb_ctrlrequest req; | ||
55 | } ctrlreq USB_DEVBSS_ATTR; | ||
52 | 56 | ||
53 | int usb_drv_port_speed(void) | 57 | int usb_drv_port_speed(void) |
54 | { | 58 | { |
@@ -70,7 +74,7 @@ static void reset_endpoints(int reinit) | |||
70 | DOEPCTL0 = 0x8000; /* EP0 OUT ACTIVE */ | 74 | DOEPCTL0 = 0x8000; /* EP0 OUT ACTIVE */ |
71 | DOEPTSIZ0 = 0x20080040; /* EP0 OUT Transfer Size: | 75 | DOEPTSIZ0 = 0x20080040; /* EP0 OUT Transfer Size: |
72 | 64 Bytes, 1 Packet, 1 Setup Packet */ | 76 | 64 Bytes, 1 Packet, 1 Setup Packet */ |
73 | DOEPDMA0 = &ctrlreq; | 77 | DOEPDMA0 = &ctrlreq.data; |
74 | DOEPCTL0 |= 0x84000000; /* EP0 OUT ENABLE CLEARNAK */ | 78 | DOEPCTL0 |= 0x84000000; /* EP0 OUT ENABLE CLEARNAK */ |
75 | if (reinit) | 79 | if (reinit) |
76 | { | 80 | { |
@@ -243,14 +247,14 @@ void INT_USB_FUNC(void) | |||
243 | invalidate_dcache(); | 247 | invalidate_dcache(); |
244 | if (i == 0) | 248 | if (i == 0) |
245 | { | 249 | { |
246 | if (ctrlreq.bRequest == 5) | 250 | if (ctrlreq.req.bRequest == 5) |
247 | { | 251 | { |
248 | /* Already set the new address here, | 252 | /* Already set the new address here, |
249 | before passing the packet to the core. | 253 | before passing the packet to the core. |
250 | See below (usb_drv_set_address) for details. */ | 254 | See below (usb_drv_set_address) for details. */ |
251 | DCFG = (DCFG & ~0x7F0) | (ctrlreq.wValue << 4); | 255 | DCFG = (DCFG & ~0x7F0) | (ctrlreq.req.wValue << 4); |
252 | } | 256 | } |
253 | usb_core_control_request(&ctrlreq); | 257 | usb_core_control_request(&ctrlreq.req); |
254 | } | 258 | } |
255 | else panicf("USB: SETUP done on OUT EP%d!?", i); | 259 | else panicf("USB: SETUP done on OUT EP%d!?", i); |
256 | } | 260 | } |
@@ -258,7 +262,7 @@ void INT_USB_FUNC(void) | |||
258 | if (!i) | 262 | if (!i) |
259 | { | 263 | { |
260 | DOEPTSIZ0 = 0x20080040; | 264 | DOEPTSIZ0 = 0x20080040; |
261 | DOEPDMA0 = &ctrlreq; | 265 | DOEPDMA0 = &ctrlreq.data; |
262 | DOEPCTL0 |= 0x84000000; | 266 | DOEPCTL0 |= 0x84000000; |
263 | } | 267 | } |
264 | DOEPINT(i) = epints; | 268 | DOEPINT(i) = epints; |