Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dddcd912 authored by Mayank Rana's avatar Mayank Rana
Browse files

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: default avatarMayank Rana <mrana@codeaurora.org>
parent 8f812be3
Loading
Loading
Loading
Loading
+11 −0
Original line number Original line Diff line number Diff line
@@ -9,6 +9,7 @@
#include <linux/platform_device.h>
#include <linux/platform_device.h>
#include <linux/of.h>
#include <linux/of.h>
#include <linux/kernel.h>
#include <linux/kernel.h>
#include <linux/usb/dwc3-msm.h>


struct qti_usb_function {
struct qti_usb_function {
	struct usb_function_instance *fi;
	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);
		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;
	return 0;
}
}