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

Commit bee0de01 authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: ipa: enable mhi prime manager for IPA4.5 APQ"

parents a17bfafe acc294eb
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -495,6 +495,7 @@ CONFIG_IPA3=y
CONFIG_IPA_WDI_UNIFIED_API=y
CONFIG_RMNET_IPA3=y
CONFIG_RNDIS_IPA=y
CONFIG_IPA3_MHI_PRIME_MANAGER=y
CONFIG_IPA_UT=y
CONFIG_MSM_11AD=m
CONFIG_USB_BAM=y
+9 −0
Original line number Diff line number Diff line
@@ -143,6 +143,15 @@ config IPA3_MHI_PROXY
	  the MHI device without AP involvement, with the exception of
	  power management.

config IPA3_MHI_PRIME_MANAGER
	tristate "IPA3_MHI Prime Manager driver"
	depends on IPA3
	help
	  This driver functionality is to setup MHI Prime channels between Host and
	  modem and enable the ability for MHI Prime communication.
	  Once the configuration is done modem will communicate directly with
	  the Host without AP involvement for tethering data offload.

config IPA_UT
	tristate "IPA Unit-Test Framework and Test Suites"
	depends on IPA3 && DEBUG_FS
+5 −0
Original line number Diff line number Diff line
@@ -201,6 +201,11 @@ const char *ipa_clients_strings[IPA_CLIENT_MAX] = {
	__stringify(IPA_CLIENT_WIGIG4_CONS),
	__stringify(RESERVERD_PROD_94),
	__stringify(IPA_CLIENT_APPS_WAN_COAL_CONS),
	__stringify(IPA_CLIENT_MHI_PRIME_RMNET_PROD),
	__stringify(IPA_CLIENT_MHI_PRIME_RMNET_CONS),
	__stringify(IPA_CLIENT_MHI_PRIME_TETH_PROD),
	__stringify(IPA_CLIENT_MHI_PRIME_TETH_CONS),
	__stringify(IPA_CLIENT_MHI_PRIME_DPL_PROD),
};

/**
+34 −2
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2015-2018, The Linux Foundation. All rights reserved.
 * Copyright (c) 2015-2019, The Linux Foundation. All rights reserved.
 */

#include <linux/mutex.h>
@@ -1910,6 +1910,15 @@ static int ipa3_usb_xdci_connect_internal(
		goto connect_dl_fail;
	}

	/* MHIP pipe enablement */
	if (ipa3_is_mhip_offload_enabled()) {
		result = ipa_mpm_mhip_xdci_pipe_enable(params->teth_prot);
		if (result) {
			IPA_USB_ERR("failed to connect MHIP channel\n");
			goto connect_dl_fail;
		}
	}

	/* Connect tethering protocol */
	result = ipa3_usb_connect_teth_prot(params->teth_prot);
	if (result) {
@@ -2403,6 +2412,14 @@ int ipa_usb_xdci_disconnect(u32 ul_clnt_hdl, u32 dl_clnt_hdl,
		if (orig_state != IPA_USB_SUSPENDED) {
			spin_unlock_irqrestore(&ipa3_usb_ctx->state_lock,
				flags);
			/* Stop UL MHIP channel */
			if (ipa3_is_mhip_offload_enabled()) {
				result = ipa_mpm_mhip_ul_data_stop(teth_prot);
				if (result) {
					IPA_USB_ERR("fail UL MHIPData stop\n");
					goto bad_params;
				}
			}
			/* Stop UL channel */
			result = ipa3_xdci_disconnect(ul_clnt_hdl,
				true,
@@ -2422,6 +2439,14 @@ int ipa_usb_xdci_disconnect(u32 ul_clnt_hdl, u32 dl_clnt_hdl,
			teth_prot);
	if (result)
		goto bad_params;
	/* Stop UL/DL MHIP channels */
	if (ipa3_is_mhip_offload_enabled()) {
		result = ipa_mpm_mhip_xdci_pipe_disable(teth_prot);
		if (result) {
			IPA_USB_ERR("failed to disconnect MHIP channel\n");
			goto bad_params;
		}
	}

	/* Disconnect tethering protocol */
	result = ipa3_usb_disconnect_teth_prot(teth_prot);
@@ -2732,7 +2757,14 @@ int ipa_usb_xdci_suspend(u32 ul_clnt_hdl, u32 dl_clnt_hdl,
			&ipa3_usb_notify_remote_wakeup_work);
	}
	spin_unlock_irqrestore(&ipa3_usb_ctx->state_lock, flags);

	/* Stop MHIP channel */
	if (ipa3_is_mhip_offload_enabled()) {
		result = ipa_mpm_mhip_xdci_pipe_disable(teth_prot);
		if (result) {
			IPA_USB_ERR("failed to disconnect MHIP channel\n");
			goto release_prod_fail;
		}
	}
	IPA_USB_DBG_LOW("exit\n");
	mutex_unlock(&ipa3_usb_ctx->general_mutex);
	return 0;
+2 −0
Original line number Diff line number Diff line
@@ -14,6 +14,8 @@ obj-$(CONFIG_RMNET_IPA3) += rmnet_ipa.o ipa_qmi_service_v01.o ipa_qmi_service.o

obj-$(CONFIG_IPA3_MHI_PROXY) += ipa_mhi_proxy.o

obj-$(CONFIG_IPA3_MHI_PRIME_MANAGER) += ipa_mpm.o

ipat-$(CONFIG_IPA3_REGDUMP) += dump/ipa_reg_dump.o

ccflags-$(CONFIG_IPA3_REGDUMP) += -Idrivers/platform/msm/ipa/ipa_v3/dump
Loading