[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANdKZ0cBRfSjS021waSWB-RE6PPBt+ZpvnZmVWABgB8Y1nVe+w@mail.gmail.com>
Date: Wed, 6 Mar 2019 18:58:44 +0800
From: Pi-Hsun Shih <pihsun@...omium.org>
To: Bibby Hsieh <bibby.hsieh@...iatek.com>
Cc: Jassi Brar <jassisinghbrar@...il.com>,
Matthias Brugger <matthias.bgg@...il.com>,
Rob Herring <robh+dt@...nel.org>, CK HU <ck.hu@...iatek.com>,
Daniel Kurtz <djkurtz@...omium.org>,
Sascha Hauer <s.hauer@...gutronix.de>,
"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
<devicetree@...r.kernel.org>,
open list <linux-kernel@...r.kernel.org>,
"moderated list:ARM/Mediatek SoC support"
<linux-arm-kernel@...ts.infradead.org>,
"moderated list:ARM/Mediatek SoC support"
<linux-mediatek@...ts.infradead.org>, srv_heupstream@...iatek.com,
Sascha Hauer <kernel@...gutronix.de>,
Philipp Zabel <p.zabel@...gutronix.de>,
Nicolas Boichat <drinkcat@...omium.org>,
YT Shen <yt.shen@...iatek.com>,
Daoyuan Huang <daoyuan.huang@...iatek.com>,
Jiaguang Zhang <jiaguang.zhang@...iatek.com>,
Dennis-YC Hsieh <dennis-yc.hsieh@...iatek.com>,
Houlong Wei <houlong.wei@...iatek.com>,
ginny.chen@...iatek.com, kendrick.hsu@...iatek.com,
Frederic Chen <Frederic.Chen@...iatek.com>
Subject: Re: [PATCH v2 08/10] soc: mediatek: cmdq: add polling function
On Wed, Mar 6, 2019 at 5:51 PM Bibby Hsieh <bibby.hsieh@...iatek.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);
> +
Powered by blists - more mailing lists