diff options
author | Devarsh Thakkar <devarsht@ti.com> | 2023-03-27 20:58:30 +0530 |
---|---|---|
committer | Mathieu Poirier <mathieu.poirier@linaro.org> | 2023-03-29 17:16:42 -0600 |
commit | 7f402919278aa5b8eec82a7dad2e0cb8e6bdee14 (patch) | |
tree | 64f538805d8da162fbd3144d80b6ede281f1648d /drivers/remoteproc/qcom_common.c | |
parent | e19967994d342a5986d950a1bfddf19d7e1191b7 (diff) | |
download | linux-7f402919278aa5b8eec82a7dad2e0cb8e6bdee14.tar.gz |
remoteproc: k3-r5: Simplify cluster mode setting usage
Check the validity of mode against SoC supported modes right
at the probe to minimize the usage of same check further in the code.
Set default value of cluster-mode only if cluster-mode device tree property
is empty.
In case devicetree provided cluster-mode property is invalid For e.g. using
CLUSTER_MODE_SINGLECPU on any SoC other than am64x then return error.
If firmware has set the PROC_BOOT_STATUS_FLAG_R5_SINGLECORE_ONLY flag then
what it means is that only CLUSTER_MODE_SINGLECPU is possible to use [1]
and hence there is no need to check for soc_data->single_cpu_mode first and
then checking cluster mode.
PROC_BOOT_CFG_FLAG_R5_SINGLE_CORE flag can be set directly for
CLUSTER_MODE_SINGLECPU without checking for soc_data->single_cpu_mode since
that check has already been done during probe.
For IPC-only mode, directly override cluster mode as per config flag set by
bootloader without checking for soc specific data. This because config
flag would already have been validated by firmware when bootloader was
setting it.
Link:
[1] https://software-dl.ti.com/tisci/esd/latest/2_tisci_msgs/security/PROC_BOOT.html?highlight=singlecore_only#arm-r5
Signed-off-by: Devarsh Thakkar <devarsht@ti.com>
Link: https://lore.kernel.org/r/20230327152832.923480-2-devarsht@ti.com
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Diffstat (limited to 'drivers/remoteproc/qcom_common.c')
0 files changed, 0 insertions, 0 deletions