drivers/firmware/arm_scmi/vendors/imx/imx-sm-misc.c
Source file repositories/reference/linux-study-clean/drivers/firmware/arm_scmi/vendors/imx/imx-sm-misc.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/firmware/arm_scmi/vendors/imx/imx-sm-misc.c- Extension
.c- Size
- 15318 bytes
- Lines
- 594
- Domain
- Driver Families
- Bucket
- drivers/firmware
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/bits.hlinux/io.hlinux/module.hlinux/of.hlinux/platform_device.hlinux/scmi_protocol.hlinux/scmi_imx_protocol.h../../protocols.h../../notify.h
Detected Declarations
struct scmi_imx_misc_infostruct scmi_msg_imx_misc_protocol_attributesstruct scmi_imx_misc_ctrl_set_instruct scmi_imx_misc_ctrl_notify_instruct scmi_imx_misc_ctrl_notify_payldstruct scmi_imx_misc_ctrl_get_outstruct scmi_imx_misc_buildinfo_outstruct scmi_imx_misc_board_info_outstruct scmi_imx_misc_cfg_info_outstruct scmi_imx_misc_reset_reason_instruct scmi_imx_misc_reset_reason_outstruct scmi_imx_misc_syslog_instruct scmi_imx_misc_syslog_outstruct scmi_imx_misc_syslog_iprivenum scmi_imx_misc_protocol_cmdfunction scmi_imx_misc_attributes_getfunction scmi_imx_misc_ctrl_validate_idfunction scmi_imx_misc_ctrl_notifyfunction scmi_imx_misc_ctrl_set_notify_enabledfunction scmi_imx_misc_ctrl_fill_custom_reportfunction scmi_imx_misc_ctrl_getfunction scmi_imx_misc_ctrl_setfunction scmi_imx_misc_build_info_discoverfunction scmi_imx_misc_board_infofunction scmi_imx_misc_cfg_info_getfunction iter_misc_syslog_prepare_messagefunction iter_misc_syslog_update_statefunction iter_misc_syslog_process_responsefunction scmi_imx_misc_syslog_getfunction scmi_imx_misc_reset_reasonfunction scmi_imx_misc_protocol_init
Annotated Snippet
struct scmi_imx_misc_info {
u32 nr_dev_ctrl;
u32 nr_brd_ctrl;
u32 nr_reason;
};
struct scmi_msg_imx_misc_protocol_attributes {
__le32 attributes;
};
#define GET_BRD_CTRLS_NR(x) le32_get_bits((x), GENMASK(31, 24))
#define GET_REASONS_NR(x) le32_get_bits((x), GENMASK(23, 16))
#define GET_DEV_CTRLS_NR(x) le32_get_bits((x), GENMASK(15, 0))
#define BRD_CTRL_START_ID BIT(15)
struct scmi_imx_misc_ctrl_set_in {
__le32 id;
__le32 num;
__le32 value[];
};
struct scmi_imx_misc_ctrl_notify_in {
__le32 ctrl_id;
__le32 flags;
};
struct scmi_imx_misc_ctrl_notify_payld {
__le32 ctrl_id;
__le32 flags;
};
struct scmi_imx_misc_ctrl_get_out {
__le32 num;
__le32 val[];
};
struct scmi_imx_misc_buildinfo_out {
__le32 buildnum;
__le32 buildcommit;
#define MISC_MAX_BUILDDATE 16
u8 builddate[MISC_MAX_BUILDDATE];
#define MISC_MAX_BUILDTIME 16
u8 buildtime[MISC_MAX_BUILDTIME];
};
struct scmi_imx_misc_board_info_out {
__le32 attributes;
#define MISC_MAX_BRDNAME 16
u8 brdname[MISC_MAX_BRDNAME];
};
struct scmi_imx_misc_cfg_info_out {
__le32 msel;
#define MISC_MAX_CFGNAME 16
u8 cfgname[MISC_MAX_CFGNAME];
};
struct scmi_imx_misc_reset_reason_in {
#define MISC_REASON_FLAG_SYSTEM BIT(0)
__le32 flags;
};
struct scmi_imx_misc_reset_reason_out {
/* Boot reason flags */
#define MISC_BOOT_FLAG_VLD BIT(31)
#define MISC_BOOT_FLAG_ORG_VLD BIT(28)
#define MISC_BOOT_FLAG_ORIGIN GENMASK(27, 24)
#define MISC_BOOT_FLAG_O_SHIFT 24
#define MISC_BOOT_FLAG_ERR_VLD BIT(23)
#define MISC_BOOT_FLAG_ERR_ID GENMASK(22, 8)
#define MISC_BOOT_FLAG_E_SHIFT 8
#define MISC_BOOT_FLAG_REASON GENMASK(7, 0)
__le32 b_flags;
/* Shutdown reason flags */
#define MISC_SHUTDOWN_FLAG_VLD BIT(31)
#define MISC_SHUTDOWN_FLAG_EXT_LEN GENMASK(30, 29)
#define MISC_SHUTDOWN_FLAG_ORG_VLD BIT(28)
#define MISC_SHUTDOWN_FLAG_ORIGIN GENMASK(27, 24)
#define MISC_SHUTDOWN_FLAG_O_SHIFT 24
#define MISC_SHUTDOWN_FLAG_ERR_VLD BIT(23)
#define MISC_SHUTDOWN_FLAG_ERR_ID GENMASK(22, 8)
#define MISC_SHUTDOWN_FLAG_E_SHIFT 8
#define MISC_SHUTDOWN_FLAG_REASON GENMASK(7, 0)
__le32 s_flags;
/* Array of extended info words */
__le32 extinfo[MISC_EXT_INFO_LEN_MAX];
};
struct scmi_imx_misc_syslog_in {
__le32 flags;
Annotation
- Immediate include surface: `linux/bits.h`, `linux/io.h`, `linux/module.h`, `linux/of.h`, `linux/platform_device.h`, `linux/scmi_protocol.h`, `linux/scmi_imx_protocol.h`, `../../protocols.h`.
- Detected declarations: `struct scmi_imx_misc_info`, `struct scmi_msg_imx_misc_protocol_attributes`, `struct scmi_imx_misc_ctrl_set_in`, `struct scmi_imx_misc_ctrl_notify_in`, `struct scmi_imx_misc_ctrl_notify_payld`, `struct scmi_imx_misc_ctrl_get_out`, `struct scmi_imx_misc_buildinfo_out`, `struct scmi_imx_misc_board_info_out`, `struct scmi_imx_misc_cfg_info_out`, `struct scmi_imx_misc_reset_reason_in`.
- Atlas domain: Driver Families / drivers/firmware.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.