firmware: qcom_scm: Remove thin wrappers
authorElliot Berman <eberman@codeaurora.org>
Tue, 7 Jan 2020 21:04:25 +0000 (13:04 -0800)
committerBjorn Andersson <bjorn.andersson@linaro.org>
Wed, 8 Jan 2020 06:14:40 +0000 (22:14 -0800)
commit57d3b816718c1cf832e2929a754da3564c6127cc
tree287c023e5a5e9b899bdfbbf9093f35f2000f4c79
parent65f0c90b7d468545590992c61a19f9dc0aac61ef
firmware: qcom_scm: Remove thin wrappers

qcom_scm-32 and qcom_scm-64 implementations are nearly identical, so
make qcom_scm_call and qcom_scm_call_atomic unique to each and the SCM
descriptor creation common to each. There are the following catches:
- __qcom_scm_is_call_available is still in each -32,-64 implementation
  as the argument is unique to each convention
- For some functions, only one implementation was provided in -32 or
  -64. The actual implementation was moved into qcom_scm.c
- io_writel and io_readl in -64 were non-atomic calls and in -32 they
  were. Atomic is the better option, so use it.

Tested-by: Brian Masney <masneyb@onstation.org> # arm32
Tested-by: Stephan Gerhold <stephan@gerhold.net>
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
Link: https://lore.kernel.org/r/1578431066-19600-17-git-send-email-eberman@codeaurora.org
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
drivers/firmware/qcom_scm-32.c
drivers/firmware/qcom_scm-64.c
drivers/firmware/qcom_scm.c
drivers/firmware/qcom_scm.h