drivers/soc/qcom/llcc-qcom.c

Source file repositories/reference/linux-study-clean/drivers/soc/qcom/llcc-qcom.c

File Facts

System
Linux kernel
Corpus path
drivers/soc/qcom/llcc-qcom.c
Extension
.c
Size
125220 bytes
Lines
5661
Domain
Driver Families
Bucket
drivers/soc
Inferred role
Driver Families: exported/initcall integration point
Status
integration 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.

Dependency Surface

Detected Declarations

Annotated Snippet

struct llcc_slice_config {
	u32 usecase_id;
	u32 slice_id;
	u32 max_cap;
	u32 priority;
	bool fixed_size;
	u32 bonus_ways;
	u32 res_ways;
	u32 cache_mode;
	u32 probe_target_ways;
	bool dis_cap_alloc;
	bool retain_on_pc;
	bool activate_on_init;
	bool write_scid_en;
	bool write_scid_cacheable_en;
	bool stale_en;
	bool stale_cap_en;
	bool mru_uncap_en;
	bool mru_rollover;
	bool alloc_oneway_en;
	bool ovcap_en;
	bool ovcap_prio;
	bool vict_prio;
	u32 parent_slice_id;
};

/*
 * struct slc_sct_error - Represents SCT error
 * @code: FW code status
 * @param: Holds the SCT programming error
 */
struct slc_sct_error {
	__le64 code;
	__le64 param;
} __packed;

/*
 * struct slc_sct_status - SCT programming status
 * @program_status: Indicates programming success or failure
 * @version: SCT mem layout version
 * @error: Error enum and its param
 */
struct slc_sct_status {
	__le64 program_status;
	/* Use the lower 8 bits */
	__le64 version;
	struct slc_sct_error error;
} __packed;

/*
 * struct slc_sct_details - SCT details
 * @revision:  revision of the SCT table
 * @name: name of the SCT table
 */
struct slc_sct_details {
	u8 revision;
	char name[SLC_SCT_NAME_LEN];
} __packed;

/*
 * struct tcm_mem_info - SC TCM Shared memory details
 * @is_present: is TCM region present
 * @offset: offset of TCM shared memory details
 */
struct slc_tcm_mem_info {
	__le32 is_present;
	__le32 offset;
} __packed;

/*
 * struct slc_sct_slice_desc - Slice descriptor definition used in shmem
 * @slice_id:  SCID of the slice
 * @usecase_id: Usecase ID of the slice
 * @slice_properties:
 *	slice_size: Contains the slice descriptor size - 20 bit wide
 *	rsvd: Reserved space - 4 bit wide
 *	flags: Flags for descriptors - 3 bit wide
 *		MPAM SCID: Bit 24
 *		Activate on boot: Bit 25
 *		Non-HLOS SCID: Bit 26
 *	HWMutex: Ensures only one processor (CPU or MCU) at a time can
 *	access the LLCC hardware resources - 5 bit wide
 */
struct slc_sct_slice_desc {
	__le16 slice_id;
	__le16 usecase_id;
	__le32 slice_properties;
} __packed;

/*

Annotation

Implementation Notes