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

Commit 8920695f authored by Ghanim Fodi's avatar Ghanim Fodi
Browse files

msm: ipa: Update IPA_UC_MAILBOX_m_n register offset



At IPA4.5 register IPA_UC_MAILBOX_m_n offset changed
as uC area offset changed. This change adapts the
code accordingly.

CRs-Fixed: 2303588
Change-Id: Ie55751386d2d8aa2f0d79c47f18890f013baf6bf
Signed-off-by: default avatarGhanim Fodi <gfodi@codeaurora.org>
parent f694d143
Loading
Loading
Loading
Loading
+10 −3
Original line number Diff line number Diff line
@@ -73,7 +73,8 @@ static void ipa3_deferred_interrupt_work(struct work_struct *work)
			container_of(work,
			struct ipa3_interrupt_work_wrap,
			interrupt_work);
	IPADBG("call handler from workq...\n");
	IPADBG("call handler from workq... interrupt=%d\n",
		work_data->interrupt);
	work_data->handler(work_data->interrupt, work_data->private_data,
			work_data->interrupt_data);
	kfree(work_data->interrupt_data);
@@ -111,7 +112,7 @@ static int ipa3_handle_interrupt(int irq_num, bool isr_context)

	switch (interrupt_info.interrupt) {
	case IPA_TX_SUSPEND_IRQ:
		IPADBG_LOW("processing TX_SUSPEND interrupt work-around\n");
		IPADBG_LOW("processing TX_SUSPEND interrupt\n");
		ipa3_tx_suspend_interrupt_wa();
		suspend_data = ipahal_read_reg_n(IPA_IRQ_SUSPEND_INFO_EE_n,
			ipa_ee);
@@ -154,6 +155,8 @@ static int ipa3_handle_interrupt(int irq_num, bool isr_context)

	/* Force defer processing if in ISR context. */
	if (interrupt_info.deferred_flag || isr_context) {
		IPADBG_LOW("Defer handling interrupt %d\n",
			interrupt_info.interrupt);
		work_data = kzalloc(sizeof(struct ipa3_interrupt_work_wrap),
				GFP_ATOMIC);
		if (!work_data) {
@@ -170,6 +173,7 @@ static int ipa3_handle_interrupt(int irq_num, bool isr_context)
		queue_work(ipa_interrupt_wq, &work_data->interrupt_work);

	} else {
		IPADBG_LOW("Handle interrupt %d\n", interrupt_info.interrupt);
		interrupt_info.handler(interrupt_info.interrupt,
			interrupt_info.private_data,
			interrupt_data);
@@ -261,15 +265,18 @@ static void ipa3_process_interrupts(bool isr_context)
	unsigned long flags;
	bool uc_irq;

	IPADBG_LOW("Enter\n");
	IPADBG_LOW("Enter isr_context=%d\n", isr_context);

	spin_lock_irqsave(&suspend_wa_lock, flags);
	en = ipahal_read_reg_n(IPA_IRQ_EN_EE_n, ipa_ee);
	reg = ipahal_read_reg_n(IPA_IRQ_STTS_EE_n, ipa_ee);
	while (en & reg) {
		IPADBG_LOW("en=0x%x reg=0x%x\n", en, reg);
		bmsk = 1;
		for (i = 0; i < IPA_IRQ_NUM_MAX; i++) {
			IPADBG_LOW("Check irq num %d\n", i);
			if (en & reg & bmsk) {
				IPADBG_LOW("irq num %d asserted\n", i);
				uc_irq = is_uc_irq(i);

				/*
+3 −0
Original line number Diff line number Diff line
@@ -3036,6 +3036,9 @@ static struct ipahal_reg_obj ipahal_reg_objs[IPA_HW_MAX][IPA_REG_MAX] = {
		ipareg_construct_endp_init_hdr_metadata_mask_n,
		ipareg_parse_dummy,
		0x00000818, 0x70, 13, 31, 1},
	[IPA_HW_v4_5][IPA_UC_MAILBOX_m_n] = {
		ipareg_construct_dummy, ipareg_parse_dummy,
		0x00082000, 0x4, 0, 0, 0},
};

/*