Skip to content

Commit 4e0dcf6

Browse files
aspeedtechgregkh
authored andcommitted
usb: gadget: aspeed: fix stop dma register setting.
The vhub engine has two dma mode, one is descriptor list, another is single stage DMA. Each mode has different stop register setting. Descriptor list operation (bit2) : 0 disable reset, 1: enable reset Single mode operation (bit0) : 0 : disable, 1: enable Fixes: 7ecca2a ("usb/gadget: Add driver for Aspeed SoC virtual hub") Cc: stable <[email protected]> Acked-by: Felipe Balbi <[email protected]> Acked-by: Joel Stanley <[email protected]> Signed-off-by: Ryan Chen <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 643a4df commit 4e0dcf6

File tree

1 file changed

+4
-1
lines changed
  • drivers/usb/gadget/udc/aspeed-vhub

1 file changed

+4
-1
lines changed

drivers/usb/gadget/udc/aspeed-vhub/epn.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,10 @@ static void ast_vhub_stop_active_req(struct ast_vhub_ep *ep,
420420
u32 state, reg, loops;
421421

422422
/* Stop DMA activity */
423-
writel(0, ep->epn.regs + AST_VHUB_EP_DMA_CTLSTAT);
423+
if (ep->epn.desc_mode)
424+
writel(VHUB_EP_DMA_CTRL_RESET, ep->epn.regs + AST_VHUB_EP_DMA_CTLSTAT);
425+
else
426+
writel(0, ep->epn.regs + AST_VHUB_EP_DMA_CTLSTAT);
424427

425428
/* Wait for it to complete */
426429
for (loops = 0; loops < 1000; loops++) {

0 commit comments

Comments
 (0)