lkml.org 
[lkml]   [2019]   [Mar]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v2 08/10] soc: mediatek: cmdq: add polling function
On Wed, Mar 6, 2019 at 5:51 PM Bibby Hsieh <bibby.hsieh@mediatek.com> wrote:
> diff --git a/drivers/soc/mediatek/mtk-cmdq-helper.c b/drivers/soc/mediatek/mtk-cmdq-helper.c
> index d3873ab..71c167c 100644
> --- a/drivers/soc/mediatek/mtk-cmdq-helper.c
> +++ b/drivers/soc/mediatek/mtk-cmdq-helper.c
> @@ -231,6 +231,27 @@ int cmdq_pkt_clear_event(struct cmdq_pkt *pkt, u16 event)
> }
> EXPORT_SYMBOL(cmdq_pkt_clear_event);
>
> +int cmdq_pkt_poll(struct cmdq_pkt *pkt, u8 subsys,
> + u16 offset, u32 value, u32 mask)
> +{
> + int err;
> +
> + if (mask != 0xffffffff) {
> + err = cmdq_pkt_append_command(pkt, CMDQ_GET_ARG_C(~mask),
> + CMDQ_GET_ARG_B(~mask),
> + 0, 0, 0, 0, 0, CMDQ_CODE_MASK);

All other codes use CMDQ_IMMEDIATE_VALUE instead of 0 for arguments of
cmdq_pkt_append_command. Also use CMDQ_IMMEDIATE_VALUE here?

> +
> + if (err != 0)
> + return err;
> + }
> + offset = offset | 0x1;
> +
> + return cmdq_pkt_append_command(pkt, CMDQ_GET_ARG_C(value),
> + CMDQ_GET_ARG_B(value),
> + offset, subsys, 0, 0, 0, CMDQ_CODE_POLL);
> +}
> +EXPORT_SYMBOL(cmdq_pkt_poll);
> +

\
 
 \ /
  Last update: 2019-03-06 11:59    [W:0.153 / U:5.288 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site