提交 1fa07c37 编写于 作者: P Peter Ujfalusi 提交者: Greg Kroah-Hartman

usb: musb: Add quirk to avoid skb reserve in gadget mode

For tusb6010 the DMA functionality only possible if the buffer is 32bit
aligned (SYNC access to FIFO) since with ASYNC access the TX/RX offset
registers will corrupt eventually.
The MUSB_G_NO_SKB_RESERVE will set the quirk_avoids_skb_reserve flag in
usb_gadget struct to provide correctly aligned buffer.
Signed-off-by: NPeter Ujfalusi <peter.ujfalusi@ti.com>
Tested-by: NTony Lindgren <tony@atomide.com>
Signed-off-by: NBin Liu <b-liu@ti.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 9816c09e
...@@ -2224,6 +2224,9 @@ musb_init_controller(struct device *dev, int nIrq, void __iomem *ctrl) ...@@ -2224,6 +2224,9 @@ musb_init_controller(struct device *dev, int nIrq, void __iomem *ctrl)
musb->io.ep_select = musb_flat_ep_select; musb->io.ep_select = musb_flat_ep_select;
} }
if (musb->io.quirks & MUSB_G_NO_SKB_RESERVE)
musb->g.quirk_avoids_skb_reserve = 1;
/* At least tusb6010 has its own offsets */ /* At least tusb6010 has its own offsets */
if (musb->ops->ep_offset) if (musb->ops->ep_offset)
musb->io.ep_offset = musb->ops->ep_offset; musb->io.ep_offset = musb->ops->ep_offset;
......
...@@ -172,6 +172,7 @@ struct musb_io; ...@@ -172,6 +172,7 @@ struct musb_io;
*/ */
struct musb_platform_ops { struct musb_platform_ops {
#define MUSB_G_NO_SKB_RESERVE BIT(9)
#define MUSB_DA8XX BIT(8) #define MUSB_DA8XX BIT(8)
#define MUSB_PRESERVE_SESSION BIT(7) #define MUSB_PRESERVE_SESSION BIT(7)
#define MUSB_DMA_UX500 BIT(6) #define MUSB_DMA_UX500 BIT(6)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册