提交 7fcbc95c 编写于 作者: G Gregory Herrero 提交者: Felipe Balbi

usb: dwc2: gadget: reset fifo_map when initializing fifos

After all endpoints are disabled, fifo_map should have reached 0.
Its a bug if if didn't, so warn about it and reset it to 0 so that
driver can continue using all the fifos.
Tested-by: NRobert Baldyga <r.baldyga@samsung.com>
Acked-by: NPaul Zimmerman <paulz@synopsys.com>
Signed-off-by: NGregory Herrero <gregory.herrero@intel.com>
Signed-off-by: NMian Yousaf Kaukab <yousaf.kaukab@intel.com>
Signed-off-by: NFelipe Balbi <balbi@ti.com>
上级 4556e12c
无相关合并请求
......@@ -177,6 +177,10 @@ static void s3c_hsotg_init_fifo(struct dwc2_hsotg *hsotg)
int timeout;
u32 val;
/* Reset fifo map if not correctly cleared during previous session */
WARN_ON(hsotg->fifo_map);
hsotg->fifo_map = 0;
/* set RX/NPTX FIFO sizes */
writel(hsotg->g_rx_fifo_sz, hsotg->regs + GRXFSIZ);
writel((hsotg->g_rx_fifo_sz << FIFOSIZE_STARTADDR_SHIFT) |
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
反馈
建议
客服 返回
顶部