usb: qti_gadget: Select LLCC TCM memory for USB RMNET IN buffers

This change calls available API from USB GSI function driver to
select LLCC TCM memory for USB RMNET IN buffers when property
"qcom,rmnet_in_use_tcm_mem" is set with RMNET USB composition
device tree child node of qti_gadget node.

Change-Id: Ic2c3c2fb438801ebbefe15f30b92364a07059df7
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
This commit is contained in:
Mayank Rana 2021-05-25 11:50:05 -07:00
commit dddcd91291

View file

@ -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;
}