diff options
author | Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> | 2014-11-28 14:51:01 +0100 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2015-01-12 12:13:28 -0600 |
commit | d82f3db266f3be7f85de33905dba2a6caccb97f0 (patch) | |
tree | f9588e9caad864f7699b2881d28865bebdd55c1f /drivers/usb/gadget/udc/net2280.c | |
parent | 43780aaa1c23c572ef57267d43d520affa7b4723 (diff) | |
download | op-kernel-dev-d82f3db266f3be7f85de33905dba2a6caccb97f0.zip op-kernel-dev-d82f3db266f3be7f85de33905dba2a6caccb97f0.tar.gz |
usb: gadget: udc: net2280: Move ASSERT_OUT_NAKING into out_flush
ASSERT_OUT_NAKING was only called by out_flush and was hidden behind a
ifdef.
This patch moves the inline function into out_flush and remove the
ifdef. The user can decide to print the debug message or not via dynamic
printk
Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/gadget/udc/net2280.c')
-rw-r--r-- | drivers/usb/gadget/udc/net2280.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/usb/gadget/udc/net2280.c b/drivers/usb/gadget/udc/net2280.c index a978e6e..b1c253e 100644 --- a/drivers/usb/gadget/udc/net2280.c +++ b/drivers/usb/gadget/udc/net2280.c @@ -575,9 +575,15 @@ static void out_flush(struct net2280_ep *ep) u32 __iomem *statp; u32 tmp; - ASSERT_OUT_NAKING(ep); - statp = &ep->regs->ep_stat; + + tmp = readl(statp); + if (tmp & BIT(NAK_OUT_PACKETS)) { + ep_dbg(ep->dev, "%s %s %08x !NAK\n", + ep->ep.name, __func__, tmp); + writel(BIT(SET_NAK_OUT_PACKETS), &ep->regs->ep_rsp); + } + writel(BIT(DATA_OUT_PING_TOKEN_INTERRUPT) | BIT(DATA_PACKET_RECEIVED_INTERRUPT), statp); |