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

Commit e6c311a9 authored by Amir Levy's avatar Amir Levy Committed by Gerrit - the friendly Code Review server
Browse files

msm: ipa: remove obsolete RG10 workaround



IPA RG10 issue is irrelevant anymore.
Remove the obsolete workaround of it.

Acked-by: default avatarMichal Amsterdam <mamsterd@qti.qualcomm.com>
Change-Id: Iad825b1eb1eb2bef0295fa6409f067848274cc8b
Signed-off-by: default avatarAmir Levy <alevy@codeaurora.org>
parent 28ca9870
Loading
Loading
Loading
Loading
+8 −10
Original line number Diff line number Diff line
@@ -4663,15 +4663,11 @@ static int ipa3_post_init(const struct ipa3_plat_drv_res *resource_p,
		flt_tbl->rule_ids = &ipa3_ctx->flt_rule_ids[IPA_IP_v6];
	}

	if (!ipa3_ctx->apply_rg10_wa) {
	result = ipa3_init_interrupts();
	if (result) {
		IPAERR("ipa initialization of interrupts failed\n");
		result = -ENODEV;
			goto fail_register_device;
		}
	} else {
		IPADBG("Initialization of ipa interrupts skipped\n");
		goto fail_init_interrupts;
	}

	/*
@@ -4801,6 +4797,9 @@ static int ipa3_post_init(const struct ipa3_plat_drv_res *resource_p,
	gsi_deregister_device(ipa3_ctx->gsi_dev_hdl, false);
fail_register_device:
	ipa3_destroy_flt_tbl_idrs();
fail_init_interrupts:
	 ipa3_remove_interrupt_handler(IPA_TX_SUSPEND_IRQ);
	 ipa3_interrupts_destroy(ipa3_res.ipa_irq, &ipa3_ctx->master_pdev->dev);
fail_allok_pkt_init:
	ipa3_nat_ipv6ct_destroy_devices();
fail_nat_ipv6ct_init_dev:
@@ -5181,7 +5180,6 @@ static int ipa3_pre_init(const struct ipa3_plat_drv_res *resource_p,
	ipa3_ctx->skip_uc_pipe_reset = resource_p->skip_uc_pipe_reset;
	ipa3_ctx->tethered_flow_control = resource_p->tethered_flow_control;
	ipa3_ctx->ee = resource_p->ee;
	ipa3_ctx->apply_rg10_wa = resource_p->apply_rg10_wa;
	ipa3_ctx->gsi_ch20_wa = resource_p->gsi_ch20_wa;
	ipa3_ctx->use_ipa_pm = resource_p->use_ipa_pm;
	ipa3_ctx->wdi_over_pcie = resource_p->wdi_over_pcie;
+0 −13
Original line number Diff line number Diff line
@@ -107,19 +107,6 @@ int ipa3_disable_data_path(u32 clnt_hdl)
	if (ipa3_ctx->ipa_hw_type < IPA_HW_v4_0) {
		/* Suspend the pipe */
		if (IPA_CLIENT_IS_CONS(ep->client)) {
			/*
			 * for RG10 workaround uC needs to be loaded before
			 * pipe can be suspended in this case.
			 */
			if (ipa3_ctx->apply_rg10_wa && ipa3_uc_state_check()) {
				IPADBG("uC is not loaded yet, waiting...\n");
				res = wait_for_completion_timeout(
					&ipa3_ctx->uc_loaded_completion_obj,
					60 * HZ);
				if (res == 0)
					IPADBG("timeout waiting for uC load\n");
			}

			memset(&ep_cfg_ctrl, 0, sizeof(struct ipa_ep_cfg_ctrl));
			ep_cfg_ctrl.ipa_ep_suspend = true;
			res = ipa3_cfg_ep_ctrl(clnt_hdl, &ep_cfg_ctrl);
+0 −2
Original line number Diff line number Diff line
@@ -2495,7 +2495,6 @@ int ipa3_uc_interface_init(void);
int ipa3_uc_is_gsi_channel_empty(enum ipa_client_type ipa_client);
int ipa3_uc_state_check(void);
int ipa3_uc_loaded_check(void);
void ipa3_uc_load_notify(void);
int ipa3_uc_send_cmd(u32 cmd, u32 opcode, u32 expected_status,
		    bool polling_mode, unsigned long timeout_jiffies);
void ipa3_uc_register_handlers(enum ipa3_hw_features feature,
@@ -2526,7 +2525,6 @@ int ipa3_uc_send_remote_ipa_info(u32 remote_addr, uint32_t mbox_n);
void ipa3_tag_destroy_imm(void *user1, int user2);
const struct ipa_gsi_ep_config *ipa3_get_gsi_ep_info
	(enum ipa_client_type client);
void ipa3_uc_rg10_write_reg(enum ipahal_reg_name reg, u32 n, u32 val);

/* Hardware stats */

+6 −26
Original line number Diff line number Diff line
@@ -136,20 +136,6 @@ static int ipa3_handle_interrupt(int irq_num, bool isr_context)
		suspend_interrupt_data->endpoints = suspend_data;
		interrupt_data = suspend_interrupt_data;
		break;
	case IPA_UC_IRQ_0:
		if (ipa3_ctx->apply_rg10_wa) {
			/*
			 * Early detect of uC crash. If RG10 workaround is
			 * enable uC crash will not be detected as before
			 * processing uC event the interrupt is cleared using
			 * uC register write which times out as it crashed
			 * already.
			 */
			if (ipa3_ctx->uc_ctx.uc_sram_mmio->eventOp ==
			    IPA_HW_2_CPU_EVENT_ERROR)
				ipa3_ctx->uc_ctx.uc_failed = true;
		}
		break;
	default:
		break;
	}
@@ -212,7 +198,7 @@ static void ipa3_enable_tx_suspend_wa(struct work_struct *work)
	en |= suspend_bmask;
	IPADBG("enable TX_SUSPEND_IRQ, IPA_IRQ_EN_EE reg, write val = %u\n"
		, en);
	ipa3_uc_rg10_write_reg(IPA_IRQ_EN_EE_n, ipa_ee, en);
	ipahal_write_reg_n(IPA_IRQ_EN_EE_n, ipa_ee, en);
	ipa3_process_interrupts(false);
	IPA_ACTIVE_CLIENTS_DEC_SIMPLE();

@@ -240,7 +226,7 @@ static void ipa3_tx_suspend_interrupt_wa(void)
	val &= ~suspend_bmask;
	IPADBG("Disabling TX_SUSPEND_IRQ, write val: %u to IPA_IRQ_EN_EE reg\n",
		val);
	ipa3_uc_rg10_write_reg(IPA_IRQ_EN_EE_n, ipa_ee, val);
	ipahal_write_reg_n(IPA_IRQ_EN_EE_n, ipa_ee, val);

	IPADBG_LOW(" processing suspend interrupt work-around, delayed work\n");

@@ -295,7 +281,7 @@ static void ipa3_process_interrupts(bool isr_context)
				 * clearing unhandled interrupts
				 */
				if (uc_irq)
					ipa3_uc_rg10_write_reg(IPA_IRQ_CLR_EE_n,
					ipahal_write_reg_n(IPA_IRQ_CLR_EE_n,
							ipa_ee, bmsk);

				/*
@@ -314,17 +300,11 @@ static void ipa3_process_interrupts(bool isr_context)
				 * to avoid clearing interrupt data
				 */
				if (!uc_irq)
					ipa3_uc_rg10_write_reg(IPA_IRQ_CLR_EE_n,
					ipahal_write_reg_n(IPA_IRQ_CLR_EE_n,
							ipa_ee, bmsk);
			}
			bmsk = bmsk << 1;
		}
		/*
		 * In case uC failed interrupt cannot be cleared.
		 * Device will crash as part of handling uC event handler.
		 */
		if (ipa3_ctx->apply_rg10_wa && ipa3_ctx->uc_ctx.uc_failed)
			break;

		reg = ipahal_read_reg_n(IPA_IRQ_STTS_EE_n, ipa_ee);
		/* since the suspend interrupt HW bug we must
@@ -416,7 +396,7 @@ int ipa3_add_interrupt_handler(enum ipa_irq_type interrupt,
	IPADBG("read IPA_IRQ_EN_EE_n register. reg = %d\n", val);
	bmsk = 1 << irq_num;
	val |= bmsk;
	ipa3_uc_rg10_write_reg(IPA_IRQ_EN_EE_n, ipa_ee, val);
	ipahal_write_reg_n(IPA_IRQ_EN_EE_n, ipa_ee, val);
	IPADBG("wrote IPA_IRQ_EN_EE_n register. reg = %d\n", val);

	/* register SUSPEND_IRQ_EN_EE_n_ADDR for L2 interrupt*/
@@ -482,7 +462,7 @@ int ipa3_remove_interrupt_handler(enum ipa_irq_type interrupt)
	val = ipahal_read_reg_n(IPA_IRQ_EN_EE_n, ipa_ee);
	bmsk = 1 << irq_num;
	val &= ~bmsk;
	ipa3_uc_rg10_write_reg(IPA_IRQ_EN_EE_n, ipa_ee, val);
	ipahal_write_reg_n(IPA_IRQ_EN_EE_n, ipa_ee, val);

	return 0;
}
+0 −12
Original line number Diff line number Diff line
@@ -235,11 +235,6 @@ static void ipa3_handle_modem_init_cmplt_req(struct qmi_handle *qmi_handle,

	if (!ipa3_modem_init_cmplt) {
		ipa3_modem_init_cmplt = true;
		if (ipa3_qmi_modem_init_fin) {
			IPAWANDBG("load uc related registers (%d)\n",
			ipa3_qmi_modem_init_fin);
			ipa3_uc_load_notify();
		}
	}

	memset(&resp, 0, sizeof(resp));
@@ -1116,13 +1111,6 @@ static void ipa3_q6_clnt_svc_arrive(struct work_struct *work)

	ipa3_qmi_modem_init_fin = true;

	/* got modem_init_cmplt_req already, load uc-related register */
	if (ipa3_modem_init_cmplt) {
		IPAWANDBG("load uc related registers (%d)\n",
		ipa3_modem_init_cmplt);
			ipa3_uc_load_notify();
	}

	/* In cold-bootup, first_time_handshake = false */
	ipa3_q6_handshake_complete(first_time_handshake);
	first_time_handshake = true;
Loading