Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 199833
b: refs/heads/master
c: 0f002d2
h: refs/heads/master
i:
  199831: 7e5afce
v: v3
  • Loading branch information
Ben Dooks authored and Greg Kroah-Hartman committed Jun 4, 2010
1 parent d692dda commit 5bedde7
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0287e43dda1a425da662f879dd27352021b0ca63
refs/heads/master: 0f002d200598918f5058dfcfda3da46f29019765
25 changes: 25 additions & 0 deletions trunk/drivers/usb/gadget/s3c-hsotg.c
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,11 @@ static void s3c_hsotg_ctrl_epint(struct s3c_hsotg *hsotg,
*/
static void s3c_hsotg_init_fifo(struct s3c_hsotg *hsotg)
{
unsigned int ep;
unsigned int addr;
unsigned int size;
u32 val;

/* the ryu 2.6.24 release ahs
writel(0x1C0, hsotg->regs + S3C_GRXFSIZ);
writel(S3C_GNPTXFSIZ_NPTxFStAddr(0x200) |
Expand All @@ -310,6 +315,26 @@ static void s3c_hsotg_init_fifo(struct s3c_hsotg *hsotg)
writel(S3C_GNPTXFSIZ_NPTxFStAddr(2048) |
S3C_GNPTXFSIZ_NPTxFDep(0x1C0),
hsotg->regs + S3C_GNPTXFSIZ);

/* arange all the rest of the TX FIFOs, as some versions of this
* block have overlapping default addresses. This also ensures
* that if the settings have been changed, then they are set to
* known values. */

/* start at the end of the GNPTXFSIZ, rounded up */
addr = 2048 + 1024;
size = 768;

/* currently we allocate TX FIFOs for all possible endpoints,
* and assume that they are all the same size. */

for (ep = 0; ep <= 15; ep++) {
val = addr;
val |= size << S3C_DPTXFSIZn_DPTxFSize_SHIFT;
addr += size;

writel(val, hsotg->regs + S3C_DPTXFSIZn(ep));
}
}

/**
Expand Down

0 comments on commit 5bedde7

Please sign in to comment.