aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/usb/gadget/s3c-hsotg.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/drivers/usb/gadget/s3c-hsotg.c b/drivers/usb/gadget/s3c-hsotg.c
index a6d725dd7335..9abf96c5715d 100644
--- a/drivers/usb/gadget/s3c-hsotg.c
+++ b/drivers/usb/gadget/s3c-hsotg.c
@@ -297,6 +297,11 @@ static void s3c_hsotg_ctrl_epint(struct s3c_hsotg *hsotg,
297 */ 297 */
298static void s3c_hsotg_init_fifo(struct s3c_hsotg *hsotg) 298static void s3c_hsotg_init_fifo(struct s3c_hsotg *hsotg)
299{ 299{
300 unsigned int ep;
301 unsigned int addr;
302 unsigned int size;
303 u32 val;
304
300 /* the ryu 2.6.24 release ahs 305 /* the ryu 2.6.24 release ahs
301 writel(0x1C0, hsotg->regs + S3C_GRXFSIZ); 306 writel(0x1C0, hsotg->regs + S3C_GRXFSIZ);
302 writel(S3C_GNPTXFSIZ_NPTxFStAddr(0x200) | 307 writel(S3C_GNPTXFSIZ_NPTxFStAddr(0x200) |
@@ -310,6 +315,26 @@ static void s3c_hsotg_init_fifo(struct s3c_hsotg *hsotg)
310 writel(S3C_GNPTXFSIZ_NPTxFStAddr(2048) | 315 writel(S3C_GNPTXFSIZ_NPTxFStAddr(2048) |
311 S3C_GNPTXFSIZ_NPTxFDep(0x1C0), 316 S3C_GNPTXFSIZ_NPTxFDep(0x1C0),
312 hsotg->regs + S3C_GNPTXFSIZ); 317 hsotg->regs + S3C_GNPTXFSIZ);
318
319 /* arange all the rest of the TX FIFOs, as some versions of this
320 * block have overlapping default addresses. This also ensures
321 * that if the settings have been changed, then they are set to
322 * known values. */
323
324 /* start at the end of the GNPTXFSIZ, rounded up */
325 addr = 2048 + 1024;
326 size = 768;
327
328 /* currently we allocate TX FIFOs for all possible endpoints,
329 * and assume that they are all the same size. */
330
331 for (ep = 0; ep <= 15; ep++) {
332 val = addr;
333 val |= size << S3C_DPTXFSIZn_DPTxFSize_SHIFT;
334 addr += size;
335
336 writel(val, hsotg->regs + S3C_DPTXFSIZn(ep));
337 }
313} 338}
314 339
315/** 340/**