Commit 5cb2ff0c authored by Robert Baldyga's avatar Robert Baldyga Committed by Felipe Balbi

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: default avatarRobert Baldyga <r.baldyga@samsung.com>
Signed-off-by: default avatarKyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent ab93e014
...@@ -563,9 +563,11 @@ static int s3c_hsotg_write_fifo(struct s3c_hsotg *hsotg, ...@@ -563,9 +563,11 @@ static int s3c_hsotg_write_fifo(struct s3c_hsotg *hsotg,
if (to_write > max_transfer) { if (to_write > max_transfer) {
to_write = max_transfer; to_write = max_transfer;
s3c_hsotg_en_gsint(hsotg, /* it's needed only when we do not use dedicated fifos */
periodic ? GINTSTS_PTxFEmp : if (!hsotg->dedicated_fifos)
GINTSTS_NPTxFEmp); s3c_hsotg_en_gsint(hsotg,
periodic ? GINTSTS_PTxFEmp :
GINTSTS_NPTxFEmp);
} }
/* see if we can write data */ /* see if we can write data */
...@@ -590,9 +592,11 @@ static int s3c_hsotg_write_fifo(struct s3c_hsotg *hsotg, ...@@ -590,9 +592,11 @@ static int s3c_hsotg_write_fifo(struct s3c_hsotg *hsotg,
* is more room left. * is more room left.
*/ */
s3c_hsotg_en_gsint(hsotg, /* it's needed only when we do not use dedicated fifos */
periodic ? GINTSTS_PTxFEmp : if (!hsotg->dedicated_fifos)
GINTSTS_NPTxFEmp); s3c_hsotg_en_gsint(hsotg,
periodic ? GINTSTS_PTxFEmp :
GINTSTS_NPTxFEmp);
} }
dev_dbg(hsotg->dev, "write %d/%d, can_write %d, done %d\n", dev_dbg(hsotg->dev, "write %d/%d, can_write %d, done %d\n",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment