Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 414a9a7c authored by Elliot Berman's avatar Elliot Berman
Browse files

firmware: qcom_scm-64: Make SMCCC macros less magical



Improve understandability of SMCCC macros as they are all functions of
how many arguments can be shoved in registers and how many SCM arguments
are supported.

Change-Id: Iac0378fc4c5e20943a64b98223d53caa4955dd53
Signed-off-by: default avatarElliot Berman <eberman@codeaurora.org>
parent 4d2296c9
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -57,9 +57,9 @@ static DEFINE_MUTEX(qcom_scm_lock);
#define QCOM_SCM_EBUSY_MAX_RETRY 20

#define SMCCC_FUNCNUM(s, c)	((((s) & 0xFF) << 8) | ((c) & 0xFF))
#define SMCCC_N_EXT_ARGS 7
#define SMCCC_FIRST_EXT_IDX 3
#define SMCCC_N_REG_ARGS (MAX_QCOM_SCM_ARGS - SMCCC_N_EXT_ARGS + 1)
#define SMCCC_N_REG_ARGS	4
#define SMCCC_FIRST_EXT_IDX	(SMCCC_N_REG_ARGS - 1)
#define SMCCC_N_EXT_ARGS	(MAX_QCOM_SCM_ARGS - SMCCC_N_REG_ARGS + 1)

static void __qcom_scm_call_do_quirk(const struct qcom_scm_desc *desc,
			       struct arm_smccc_res *res, u32 fn_id,