From: Peng Fan (OSS) Date: Mon, 12 Apr 2021 20:12:53 +0800 Subject: [PATCH 24/37] drivers: misc: imx8ulp: Update S400 API for release RDC In-Reply-To: <20210412121306.11484-1-peng.fan@oss.nxp.com> References: <20210412121306.11484-1-peng.fan@oss.nxp.com> Message-ID: <20210412121306.11484-25-peng.fan@oss.nxp.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de From: Ye Li The RDC API is updated to add a field for XRDC or TRDC Signed-off-by: Ye Li --- arch/arm/include/asm/arch-imx8ulp/s400_api.h | 2 +- drivers/misc/imx8ulp/s400_api.c | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/arch/arm/include/asm/arch-imx8ulp/s400_api.h b/arch/arm/include/asm/arch-imx8ulp/s400_api.h index 30dab8be24..41ad4002b1 100644 --- a/arch/arm/include/asm/arch-imx8ulp/s400_api.h +++ b/arch/arm/include/asm/arch-imx8ulp/s400_api.h @@ -27,7 +27,7 @@ struct imx8ulp_s400_msg { u32 data[(S400_MAX_MSG - 1U)]; }; -int ahab_release_rdc(u8 core_id, u32 *response); +int ahab_release_rdc(u8 core_id, bool xrdc, u32 *response); int ahab_auth_oem_ctnr(ulong ctnr_addr, u32 *response); int ahab_release_container(u32 *response); int ahab_verify_image(u32 img_id, u32 *response); diff --git a/drivers/misc/imx8ulp/s400_api.c b/drivers/misc/imx8ulp/s400_api.c index 4047d6efee..315221a463 100644 --- a/drivers/misc/imx8ulp/s400_api.c +++ b/drivers/misc/imx8ulp/s400_api.c @@ -14,7 +14,7 @@ DECLARE_GLOBAL_DATA_PTR; -int ahab_release_rdc(u8 core_id, u32 *response) +int ahab_release_rdc(u8 core_id, bool xrdc, u32 *response) { struct udevice *dev = gd->arch.s400_dev; int size = sizeof(struct imx8ulp_s400_msg); @@ -30,7 +30,10 @@ int ahab_release_rdc(u8 core_id, u32 *response) msg.tag = AHAB_CMD_TAG; msg.size = 2; msg.command = AHAB_RELEASE_RDC_REQ_CID; - msg.data[0] = core_id; + if (xrdc) + msg.data[0] = (0x78 << 8) | core_id; + else + msg.data[0] = (0x74 << 8) | core_id; ret = misc_call(dev, false, &msg, size, &msg, size); if (ret) -- 2.30.0