diff options
Diffstat (limited to 'drivers/usb/gadget/s3c-hsotg.c')
-rw-r--r-- | drivers/usb/gadget/s3c-hsotg.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/drivers/usb/gadget/s3c-hsotg.c b/drivers/usb/gadget/s3c-hsotg.c index 69295ba9d99a..105b206cd844 100644 --- a/drivers/usb/gadget/s3c-hsotg.c +++ b/drivers/usb/gadget/s3c-hsotg.c | |||
@@ -340,7 +340,7 @@ static void s3c_hsotg_init_fifo(struct s3c_hsotg *hsotg) | |||
340 | /* currently we allocate TX FIFOs for all possible endpoints, | 340 | /* currently we allocate TX FIFOs for all possible endpoints, |
341 | * and assume that they are all the same size. */ | 341 | * and assume that they are all the same size. */ |
342 | 342 | ||
343 | for (ep = 0; ep <= 15; ep++) { | 343 | for (ep = 1; ep <= 15; ep++) { |
344 | val = addr; | 344 | val = addr; |
345 | val |= size << S3C_DPTXFSIZn_DPTxFSize_SHIFT; | 345 | val |= size << S3C_DPTXFSIZn_DPTxFSize_SHIFT; |
346 | addr += size; | 346 | addr += size; |
@@ -741,7 +741,7 @@ static void s3c_hsotg_start_req(struct s3c_hsotg *hsotg, | |||
741 | /* write size / packets */ | 741 | /* write size / packets */ |
742 | writel(epsize, hsotg->regs + epsize_reg); | 742 | writel(epsize, hsotg->regs + epsize_reg); |
743 | 743 | ||
744 | if (using_dma(hsotg)) { | 744 | if (using_dma(hsotg) && !continuing) { |
745 | unsigned int dma_reg; | 745 | unsigned int dma_reg; |
746 | 746 | ||
747 | /* write DMA address to control register, buffer already | 747 | /* write DMA address to control register, buffer already |
@@ -1696,10 +1696,12 @@ static void s3c_hsotg_set_ep_maxpacket(struct s3c_hsotg *hsotg, | |||
1696 | reg |= mpsval; | 1696 | reg |= mpsval; |
1697 | writel(reg, regs + S3C_DIEPCTL(ep)); | 1697 | writel(reg, regs + S3C_DIEPCTL(ep)); |
1698 | 1698 | ||
1699 | reg = readl(regs + S3C_DOEPCTL(ep)); | 1699 | if (ep) { |
1700 | reg &= ~S3C_DxEPCTL_MPS_MASK; | 1700 | reg = readl(regs + S3C_DOEPCTL(ep)); |
1701 | reg |= mpsval; | 1701 | reg &= ~S3C_DxEPCTL_MPS_MASK; |
1702 | writel(reg, regs + S3C_DOEPCTL(ep)); | 1702 | reg |= mpsval; |
1703 | writel(reg, regs + S3C_DOEPCTL(ep)); | ||
1704 | } | ||
1703 | 1705 | ||
1704 | return; | 1706 | return; |
1705 | 1707 | ||
@@ -1919,7 +1921,8 @@ static void s3c_hsotg_epint(struct s3c_hsotg *hsotg, unsigned int idx, | |||
1919 | ints & S3C_DIEPMSK_TxFIFOEmpty) { | 1921 | ints & S3C_DIEPMSK_TxFIFOEmpty) { |
1920 | dev_dbg(hsotg->dev, "%s: ep%d: TxFIFOEmpty\n", | 1922 | dev_dbg(hsotg->dev, "%s: ep%d: TxFIFOEmpty\n", |
1921 | __func__, idx); | 1923 | __func__, idx); |
1922 | s3c_hsotg_trytx(hsotg, hs_ep); | 1924 | if (!using_dma(hsotg)) |
1925 | s3c_hsotg_trytx(hsotg, hs_ep); | ||
1923 | } | 1926 | } |
1924 | } | 1927 | } |
1925 | } | 1928 | } |