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

Commit 6ca239c9 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: ipa: Add support in ipa-mhi driver for cv2x"

parents a92aaeac f109cf60
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -66,8 +66,8 @@
#define IPA_MHI_SUSPEND_SLEEP_MIN 900
#define IPA_MHI_SUSPEND_SLEEP_MAX 1100

#define IPA_MHI_MAX_UL_CHANNELS 1
#define IPA_MHI_MAX_DL_CHANNELS 2
#define IPA_MHI_MAX_UL_CHANNELS 2
#define IPA_MHI_MAX_DL_CHANNELS 3

/* bit #40 in address should be asserted for MHI transfers over pcie */
#define IPA_MHI_CLIENT_HOST_ADDR_COND(addr) \
+11 −2
Original line number Diff line number Diff line
@@ -2854,9 +2854,14 @@ void ipa3_q6_pre_shutdown_cleanup(void)

	ipa3_q6_pipe_delay(true);
	ipa3_q6_avoid_holb();
	if (ipa3_ctx->ipa_config_is_mhi)
	if (ipa3_ctx->ipa_config_is_mhi) {
		ipa3_set_reset_client_cons_pipe_sus_holb(true,
		IPA_CLIENT_MHI_CONS);
		if (ipa3_ctx->ipa_config_is_auto)
			ipa3_set_reset_client_cons_pipe_sus_holb(true,
				IPA_CLIENT_MHI2_CONS);
	}

	if (ipa3_q6_clean_q6_tables()) {
		IPAERR("Failed to clean Q6 tables\n");
		BUG();
@@ -2874,9 +2879,13 @@ void ipa3_q6_pre_shutdown_cleanup(void)
	if (ipa3_ctx->ipa_config_is_auto)
		ipa3_set_reset_client_prod_pipe_delay(true,
		IPA_CLIENT_USB2_PROD);
	if (ipa3_ctx->ipa_config_is_mhi)
	if (ipa3_ctx->ipa_config_is_mhi) {
		ipa3_set_reset_client_prod_pipe_delay(true,
		IPA_CLIENT_MHI_PROD);
		if (ipa3_ctx->ipa_config_is_auto)
			ipa3_set_reset_client_prod_pipe_delay(true,
				IPA_CLIENT_MHI2_PROD);
	}

	IPA_ACTIVE_CLIENTS_DEC_SIMPLE();
	IPADBG_LOW("Exit with success\n");
+12 −2
Original line number Diff line number Diff line
/* Copyright (c) 2015-2018 The Linux Foundation. All rights reserved.
/* Copyright (c) 2015-2019 The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -383,6 +383,7 @@ int ipa3_mhi_init_engine(struct ipa_mhi_init_engine *params)
	int res;
	struct gsi_device_scratch gsi_scratch;
	const struct ipa_gsi_ep_config *gsi_ep_info;
	u32 ipa_mhi_max_ul_channels, ipa_mhi_max_dl_channels;

	IPA_MHI_FUNC_ENTRY();

@@ -391,7 +392,16 @@ int ipa3_mhi_init_engine(struct ipa_mhi_init_engine *params)
		return -EINVAL;
	}

	if ((IPA_MHI_MAX_UL_CHANNELS + IPA_MHI_MAX_DL_CHANNELS) >
	ipa_mhi_max_ul_channels = IPA_MHI_MAX_UL_CHANNELS;
	ipa_mhi_max_dl_channels = IPA_MHI_MAX_DL_CHANNELS;

	/* In case of Auto-pcie config, MHI2_PROD and MHI2_CONS is used */
	if (ipa3_ctx->ipa_config_is_auto == true) {
		ipa_mhi_max_ul_channels++;
		ipa_mhi_max_dl_channels++;
	}

	if ((ipa_mhi_max_ul_channels + ipa_mhi_max_dl_channels) >
		((ipa3_ctx->mhi_evid_limits[1] -
		ipa3_ctx->mhi_evid_limits[0]) + 1)) {
		IPAERR("Not enough event rings for MHI\n");
+2 −0
Original line number Diff line number Diff line
@@ -418,6 +418,8 @@ enum ipa_client_type {
#define IPA_CLIENT_IS_MHI(client) \
	((client) == IPA_CLIENT_MHI_CONS || \
	(client) == IPA_CLIENT_MHI_PROD || \
	(client) == IPA_CLIENT_MHI2_PROD || \
	(client) == IPA_CLIENT_MHI2_CONS || \
	(client) == IPA_CLIENT_MHI_DPL_CONS)

#define IPA_CLIENT_IS_TEST_PROD(client) \