OSDN Git Service

net: ipa: introduce ipa_cmd_init()
authorAlex Elder <elder@linaro.org>
Fri, 21 Oct 2022 19:13:38 +0000 (14:13 -0500)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 25 Oct 2022 09:15:19 +0000 (11:15 +0200)
commit7fd10a2aca6a2ff3316fac7fb2a72f6e1b303a57
tree1071ea656fa951c32c0ec1a0897f012b9ece03a2
parent5444b0ea9915132b8a202c2c664630cb99daa969
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>
drivers/net/ipa/ipa_cmd.c
drivers/net/ipa/ipa_cmd.h
drivers/net/ipa/ipa_mem.c