ARM: bcm: have bcm_kona_smc() return request result
authorAlex Elder <elder@linaro.org>
Mon, 21 Apr 2014 21:53:05 +0000 (16:53 -0500)
committerMatt Porter <mporter@linaro.org>
Fri, 25 Apr 2014 12:51:33 +0000 (08:51 -0400)
commit6c90f10864d1f7492ebe4c90465a9c9797ce649e
tree9d953197ee4c05b5ea59470a4728dea46d793bc6
parentc64756cca2fb4da96fcc71e376d712297aedc4a2
ARM: bcm: have bcm_kona_smc() return request result

Currently it is assumed that SEC_ROM_RET_OK is the only valid "good"
result of a secure monitor request.  However the values that can be
returned by a secure monitor request are dependent on which service
id was provided.

We therefore should handle the result in a request-dependent way.
The most natural way to do that is to have the initiator of the
request--where bcm_kona_smc() is called--handle the result in a way
appropriate to the request.

An "smc" operation must be performed only on core 0, while the
request can be initiated from any core.  To pass back the request
result, we add a new field to the bcm_kona_smc_data structure, and
have bcm_kona_smc() return that value rather than 0.

There's only one caller right now.  Move the existing check of the
result out of __bcm_kona_smc() and into the kona_l2_cache_init()
where the SSAPI_ENABLE_L2_CACHE request is initiated.

Signed-off-by: Alex Elder <elder@linaro.org>
Reviewed-by: Tim Kryger <tim.kryger@linaro.org>
Reviewed-by: Markus Mayer <markus.mayer@linaro.org>
Reviewed-by: Matt Porter <mporter@linaro.org>
Signed-off-by: Matt Porter <mporter@linaro.org>
arch/arm/mach-bcm/bcm_kona_smc.c
arch/arm/mach-bcm/kona.c