include/linux/firmware/thead/thead,th1520-aon.h
Source file repositories/reference/linux-study-clean/include/linux/firmware/thead/thead,th1520-aon.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/firmware/thead/thead,th1520-aon.h- Extension
.h- Size
- 3680 bytes
- Lines
- 127
- Domain
- Core OS
- Bucket
- Core Kernel Interface
- Inferred role
- Core OS: implementation source
- Status
- source implementation candidate
Why This File Exists
Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/device.hlinux/types.h
Detected Declarations
struct th1520_aon_chanstruct th1520_aon_rpc_msg_hdrstruct th1520_aon_rpc_ack_commonenum th1520_aon_rpc_svcenum th1520_aon_misc_funcenum th1520_aon_wdg_funcenum th1520_aon_sys_funcenum th1520_aon_lpm_funcenum th1520_aon_pm_func
Annotated Snippet
struct th1520_aon_rpc_msg_hdr {
u8 ver; /* version of msg hdr */
u8 size; /* msg size ,uinit in bytes,the size includes rpc msg header self */
u8 svc; /* rpc main service id */
u8 func; /* rpc sub func id of specific service, sent by caller */
} __packed __aligned(1);
struct th1520_aon_rpc_ack_common {
struct th1520_aon_rpc_msg_hdr hdr;
u8 err_code;
} __packed __aligned(1);
#define RPC_SVC_MSG_TYPE_DATA 0
#define RPC_SVC_MSG_TYPE_ACK 1
#define RPC_SVC_MSG_NEED_ACK 0
#define RPC_SVC_MSG_NO_NEED_ACK 1
#define RPC_GET_VER(MESG) ((MESG)->ver)
#define RPC_SET_VER(MESG, VER) ((MESG)->ver = (VER))
#define RPC_GET_SVC_ID(MESG) ((MESG)->svc & 0x3F)
#define RPC_SET_SVC_ID(MESG, ID) ((MESG)->svc |= 0x3F & (ID))
#define RPC_GET_SVC_FLAG_MSG_TYPE(MESG) (((MESG)->svc & 0x80) >> 7)
#define RPC_SET_SVC_FLAG_MSG_TYPE(MESG, TYPE) ((MESG)->svc |= (TYPE) << 7)
#define RPC_GET_SVC_FLAG_ACK_TYPE(MESG) (((MESG)->svc & 0x40) >> 6)
#define RPC_SET_SVC_FLAG_ACK_TYPE(MESG, ACK) ((MESG)->svc |= (ACK) << 6)
/*
* Defines for SC PM Power Mode
*/
#define TH1520_AON_PM_PW_MODE_OFF 0 /* Power off */
#define TH1520_AON_PM_PW_MODE_STBY 1 /* Power in standby */
#define TH1520_AON_PM_PW_MODE_LP 2 /* Power in low-power */
#define TH1520_AON_PM_PW_MODE_ON 3 /* Power on */
/*
* Defines for AON power islands
*/
#define TH1520_AON_AUDIO_PD 0
#define TH1520_AON_VDEC_PD 1
#define TH1520_AON_NPU_PD 2
#define TH1520_AON_VENC_PD 3
#define TH1520_AON_GPU_PD 4
#define TH1520_AON_DSP0_PD 5
#define TH1520_AON_DSP1_PD 6
struct th1520_aon_chan *th1520_aon_init(struct device *dev);
void th1520_aon_deinit(struct th1520_aon_chan *aon_chan);
int th1520_aon_call_rpc(struct th1520_aon_chan *aon_chan, void *msg);
int th1520_aon_power_update(struct th1520_aon_chan *aon_chan, u16 rsrc,
bool power_on);
#endif /* _THEAD_AON_H */
Annotation
- Immediate include surface: `linux/device.h`, `linux/types.h`.
- Detected declarations: `struct th1520_aon_chan`, `struct th1520_aon_rpc_msg_hdr`, `struct th1520_aon_rpc_ack_common`, `enum th1520_aon_rpc_svc`, `enum th1520_aon_misc_func`, `enum th1520_aon_wdg_func`, `enum th1520_aon_sys_func`, `enum th1520_aon_lpm_func`, `enum th1520_aon_pm_func`.
- Atlas domain: Core OS / Core Kernel Interface.
- 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.