summaryrefslogtreecommitdiffstats
path: root/drivers/net/ipa/ipa_cmd.h
diff options
context:
space:
mode:
authorAlex Elder <elder@linaro.org>2022-10-21 21:13:38 +0200
committerPaolo Abeni <pabeni@redhat.com>2022-10-25 11:15:19 +0200
commit7fd10a2aca6a2ff3316fac7fb2a72f6e1b303a57 (patch)
tree1071ea656fa951c32c0ec1a0897f012b9ece03a2 /drivers/net/ipa/ipa_cmd.h
parentnet: ipa: verify table sizes fit in commands early (diff)
downloadlinux-7fd10a2aca6a2ff3316fac7fb2a72f6e1b303a57.tar.xz
linux-7fd10a2aca6a2ff3316fac7fb2a72f6e1b303a57.zip
net: ipa: introduce ipa_cmd_init()
Currently, ipa_cmd_data_valid() is called by ipa_mem_config(). Nothing it does requires access to hardware though, so it can be done during the init phase of IPA driver startup. Create a new function ipa_cmd_init(), whose purpose is to do early initialization related to IPA immediate commands. It will call the build-time validation function, then will make the two calls made previously by ipa_cmd_data_valid(). This make ipa_cmd_data_valid() unnecessary, so get rid of it. Rename ipa_cmd_header_valid() to be ipa_cmd_header_init_local_valid(), so its name is clearer about which IPA immediate command it is associated with. Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'drivers/net/ipa/ipa_cmd.h')
-rw-r--r--drivers/net/ipa/ipa_cmd.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/net/ipa/ipa_cmd.h b/drivers/net/ipa/ipa_cmd.h
index d03cc619e2c3..e2cf1c2b0ef2 100644
--- a/drivers/net/ipa/ipa_cmd.h
+++ b/drivers/net/ipa/ipa_cmd.h
@@ -162,4 +162,14 @@ void ipa_cmd_pipeline_clear_wait(struct ipa *ipa);
*/
struct gsi_trans *ipa_cmd_trans_alloc(struct ipa *ipa, u32 tre_count);
+/**
+ * ipa_cmd_init() - Initialize IPA immediate commands
+ * @ipa: - IPA pointer
+ *
+ * Return: 0 if successful, or a negative error code
+ *
+ * There is no need for a matching ipa_cmd_exit() function.
+ */
+int ipa_cmd_init(struct ipa *ipa);
+
#endif /* _IPA_CMD_H_ */