include/soc/qcom/tcs.h

Source file repositories/reference/linux-study-clean/include/soc/qcom/tcs.h

File Facts

System
Linux kernel
Corpus path
include/soc/qcom/tcs.h
Extension
.h
Size
2561 bytes
Lines
80
Domain
Repository Root And Misc
Bucket
include
Inferred role
Repository Root And Misc: implementation source
Status
source implementation candidate

Why This File Exists

Top-level or miscellaneous repository surface. Use this as map coverage unless a later manual pass promotes the file into a deeper subsystem dossier.

Dependency Surface

Detected Declarations

Annotated Snippet

struct tcs_cmd {
	u32 addr;
	u32 data;
	u32 wait;
};

/**
 * struct tcs_request: A set of tcs_cmds sent together in a TCS
 *
 * @state:          state for the request.
 * @wait_for_compl: wait until we get a response from the h/w accelerator
 *                  (same as setting cmd->wait for all commands in the request)
 * @num_cmds:       the number of @cmds in this request
 * @cmds:           an array of tcs_cmds
 */
struct tcs_request {
	enum rpmh_state state;
	u32 wait_for_compl;
	u32 num_cmds;
	struct tcs_cmd *cmds;
};

#define BCM_TCS_CMD_COMMIT_MASK		BIT(30)
#define BCM_TCS_CMD_VALID_MASK		BIT(29)
#define BCM_TCS_CMD_VOTE_MASK		GENMASK(13, 0)
#define BCM_TCS_CMD_VOTE_Y_MASK		GENMASK(13, 0)
#define BCM_TCS_CMD_VOTE_X_MASK		GENMASK(27, 14)

/* Construct a Bus Clock Manager (BCM) specific TCS command */
#define BCM_TCS_CMD(commit, valid, vote_x, vote_y)		\
	(u32_encode_bits(commit, BCM_TCS_CMD_COMMIT_MASK) |	\
	u32_encode_bits(valid, BCM_TCS_CMD_VALID_MASK) |	\
	u32_encode_bits(vote_x, BCM_TCS_CMD_VOTE_X_MASK) |	\
	u32_encode_bits(vote_y, BCM_TCS_CMD_VOTE_Y_MASK))

#endif /* __SOC_QCOM_TCS_H__ */

Annotation

Implementation Notes