diff options
author | Anton Tikhomirov <av.tikhomirov@samsung.com> | 2012-03-06 14:07:29 +0900 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2012-04-10 19:11:45 +0300 |
commit | 659ad60cb9128345d0a6b9093dda9b0e366b7937 (patch) | |
tree | 78906bbbd9f5028ae7db0de4438168d4f6d8cae9 /drivers/usb | |
parent | f7a83fe19336125d7eb26488788dc66c03f2c08e (diff) |
usb: s3c-hsotg: Fix maximum patcket size setting for EP0
MPS field of DOEPCTL0 is read only.
Signed-off-by: Anton Tikhomirov <av.tikhomirov@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/gadget/s3c-hsotg.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/usb/gadget/s3c-hsotg.c b/drivers/usb/gadget/s3c-hsotg.c index e3fe5fd795f..03de169ab36 100644 --- a/drivers/usb/gadget/s3c-hsotg.c +++ b/drivers/usb/gadget/s3c-hsotg.c @@ -1696,10 +1696,12 @@ static void s3c_hsotg_set_ep_maxpacket(struct s3c_hsotg *hsotg, reg |= mpsval; writel(reg, regs + S3C_DIEPCTL(ep)); - reg = readl(regs + S3C_DOEPCTL(ep)); - reg &= ~S3C_DxEPCTL_MPS_MASK; - reg |= mpsval; - writel(reg, regs + S3C_DOEPCTL(ep)); + if (ep) { + reg = readl(regs + S3C_DOEPCTL(ep)); + reg &= ~S3C_DxEPCTL_MPS_MASK; + reg |= mpsval; + writel(reg, regs + S3C_DOEPCTL(ep)); + } return; |