Skip to content

Conversation

@LaurentiuM1234
Copy link
Contributor

The SCMI CPU protocol is in fact a vendor extension from NXP. The current naming used for the CPU protocol definitions (i.e. functions, structures, macros) follows that of the SCMI standard protocols, which might be misleading.

Include "nxp" in the name all of the CPU protocol functions. No functional change.

This change was performed mechanically using "git grep" and "sed -i" with some manual intervention.

@LaurentiuM1234 LaurentiuM1234 force-pushed the feat/scmi_nxp_cpu_cleanup branch from 4ff234d to bb7de09 Compare December 3, 2025 09:40
The SCMI CPU protocol is in fact a vendor extension from NXP. The current
naming used for the CPU protocol definitions (i.e. functions, structures,
macros) follows that of the SCMI standard protocols, which might be
misleading.

Include "nxp" in the name of all of the CPU protocol definitions.

This change was performed mechanically using "git grep" and "sed -i"
with some manual intervention.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
@sonarqubecloud
Copy link

sonarqubecloud bot commented Dec 3, 2025

Copy link
Contributor

@yongxu-wang15 yongxu-wang15 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test fine in imx943 mcore pm context, one struct need to drop from my side

uint32_t sleep_mode;
};

struct scmi_pd_lpm_settings {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is unused now, it already be replaced by scmi_nxp_cpu_sleep_mode_config, please delete it if not use

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Git grep shows that this is still being used though (struct scmi_nxp_cpu_pd_lpm_config uses the structure you've mentioned):

drivers/firmware/scmi/nxp/cpu.c:int scmi_nxp_cpu_pd_lpm_set(struct scmi_nxp_cpu_pd_lpm_config *cfg)
include/zephyr/drivers/firmware/scmi/nxp/cpu.h: * @struct scmi_nxp_cpu_pd_lpm_config
include/zephyr/drivers/firmware/scmi/nxp/cpu.h:struct scmi_nxp_cpu_pd_lpm_config {
include/zephyr/drivers/firmware/scmi/nxp/cpu.h:int scmi_nxp_cpu_pd_lpm_set(struct scmi_nxp_cpu_pd_lpm_config *cfg);
soc/nxp/imx/imx9/imx943/pm_mcore.c:     struct scmi_nxp_cpu_pd_lpm_config cpu_pd_lpm_cfg;
soc/nxp/imx/imx9/imx95/m7/soc.c:        struct scmi_nxp_cpu_pd_lpm_config cpu_pd_lpm_cfg;

Looked at soc/nxp/imx/imx9/imx943/pm_mcore.c and I can see this is being used in pm_state_before(). Plus there's the scmi_nxp_cpu_pd_lpm_set() command.

Perhaps I'm missing something here?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm sorry, you're right, I misread it.

@yongxu-wang15 yongxu-wang15 self-requested a review December 5, 2025 01:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants