aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/soc/mediatek/mtk-cmdq-helper.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2020-01-10Merge branch 'v5.5-next/cmdq-stable' into v5.5-next/socMatthias Brugger1-26/+121
2020-01-10soc: mediatek: cmdq: delete not used defineMatthias Brugger1-2/+0
Define CMDQ_EOC_CMD was actually never used. Delete it. Signed-off-by: Matthias Brugger <mbrugger@suse.com> Reviewed-by: Bibby Hsieh <bibby.hsieh@mediatek.com> Reviewed-by: CK Hu <ck.hu@mediatek.com> Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2020-01-08soc: mediatek: cmdq: add cmdq_dev_get_client_reg functionBibby Hsieh1-0/+29
GCE cannot know the register base address, this function can help cmdq client to get the cmdq_client_reg structure. Signed-off-by: Bibby Hsieh <bibby.hsieh@mediatek.com> Reviewed-by: CK Hu <ck.hu@mediatek.com> Reviewed-by: Houlong Wei <houlong.wei@mediatek.com> Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2020-01-08soc: mediatek: cmdq: add polling functionBibby Hsieh1-0/+36
add polling function in cmdq helper functions Signed-off-by: Bibby Hsieh <bibby.hsieh@mediatek.com> Reviewed-by: CK Hu <ck.hu@mediatek.com> Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2020-01-08soc: mediatek: cmdq: define the instruction structBibby Hsieh1-24/+49
Define an instruction structure for gce driver to append command. This structure can make the client's code more readability. Signed-off-by: Bibby Hsieh <bibby.hsieh@mediatek.com> Reviewed-by: CK Hu <ck.hu@mediatek.com> Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2020-01-08soc: mediatek: cmdq: remove OR opertaion from err returnBibby Hsieh1-3/+8
Debugging gets harder if we OR two error return values. Return each error on it's own instead Signed-off-by: Bibby Hsieh <bibby.hsieh@mediatek.com> Reviewed-by: CK Hu <ck.hu@mediatek.com> [mb: rephrase commit message] Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2019-12-05soc: mediatek: cmdq: fixup wrong input order of write apiBibby Hsieh1-1/+1
Fixup a issue was caused by the previous fixup patch. Fixes: 1a92f989126e ("soc: mediatek: cmdq: reorder the parameter") Link: https://lore.kernel.org/r/20191127165428.19662-1-matthias.bgg@gmail.com Cc: <stable@vger.kernel.org> Signed-off-by: Bibby Hsieh <bibby.hsieh@mediatek.com> Reviewed-by: CK Hu <ck.hu@mediatek.com> Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com> Signed-off-by: Olof Johansson <olof@lixom.net>
2019-08-23soc: mediatek: cmdq: change the type of input parameterBibby Hsieh1-5/+5
According to the cmdq hardware design, the subsys is u8, the offset is u16 and the event id is u16. This patch changes the type of subsys, offset and event id to the correct type. Signed-off-by: Bibby Hsieh <bibby.hsieh@mediatek.com> Reviewed-by: CK Hu <ck.hu@mediatek.com> Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2019-08-23soc: mediatek: cmdq: reorder the parameterBibby Hsieh1-3/+3
The order of gce instructions is [subsys offset value] so reorder the parameter of cmdq_pkt_write_mask and cmdq_pkt_write function. Signed-off-by: Bibby Hsieh <bibby.hsieh@mediatek.com> Reviewed-by: CK Hu <ck.hu@mediatek.com> Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2018-12-02soc: mediatek: Add Mediatek CMDQ helperHoulong Wei1-0/+300
Add Mediatek CMDQ helper to create CMDQ packet and assemble GCE op code. Signed-off-by: Houlong Wei <houlong.wei@mediatek.com> Signed-off-by: HS Liao <hs.liao@mediatek.com> Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>