mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-06-13 15:03:58 +03:00
firmware: scmi: Conditionally compile protocol support
Add conditional compilation for SCMI protocol support in scmi_get_protocol() and scmi_add_protocol() based on corresponding Kconfig options. This ensures that only the enabled protocols are compiled and accessed, and reducing binary size. Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Alice Guo <alice.guo@nxp.com>
This commit is contained in:
@@ -40,11 +40,21 @@ struct scmi_agent_priv {
|
||||
u8 *agent_name;
|
||||
u32 agent_id;
|
||||
struct udevice *base_dev;
|
||||
#if IS_ENABLED(CONFIG_SCMI_POWER_DOMAIN)
|
||||
struct udevice *pwdom_dev;
|
||||
#endif
|
||||
#if IS_ENABLED(CONFIG_CLK_SCMI)
|
||||
struct udevice *clock_dev;
|
||||
#endif
|
||||
#if IS_ENABLED(CONFIG_RESET_SCMI)
|
||||
struct udevice *resetdom_dev;
|
||||
#endif
|
||||
#if IS_ENABLED(CONFIG_DM_REGULATOR_SCMI)
|
||||
struct udevice *voltagedom_dev;
|
||||
#endif
|
||||
#if IS_ENABLED(CONFIG_PINCTRL_IMX_SCMI)
|
||||
struct udevice *pinctrl_dev;
|
||||
#endif
|
||||
};
|
||||
|
||||
static inline u32 scmi_version(struct udevice *dev)
|
||||
|
||||
Reference in New Issue
Block a user