diff options
author | Robert Baldyga <r.baldyga@samsung.com> | 2013-09-19 05:50:18 -0400 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2013-10-15 09:43:22 -0400 |
commit | 5cb2ff0cdd60aef07c592a9d09349b5993fdf9b4 (patch) | |
tree | 69e287ebeec75718665cf26329e17ba7f6288af5 /drivers/usb | |
parent | ab93e014f35374a8169b0f465fccee69e04ea34c (diff) |
usb: gadget: s3c-hsotg: fix s3c_hsotg_write_fifo function for dedicated fifo mode
In s3c_hsotg_write_fifo function PTxFEmp/NPTxFEmp interrupts are enabled
only in shared-fifo mode. In dedicated-fifo mode they should not be used
(when enabled then cause interrupt storm).
Signed-off-by: Robert Baldyga <r.baldyga@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/gadget/s3c-hsotg.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/drivers/usb/gadget/s3c-hsotg.c b/drivers/usb/gadget/s3c-hsotg.c index 4faf5e70e093..bb173852ae4c 100644 --- a/drivers/usb/gadget/s3c-hsotg.c +++ b/drivers/usb/gadget/s3c-hsotg.c | |||
@@ -563,9 +563,11 @@ static int s3c_hsotg_write_fifo(struct s3c_hsotg *hsotg, | |||
563 | if (to_write > max_transfer) { | 563 | if (to_write > max_transfer) { |
564 | to_write = max_transfer; | 564 | to_write = max_transfer; |
565 | 565 | ||
566 | s3c_hsotg_en_gsint(hsotg, | 566 | /* it's needed only when we do not use dedicated fifos */ |
567 | periodic ? GINTSTS_PTxFEmp : | 567 | if (!hsotg->dedicated_fifos) |
568 | GINTSTS_NPTxFEmp); | 568 | s3c_hsotg_en_gsint(hsotg, |
569 | periodic ? GINTSTS_PTxFEmp : | ||
570 | GINTSTS_NPTxFEmp); | ||
569 | } | 571 | } |
570 | 572 | ||
571 | /* see if we can write data */ | 573 | /* see if we can write data */ |
@@ -590,9 +592,11 @@ static int s3c_hsotg_write_fifo(struct s3c_hsotg *hsotg, | |||
590 | * is more room left. | 592 | * is more room left. |
591 | */ | 593 | */ |
592 | 594 | ||
593 | s3c_hsotg_en_gsint(hsotg, | 595 | /* it's needed only when we do not use dedicated fifos */ |
594 | periodic ? GINTSTS_PTxFEmp : | 596 | if (!hsotg->dedicated_fifos) |
595 | GINTSTS_NPTxFEmp); | 597 | s3c_hsotg_en_gsint(hsotg, |
598 | periodic ? GINTSTS_PTxFEmp : | ||
599 | GINTSTS_NPTxFEmp); | ||
596 | } | 600 | } |
597 | 601 | ||
598 | dev_dbg(hsotg->dev, "write %d/%d, can_write %d, done %d\n", | 602 | dev_dbg(hsotg->dev, "write %d/%d, can_write %d, done %d\n", |