msm: ipa4: add a dummy function to IPAHAL immediate commands
Immediate commands might become obsolete with new IPA HW versions.
Add a dummy function with a warning in case any upper layer tries
to send an obsolete immediate command.
Change-Id: I5931112412480daf03457c89a7d43eb0aa644187
Signed-off-by: Amir Levy <alevy@codeaurora.org>
diff --git a/drivers/platform/msm/ipa/ipa_v3/ipahal/ipahal.c b/drivers/platform/msm/ipa/ipa_v3/ipahal/ipahal.c
index 56fed2a..a8d5342 100644
--- a/drivers/platform/msm/ipa/ipa_v3/ipahal/ipahal.c
+++ b/drivers/platform/msm/ipa/ipa_v3/ipahal/ipahal.c
@@ -595,6 +595,15 @@
return pyld;
}
+static struct ipahal_imm_cmd_pyld *ipa_imm_cmd_construct_dummy(
+ enum ipahal_imm_cmd_name cmd, const void *params, bool is_atomic_ctx)
+{
+ IPAHAL_ERR("no construct function for IMM_CMD=%s, IPA ver %d\n",
+ ipahal_imm_cmd_name_str(cmd), ipahal_ctx->hw_type);
+ WARN_ON(1);
+ return NULL;
+}
+
/*
* struct ipahal_imm_cmd_obj - immediate command H/W information for
* specific IPA version
@@ -668,8 +677,8 @@
12},
/* NAT_DMA was renamed to TABLE_DMA for IPAv4 */
[IPA_HW_v4_0][IPA_IMM_CMD_NAT_DMA] = {
- NULL,
- -1 },
+ ipa_imm_cmd_construct_dummy,
+ -1},
[IPA_HW_v4_0][IPA_IMM_CMD_TABLE_DMA] = {
ipa_imm_cmd_construct_table_dma_ipav4,
14},