Loading drivers/usb/gadget/ci13xxx_udc.c +6 −1 Original line number Diff line number Diff line Loading @@ -77,6 +77,7 @@ #define USB_MAX_TIMEOUT 25 /* 25msec timeout */ #define EP_PRIME_CHECK_DELAY (jiffies + msecs_to_jiffies(1000)) #define MAX_PRIME_CHECK_RETRY 3 /*Wait for 3sec for EP prime failure */ #define EXTRA_ALLOCATION_SIZE 256 /* ctrl register bank access */ static DEFINE_SPINLOCK(udc_lock); Loading Loading @@ -3572,7 +3573,8 @@ static int ci13xxx_start(struct usb_gadget *gadget, udc->status = usb_ep_alloc_request(&udc->ep0in.ep, GFP_KERNEL); if (!udc->status) return -ENOMEM; udc->status_buf = kzalloc(2, GFP_KERNEL); /* for GET_STATUS */ udc->status_buf = kzalloc(2 + udc->gadget.extra_buf_alloc, GFP_KERNEL); /* for GET_STATUS */ if (!udc->status_buf) { usb_ep_free_request(&udc->ep0in.ep, udc->status); return -ENOMEM; Loading Loading @@ -3861,6 +3863,9 @@ static int udc_probe(struct ci13xxx_udc_driver *driver, struct device *dev, udc->max_nominal_system_clk_rate = pdata->max_nominal_system_clk_rate; udc->default_system_clk_rate = pdata->default_system_clk_rate; if (pdata->enable_axi_prefetch) udc->gadget.extra_buf_alloc = EXTRA_ALLOCATION_SIZE; } if (udc->udc_driver->flags & CI13XXX_REQUIRE_TRANSCEIVER) { Loading drivers/usb/phy/phy-msm-usb.c +1 −0 Original line number Diff line number Diff line Loading @@ -3615,6 +3615,7 @@ static struct platform_device *msm_otg_add_pdev( otg_pdata->enable_ahb2ahb_bypass; ci_pdata.system_clk = otg_pdata->system_clk; ci_pdata.enable_streaming = otg_pdata->enable_streaming; ci_pdata.enable_axi_prefetch = otg_pdata->enable_axi_prefetch; ci_pdata.max_nominal_system_clk_rate = motg->max_nominal_system_clk_rate; ci_pdata.default_system_clk_rate = motg->core_clk_rate; Loading include/linux/usb/gadget.h +3 −0 Original line number Diff line number Diff line Loading @@ -542,6 +542,8 @@ struct usb_gadget_ops { * Used in case of more then one core operates concurrently. * @streaming_enabled: Enable streaming mode with usb core. * @bam2bam_func_enabled; Indicates function using bam2bam is enabled or not. * @extra_buf_alloc: Extra allocation size for AXI prefetch so that out of * boundary access is protected. * * Gadgets have a mostly-portable "gadget driver" implementing device * functions, handling all usb configurations and interfaces. Gadget Loading Loading @@ -588,6 +590,7 @@ struct usb_gadget { bool streaming_enabled; bool l1_supported; bool bam2bam_func_enabled; u32 extra_buf_alloc; }; #define work_to_gadget(w) (container_of((w), struct usb_gadget, work)) Loading include/linux/usb/msm_hsusb.h +1 −0 Original line number Diff line number Diff line Loading @@ -537,6 +537,7 @@ struct ci13xxx_platform_data { struct clk *system_clk; u32 max_nominal_system_clk_rate; u32 default_system_clk_rate; bool enable_axi_prefetch; }; /** Loading Loading
drivers/usb/gadget/ci13xxx_udc.c +6 −1 Original line number Diff line number Diff line Loading @@ -77,6 +77,7 @@ #define USB_MAX_TIMEOUT 25 /* 25msec timeout */ #define EP_PRIME_CHECK_DELAY (jiffies + msecs_to_jiffies(1000)) #define MAX_PRIME_CHECK_RETRY 3 /*Wait for 3sec for EP prime failure */ #define EXTRA_ALLOCATION_SIZE 256 /* ctrl register bank access */ static DEFINE_SPINLOCK(udc_lock); Loading Loading @@ -3572,7 +3573,8 @@ static int ci13xxx_start(struct usb_gadget *gadget, udc->status = usb_ep_alloc_request(&udc->ep0in.ep, GFP_KERNEL); if (!udc->status) return -ENOMEM; udc->status_buf = kzalloc(2, GFP_KERNEL); /* for GET_STATUS */ udc->status_buf = kzalloc(2 + udc->gadget.extra_buf_alloc, GFP_KERNEL); /* for GET_STATUS */ if (!udc->status_buf) { usb_ep_free_request(&udc->ep0in.ep, udc->status); return -ENOMEM; Loading Loading @@ -3861,6 +3863,9 @@ static int udc_probe(struct ci13xxx_udc_driver *driver, struct device *dev, udc->max_nominal_system_clk_rate = pdata->max_nominal_system_clk_rate; udc->default_system_clk_rate = pdata->default_system_clk_rate; if (pdata->enable_axi_prefetch) udc->gadget.extra_buf_alloc = EXTRA_ALLOCATION_SIZE; } if (udc->udc_driver->flags & CI13XXX_REQUIRE_TRANSCEIVER) { Loading
drivers/usb/phy/phy-msm-usb.c +1 −0 Original line number Diff line number Diff line Loading @@ -3615,6 +3615,7 @@ static struct platform_device *msm_otg_add_pdev( otg_pdata->enable_ahb2ahb_bypass; ci_pdata.system_clk = otg_pdata->system_clk; ci_pdata.enable_streaming = otg_pdata->enable_streaming; ci_pdata.enable_axi_prefetch = otg_pdata->enable_axi_prefetch; ci_pdata.max_nominal_system_clk_rate = motg->max_nominal_system_clk_rate; ci_pdata.default_system_clk_rate = motg->core_clk_rate; Loading
include/linux/usb/gadget.h +3 −0 Original line number Diff line number Diff line Loading @@ -542,6 +542,8 @@ struct usb_gadget_ops { * Used in case of more then one core operates concurrently. * @streaming_enabled: Enable streaming mode with usb core. * @bam2bam_func_enabled; Indicates function using bam2bam is enabled or not. * @extra_buf_alloc: Extra allocation size for AXI prefetch so that out of * boundary access is protected. * * Gadgets have a mostly-portable "gadget driver" implementing device * functions, handling all usb configurations and interfaces. Gadget Loading Loading @@ -588,6 +590,7 @@ struct usb_gadget { bool streaming_enabled; bool l1_supported; bool bam2bam_func_enabled; u32 extra_buf_alloc; }; #define work_to_gadget(w) (container_of((w), struct usb_gadget, work)) Loading
include/linux/usb/msm_hsusb.h +1 −0 Original line number Diff line number Diff line Loading @@ -537,6 +537,7 @@ struct ci13xxx_platform_data { struct clk *system_clk; u32 max_nominal_system_clk_rate; u32 default_system_clk_rate; bool enable_axi_prefetch; }; /** Loading