summaryrefslogtreecommitdiff
path: root/firmware/target/arm
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm')
-rw-r--r--firmware/target/arm/usb-s3c6400x.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/firmware/target/arm/usb-s3c6400x.c b/firmware/target/arm/usb-s3c6400x.c
index 1bd02f9e51..4b0382d2cd 100644
--- a/firmware/target/arm/usb-s3c6400x.c
+++ b/firmware/target/arm/usb-s3c6400x.c
@@ -85,21 +85,22 @@ static void reset_endpoints(int reinit)
85 85
86 DEPDMA(0, true) = &ctrlreq; 86 DEPDMA(0, true) = &ctrlreq;
87 DEPCTL(0, true) |= DEPCTL_epena | DEPCTL_cnak; 87 DEPCTL(0, true) |= DEPCTL_epena | DEPCTL_cnak;
88 /* HACK: Enable all endpoints here, because we have no other chance to do it */
88 if (reinit) 89 if (reinit)
89 { 90 {
90 /* The size is getting set to zero, because we don't know 91 /* The size is getting set to zero, because we don't know
91 whether we are Full Speed or High Speed at this stage */ 92 whether we are Full Speed or High Speed at this stage */
92 DEPCTL(1, false) = DEPCTL_setd0pid | (3 << DEPCTL_nextep_bitp); 93 DEPCTL(1, false) = DEPCTL_usbactep | DEPCTL_setd0pid | (3 << DEPCTL_nextep_bitp);
93 DEPCTL(2, true) = DEPCTL_setd0pid; 94 DEPCTL(2, true) = DEPCTL_usbactep | DEPCTL_setd0pid;
94 DEPCTL(3, false) = DEPCTL_setd0pid | (0 << DEPCTL_nextep_bitp); 95 DEPCTL(3, false) = DEPCTL_usbactep | DEPCTL_setd0pid | (0 << DEPCTL_nextep_bitp);
95 DEPCTL(4, true) = DEPCTL_setd0pid; 96 DEPCTL(4, true) = DEPCTL_usbactep | DEPCTL_setd0pid;
96 } 97 }
97 else 98 else
98 { 99 {
99 DEPCTL(1, false) = (DEPCTL(1, false) & ~DEPCTL_usbactep) | DEPCTL_setd0pid; 100 DEPCTL(1, false) = DEPCTL(1, false) | DEPCTL_usbactep | DEPCTL_setd0pid;
100 DEPCTL(2, true) = (DEPCTL(2, true) & ~DEPCTL_usbactep) | DEPCTL_setd0pid; 101 DEPCTL(2, true) = DEPCTL(2, true) | DEPCTL_usbactep | DEPCTL_setd0pid;
101 DEPCTL(3, false) = (DEPCTL(3, false) & ~DEPCTL_usbactep) | DEPCTL_setd0pid; 102 DEPCTL(3, false) = DEPCTL(3, false) | DEPCTL_usbactep | DEPCTL_setd0pid;
102 DEPCTL(4, true) = (DEPCTL(4, true) & ~DEPCTL_usbactep) | DEPCTL_setd0pid; 103 DEPCTL(4, true) = DEPCTL(4, true) | DEPCTL_usbactep | DEPCTL_setd0pid;
103 } 104 }
104 DAINTMSK = 0xFFFFFFFF; /* Enable interrupts on all EPs */ 105 DAINTMSK = 0xFFFFFFFF; /* Enable interrupts on all EPs */
105} 106}
@@ -112,7 +113,7 @@ int usb_drv_request_endpoint(int type, int dir)
112 { 113 {
113 endpoints[ep].active = true; 114 endpoints[ep].active = true;
114 DEPCTL(ep, out) = (DEPCTL(ep, out) & ~(DEPCTL_eptype_bits << DEPCTL_eptype_bitp)) | 115 DEPCTL(ep, out) = (DEPCTL(ep, out) & ~(DEPCTL_eptype_bits << DEPCTL_eptype_bitp)) |
115 (type << DEPCTL_eptype_bitp) | DEPCTL_setd0pid; 116 (type << DEPCTL_eptype_bitp);
116 return ep | dir; 117 return ep | dir;
117 } 118 }
118 119
@@ -273,7 +274,6 @@ static void ep_transfer(int ep, void *ptr, int length, int out)
273 endpoints[ep].size = length; 274 endpoints[ep].size = length;
274 if (out) 275 if (out)
275 DEPCTL(ep, out) &= ~DEPCTL_stall; 276 DEPCTL(ep, out) &= ~DEPCTL_stall;
276 DEPCTL(ep, out) |= DEPCTL_usbactep;
277 int blocksize = usb_drv_port_speed() ? 512 : 64; 277 int blocksize = usb_drv_port_speed() ? 512 : 64;
278 int packets = (length + blocksize - 1) / blocksize; 278 int packets = (length + blocksize - 1) / blocksize;
279 if (packets == 0) 279 if (packets == 0)