soc: qcom: aoss: Move length requirements from caller
authorBjorn Andersson <quic_bjorande@quicinc.com>
Fri, 11 Aug 2023 20:58:36 +0000 (13:58 -0700)
committerBjorn Andersson <andersson@kernel.org>
Mon, 14 Aug 2023 02:26:48 +0000 (19:26 -0700)
commit59e09100836fdb618b107c37189d6001b5825872
tree02d9baf4c12f95070f4121956d0af6a5470fbfc3
parentf9eac7e0298ff9df9ae10a579a620d07453845d4
soc: qcom: aoss: Move length requirements from caller

The existing implementation of qmp_send() requires the caller to provide
a buffer which is of word-aligned. The underlying reason for this is
that message ram only supports word accesses, but pushing this
requirement onto the clients results in the same boiler plate code
sprinkled in every call site.

By using a temporary buffer in qmp_send() we can hide the underlying
hardware limitations from the clients and allow them to pass their
NUL-terminates C string directly.

Signed-off-by: Bjorn Andersson <quic_bjorande@quicinc.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Link: https://lore.kernel.org/r/20230811205839.727373-2-quic_bjorande@quicinc.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
drivers/net/ipa/ipa_power.c
drivers/remoteproc/qcom_q6v5.c
drivers/soc/qcom/qcom_aoss.c
include/linux/soc/qcom/qcom_aoss.h