diff options
| author | Peng Fan <[email protected]> | 2025-10-17 17:32:33 +0800 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2025-10-24 13:47:50 -0600 |
| commit | 3f20ea3675c466ab16761c9b280e6c382bae02c3 (patch) | |
| tree | 7814f5f32be725229936a7888750aa1ef1962868 /include/scmi_nxp_protocols.h | |
| parent | 7830ccc77a13dd2a9880a942734bb5687416c4d8 (diff) | |
firmware: scmi: Add i.MX95 SCMI LMM protocol driver
Add Logical Machine Management(LMM) protocol which is intended for boot,
shutdown, and reset of other logical machines (LM). It is usually used to
allow one LM to manager another used as an offload or accelerator engine.
Following Linux Kernel, created a separate folder for holding vendor
protocol drivers.
Signed-off-by: Peng Fan <[email protected]>
Reviewed-by: Alice Guo <[email protected]>
Diffstat (limited to 'include/scmi_nxp_protocols.h')
| -rw-r--r-- | include/scmi_nxp_protocols.h | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/include/scmi_nxp_protocols.h b/include/scmi_nxp_protocols.h index 7e2143b16ea..1c79bc2282b 100644 --- a/include/scmi_nxp_protocols.h +++ b/include/scmi_nxp_protocols.h @@ -9,6 +9,7 @@ #include <asm/types.h> #include <linux/bitops.h> +#define SCMI_PROTOCOL_ID_IMX_LMM 0x80 #define SCMI_PROTOCOL_ID_IMX_MISC 0x84 #define SCMI_PAYLOAD_LEN 100 @@ -50,4 +51,48 @@ struct scmi_imx_misc_reset_reason_out { u32 extInfo[MISC_MAX_EXTINFO]; }; +#define LMM_ID_DISCOVER 0xFFFFFFFFU +#define LMM_MAX_NAME 16 + +enum scmi_imx_lmm_state { + LMM_STATE_LM_OFF, + LMM_STATE_LM_ON, + LMM_STATE_LM_SUSPEND, + LMM_STATE_LM_POWERED, +}; + +struct scmi_imx_lmm_info { + u32 lmid; + enum scmi_imx_lmm_state state; + u32 errstatus; + u8 name[LMM_MAX_NAME]; +}; + +#if IS_ENABLED(CONFIG_IMX_SM_LMM) +int scmi_imx_lmm_info(struct udevice *dev, u32 lmid, struct scmi_imx_lmm_info *info); +int scmi_imx_lmm_power_boot(struct udevice *dev, u32 lmid, bool boot); +int scmi_imx_lmm_reset_vector_set(struct udevice *dev, u32 lmid, u32 cpuid, u32 flags, u64 vector); +int scmi_imx_lmm_shutdown(struct udevice *dev, u32 lmid, bool flags); +#else +static inline int scmi_imx_lmm_info(struct udevice *dev, u32 lmid, struct scmi_imx_lmm_info *info) +{ + return -EOPNOTSUPP; +} + +static inline int scmi_imx_lmm_power_boot(struct udevice *dev, u32 lmid, bool boot) +{ + return -EOPNOTSUPP; +} + +static inline int +scmi_imx_lmm_reset_vector_set(struct udevice *dev, u32 lmid, u32 cpuid, u32 flags, u64 vector) +{ + return -EOPNOTSUPP; +} + +static inline int scmi_imx_lmm_shutdown(struct udevice *dev, u32 lmid, bool flags) +{ + return -EOPNOTSUPP; +} +#endif #endif |
