diff options
author | Dmitry Osipenko <digetx@gmail.com> | 2017-08-16 06:32:39 -0400 |
---|---|---|
committer | Peter Chen <peter.chen@nxp.com> | 2017-08-24 05:40:42 -0400 |
commit | 581821ae7f7e2c4547945c65f1bcd357f5915aa5 (patch) | |
tree | 0d41d8f23c0563c15b8374100ec85895afe743c4 /drivers/usb/chipidea/udc.c | |
parent | 7c3a8b81503ce8e6ab22341f0267d30085d17194 (diff) |
usb: chipidea: udc: Support SKB alignment quirk
NVIDIA Tegra20 UDC can't cope with unaligned DMA and require a USB gadget
quirk that avoids SKB buffer alignment to be set in order to make Ethernet
Gadget working. Later Tegra generations do not require that quirk. Let's
add a new platform data flag that allows to enable USB gadget quirk for
platforms that require it.
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Acked-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
Diffstat (limited to 'drivers/usb/chipidea/udc.c')
-rw-r--r-- | drivers/usb/chipidea/udc.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c index 6502c13331e8..fe8a90543ea3 100644 --- a/drivers/usb/chipidea/udc.c +++ b/drivers/usb/chipidea/udc.c | |||
@@ -1896,6 +1896,9 @@ static int udc_start(struct ci_hdrc *ci) | |||
1896 | ci->gadget.name = ci->platdata->name; | 1896 | ci->gadget.name = ci->platdata->name; |
1897 | ci->gadget.otg_caps = otg_caps; | 1897 | ci->gadget.otg_caps = otg_caps; |
1898 | 1898 | ||
1899 | if (ci->platdata->flags & CI_HDRC_REQUIRES_ALIGNED_DMA) | ||
1900 | ci->gadget.quirk_avoids_skb_reserve = 1; | ||
1901 | |||
1899 | if (ci->is_otg && (otg_caps->hnp_support || otg_caps->srp_support || | 1902 | if (ci->is_otg && (otg_caps->hnp_support || otg_caps->srp_support || |
1900 | otg_caps->adp_support)) | 1903 | otg_caps->adp_support)) |
1901 | ci->gadget.is_otg = 1; | 1904 | ci->gadget.is_otg = 1; |