From ac5836e3adee8d1b0046b6f48e47e690adcd0968 Mon Sep 17 00:00:00 2001 From: Ye Li Date: Sun, 10 May 2020 20:35:56 -0700 Subject: [PATCH] MLK-23967 imx8: scu_api: Sync sc_rm_is_pad_owned API change SCFW has fixed a overflow issue in sc_rm_is_pad_owned API. This requires u-boot to update API implementation, since it will cause compatible issue. Otherwise all pad checking will have problem and cause pad setting not continue. Due to the compatible issue, the new u-boot only works with new SCFW (API version: 1.21). old scfw + old u-boot: API overflow issue old scfw + new u-boot, or new scfw + old u-boot: API compatible issue new scfw + new u-boot: Working Signed-off-by: Ye Li Reviewed-by : Jason Liu (cherry picked from commit e84fb02056fe50146856320b96de909dad4c0058) (cherry picked from commit 63c9e1b0b2a7f45b76d95624503bed377a3dd226) --- arch/arm/include/asm/arch-imx8/sci/rpc.h | 2 +- drivers/misc/imx8/scu_api.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/include/asm/arch-imx8/sci/rpc.h b/arch/arm/include/asm/arch-imx8/sci/rpc.h index 5d28943538..a17ddeb01a 100644 --- a/arch/arm/include/asm/arch-imx8/sci/rpc.h +++ b/arch/arm/include/asm/arch-imx8/sci/rpc.h @@ -11,7 +11,7 @@ /* Defines */ #define SCFW_API_VERSION_MAJOR 1U -#define SCFW_API_VERSION_MINOR 16U +#define SCFW_API_VERSION_MINOR 21U #define SC_RPC_VERSION 1U diff --git a/drivers/misc/imx8/scu_api.c b/drivers/misc/imx8/scu_api.c index f813d54284..586c1386e9 100644 --- a/drivers/misc/imx8/scu_api.c +++ b/drivers/misc/imx8/scu_api.c @@ -788,7 +788,7 @@ sc_bool_t sc_rm_is_pad_owned(sc_ipc_t ipc, sc_pad_t pad) RPC_VER(&msg) = SC_RPC_VERSION; RPC_SVC(&msg) = (u8)SC_RPC_SVC_RM; RPC_FUNC(&msg) = (u8)RM_FUNC_IS_PAD_OWNED; - RPC_U8(&msg, 0U) = (u8)pad; + RPC_U16(&msg, 0U) = (u16)pad; RPC_SIZE(&msg) = 2U; ret = misc_call(dev, SC_FALSE, &msg, size, &msg, size); -- 2.17.1