From: Ye Li Date: Tue, 26 Jul 2022 08:40:57 +0000 (+0800) Subject: misc: S400_API: Rename imx8ulp_s400_msg to sentinel_msg X-Git-Url: http://git.dujemihanovic.xyz/img/sics.gif?a=commitdiff_plain;h=1a55a633e056201b1e214c42514f2b7bc987b342;p=u-boot.git misc: S400_API: Rename imx8ulp_s400_msg to sentinel_msg Use more generic name for S40x msg structure Signed-off-by: Ye Li Signed-off-by: Peng Fan --- diff --git a/arch/arm/include/asm/mach-imx/s400_api.h b/arch/arm/include/asm/mach-imx/s400_api.h index dc176e1f61..89fa373d06 100644 --- a/arch/arm/include/asm/mach-imx/s400_api.h +++ b/arch/arm/include/asm/mach-imx/s400_api.h @@ -26,7 +26,7 @@ #define S400_MAX_MSG 255U -struct imx8ulp_s400_msg { +struct sentinel_msg { u8 version; u8 size; u8 command; diff --git a/arch/arm/mach-imx/imx8ulp/rdc.c b/arch/arm/mach-imx/imx8ulp/rdc.c index cc47079d8f..e24eeff8a2 100644 --- a/arch/arm/mach-imx/imx8ulp/rdc.c +++ b/arch/arm/mach-imx/imx8ulp/rdc.c @@ -184,7 +184,7 @@ int xrdc_config_pdac(u32 bridge, u32 index, u32 dom, u32 perm) int release_rdc(enum rdc_type type) { ulong s_mu_base = 0x27020000UL; - struct imx8ulp_s400_msg msg; + struct sentinel_msg msg; int ret; u32 rdc_id = (type == RDC_XRDC) ? 0x78 : 0x74; diff --git a/arch/arm/mach-imx/imx9/trdc.c b/arch/arm/mach-imx/imx9/trdc.c index b0881697a1..3f37ce712c 100644 --- a/arch/arm/mach-imx/imx9/trdc.c +++ b/arch/arm/mach-imx/imx9/trdc.c @@ -315,7 +315,7 @@ bool trdc_mbc_enabled(ulong trdc_base) int release_rdc(u8 xrdc) { ulong s_mu_base = 0x47520000UL; - struct imx8ulp_s400_msg msg; + struct sentinel_msg msg; int ret; u32 rdc_id; diff --git a/drivers/misc/sentinel/s400_api.c b/drivers/misc/sentinel/s400_api.c index 01a673e5e1..65032f7736 100644 --- a/drivers/misc/sentinel/s400_api.c +++ b/drivers/misc/sentinel/s400_api.c @@ -17,8 +17,8 @@ DECLARE_GLOBAL_DATA_PTR; int ahab_release_rdc(u8 core_id, u8 xrdc, u32 *response) { struct udevice *dev = gd->arch.s400_dev; - int size = sizeof(struct imx8ulp_s400_msg); - struct imx8ulp_s400_msg msg; + int size = sizeof(struct sentinel_msg); + struct sentinel_msg msg; int ret; if (!dev) { @@ -62,8 +62,8 @@ int ahab_release_rdc(u8 core_id, u8 xrdc, u32 *response) int ahab_auth_oem_ctnr(ulong ctnr_addr, u32 *response) { struct udevice *dev = gd->arch.s400_dev; - int size = sizeof(struct imx8ulp_s400_msg); - struct imx8ulp_s400_msg msg; + int size = sizeof(struct sentinel_msg); + struct sentinel_msg msg; int ret; if (!dev) { @@ -92,8 +92,8 @@ int ahab_auth_oem_ctnr(ulong ctnr_addr, u32 *response) int ahab_release_container(u32 *response) { struct udevice *dev = gd->arch.s400_dev; - int size = sizeof(struct imx8ulp_s400_msg); - struct imx8ulp_s400_msg msg; + int size = sizeof(struct sentinel_msg); + struct sentinel_msg msg; int ret; if (!dev) { @@ -120,8 +120,8 @@ int ahab_release_container(u32 *response) int ahab_verify_image(u32 img_id, u32 *response) { struct udevice *dev = gd->arch.s400_dev; - int size = sizeof(struct imx8ulp_s400_msg); - struct imx8ulp_s400_msg msg; + int size = sizeof(struct sentinel_msg); + struct sentinel_msg msg; int ret; if (!dev) { @@ -149,8 +149,8 @@ int ahab_verify_image(u32 img_id, u32 *response) int ahab_forward_lifecycle(u16 life_cycle, u32 *response) { struct udevice *dev = gd->arch.s400_dev; - int size = sizeof(struct imx8ulp_s400_msg); - struct imx8ulp_s400_msg msg; + int size = sizeof(struct sentinel_msg); + struct sentinel_msg msg; int ret; if (!dev) { @@ -178,8 +178,8 @@ int ahab_forward_lifecycle(u16 life_cycle, u32 *response) int ahab_read_common_fuse(u16 fuse_id, u32 *fuse_words, u32 fuse_num, u32 *response) { struct udevice *dev = gd->arch.s400_dev; - int size = sizeof(struct imx8ulp_s400_msg); - struct imx8ulp_s400_msg msg; + int size = sizeof(struct sentinel_msg); + struct sentinel_msg msg; int ret; if (!dev) { @@ -226,8 +226,8 @@ int ahab_read_common_fuse(u16 fuse_id, u32 *fuse_words, u32 fuse_num, u32 *respo int ahab_write_fuse(u16 fuse_id, u32 fuse_val, bool lock, u32 *response) { struct udevice *dev = gd->arch.s400_dev; - int size = sizeof(struct imx8ulp_s400_msg); - struct imx8ulp_s400_msg msg; + int size = sizeof(struct sentinel_msg); + struct sentinel_msg msg; int ret; if (!dev) { @@ -259,8 +259,8 @@ int ahab_write_fuse(u16 fuse_id, u32 fuse_val, bool lock, u32 *response) int ahab_release_caam(u32 core_did, u32 *response) { struct udevice *dev = gd->arch.s400_dev; - int size = sizeof(struct imx8ulp_s400_msg); - struct imx8ulp_s400_msg msg; + int size = sizeof(struct sentinel_msg); + struct sentinel_msg msg; int ret; if (!dev) { @@ -329,8 +329,8 @@ int ahab_get_fw_version(u32 *fw_version, u32 *sha1, u32 *response) int ahab_dump_buffer(u32 *buffer, u32 buffer_length) { struct udevice *dev = gd->arch.s400_dev; - int size = sizeof(struct imx8ulp_s400_msg); - struct imx8ulp_s400_msg msg; + int size = sizeof(struct sentinel_msg); + struct sentinel_msg msg; int ret, i = 0; if (!dev) { @@ -363,8 +363,8 @@ int ahab_dump_buffer(u32 *buffer, u32 buffer_length) int ahab_get_info(struct sentinel_get_info_data *info, u32 *response) { struct udevice *dev = gd->arch.s400_dev; - int size = sizeof(struct imx8ulp_s400_msg); - struct imx8ulp_s400_msg msg; + int size = sizeof(struct sentinel_msg); + struct sentinel_msg msg; int ret; if (!dev) { @@ -394,8 +394,8 @@ int ahab_get_info(struct sentinel_get_info_data *info, u32 *response) int ahab_get_fw_status(u32 *status, u32 *response) { struct udevice *dev = gd->arch.s400_dev; - int size = sizeof(struct imx8ulp_s400_msg); - struct imx8ulp_s400_msg msg; + int size = sizeof(struct sentinel_msg); + struct sentinel_msg msg; int ret; if (!dev) { diff --git a/drivers/misc/sentinel/s4mu.c b/drivers/misc/sentinel/s4mu.c index 18aea27105..794fc40c62 100644 --- a/drivers/misc/sentinel/s4mu.c +++ b/drivers/misc/sentinel/s4mu.c @@ -85,7 +85,7 @@ int mu_hal_receivemsg(ulong base, u32 reg_index, u32 *msg) static int imx8ulp_mu_read(struct mu_type *base, void *data) { - struct imx8ulp_s400_msg *msg = (struct imx8ulp_s400_msg *)data; + struct sentinel_msg *msg = (struct sentinel_msg *)data; int ret; u8 count = 0; @@ -118,7 +118,7 @@ static int imx8ulp_mu_read(struct mu_type *base, void *data) static int imx8ulp_mu_write(struct mu_type *base, void *data) { - struct imx8ulp_s400_msg *msg = (struct imx8ulp_s400_msg *)data; + struct sentinel_msg *msg = (struct sentinel_msg *)data; int ret; u8 count = 0; @@ -171,7 +171,7 @@ static int imx8ulp_mu_call(struct udevice *dev, int no_resp, void *tx_msg, return ret; } - result = ((struct imx8ulp_s400_msg *)rx_msg)->data[0]; + result = ((struct sentinel_msg *)rx_msg)->data[0]; if ((result & 0xff) == 0xd6) return 0;