mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 13:49:24 -04:00
Merge "usb: qti_gadget: Select LLCC TCM memory for USB RMNET IN buffers"
This commit is contained in:
commit
be364d33a5
3 changed files with 28 additions and 0 deletions
|
|
@ -3010,6 +3010,15 @@ static void gsi_get_ether_addr(const char *str, u8 *dev_addr)
|
|||
random_ether_addr(dev_addr);
|
||||
}
|
||||
|
||||
void rmnet_gsi_update_in_buffer_mem_type(struct usb_function *f, bool use_tcm)
|
||||
{
|
||||
struct f_gsi *gsi = func_to_gsi(f);
|
||||
|
||||
if (gsi && gsi->prot_id == IPA_USB_RMNET)
|
||||
gsi->rmnet_use_tcm_mem = use_tcm;
|
||||
}
|
||||
EXPORT_SYMBOL(rmnet_gsi_update_in_buffer_mem_type);
|
||||
|
||||
static int gsi_bind(struct usb_configuration *c, struct usb_function *f)
|
||||
{
|
||||
struct usb_composite_dev *cdev = c->cdev;
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@
|
|||
#include <linux/platform_device.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/usb/dwc3-msm.h>
|
||||
|
||||
struct qti_usb_function {
|
||||
struct usb_function_instance *fi;
|
||||
|
|
@ -322,6 +323,16 @@ static int qti_usb_func_alloc(struct qti_usb_config *qcfg,
|
|||
memcpy(cdev->qw_sign, qw_sign, QW_SIGN_LEN);
|
||||
}
|
||||
|
||||
#if IS_ENABLED(CONFIG_USB_F_GSI)
|
||||
struct qti_usb_gadget *qg;
|
||||
|
||||
if (!strcmp(instance_name, "rmnet")) {
|
||||
qg = container_of(cdev, struct qti_usb_gadget, cdev);
|
||||
rmnet_gsi_update_in_buffer_mem_type(f,
|
||||
of_property_read_bool(qg->cfg_node,
|
||||
"qcom,rmnet_in_use_tcm_mem"));
|
||||
}
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -164,4 +164,12 @@ static bool __maybe_unused usb_get_remote_wakeup_status(struct usb_gadget *gadge
|
|||
{ return false; }
|
||||
#endif
|
||||
|
||||
#if IS_ENABLED(CONFIG_USB_F_GSI)
|
||||
void rmnet_gsi_update_in_buffer_mem_type(struct usb_function *f, bool use_tcm);
|
||||
#else
|
||||
static inline __maybe_unused void rmnet_gsi_update_in_buffer_mem_type(
|
||||
struct usb_function *f, bool use_tcm)
|
||||
{ }
|
||||
#endif
|
||||
|
||||
#endif /* __LINUX_USB_DWC3_MSM_H */
|
||||
|
|
|
|||
Loading…
Reference in a new issue