soc: mediatek: cmdq: add assign function
Add assign function in cmdq helper which assign constant value into internal register by index. Signed-off-by: Dennis YC Hsieh <dennis-yc.hsieh@mediatek.com> Link: https://lore.kernel.org/r/1592749115-24158-3-git-send-email-dennis-yc.hsieh@mediatek.com Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
This commit is contained in:
parent
b3a9e3b962
commit
613c2e2c7e
3 changed files with 38 additions and 1 deletions
|
|
@ -59,6 +59,7 @@ enum cmdq_code {
|
|||
CMDQ_CODE_JUMP = 0x10,
|
||||
CMDQ_CODE_WFE = 0x20,
|
||||
CMDQ_CODE_EOC = 0x40,
|
||||
CMDQ_CODE_LOGIC = 0xa0,
|
||||
};
|
||||
|
||||
enum cmdq_cb_status {
|
||||
|
|
|
|||
|
|
@ -152,6 +152,20 @@ int cmdq_pkt_poll(struct cmdq_pkt *pkt, u8 subsys,
|
|||
*/
|
||||
int cmdq_pkt_poll_mask(struct cmdq_pkt *pkt, u8 subsys,
|
||||
u16 offset, u32 value, u32 mask);
|
||||
|
||||
/**
|
||||
* cmdq_pkt_assign() - Append logic assign command to the CMDQ packet, ask GCE
|
||||
* to execute an instruction that set a constant value into
|
||||
* internal register and use as value, mask or address in
|
||||
* read/write instruction.
|
||||
* @pkt: the CMDQ packet
|
||||
* @reg_idx: the CMDQ internal register ID
|
||||
* @value: the specified value
|
||||
*
|
||||
* Return: 0 for success; else the error code is returned
|
||||
*/
|
||||
int cmdq_pkt_assign(struct cmdq_pkt *pkt, u16 reg_idx, u32 value);
|
||||
|
||||
/**
|
||||
* cmdq_pkt_flush_async() - trigger CMDQ to asynchronously execute the CMDQ
|
||||
* packet and call back at the end of done packet
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue