Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp2158738ybl; Sun, 18 Aug 2019 19:56:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqyvttGdnAhppWfoDDIooCwoENGFdLhXxGMopOHqPEy/WCbbXRETtiNQPkgvWviLt5onQnD/ X-Received: by 2002:a17:902:1027:: with SMTP id b36mr19729328pla.203.1566183364167; Sun, 18 Aug 2019 19:56:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566183364; cv=none; d=google.com; s=arc-20160816; b=E8AcE2Ibo72m55Q2hoFm20df/SH2opPutSd247KY561N84q2C9axufjXhDFJU/C6e0 uS5bK2696w+7Oxm3l5Ni0PigeEEEcA7boz7vUGz4C0h2AvFrtJHOlu8ht1Xz/RBh9qqw 3j4yGlKLuj+am013Z1OTyEgLy1jE6/9lrgDNUh1vYuiSNFYoN/WCjtTkPYHgfPuCc2EB wLVwAf/ke/XeajdyemtWf9MXasK/pj7qjPIuX8eHX36vIElr1wOA0kb1ar1qn20y2+jR H3nJlgzWryhDfl9GNPLLFro5J2yVG2wxlpIBxsqbcfMJqLwAVcjvhqhbNXvI5FUfbt2+ 7q7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=Lz4/56Nx5lqFaOcgGL0OuE2eqdOFomB7kr4bmMUNioE=; b=ryaMmJjBHAtdZqwjyZRxJnOiG35uCSGhI0VjLNVWkn/ltBIL9Gr2xQpS5pyU0Ylqjs tZr01ACUwbh7awyHiWWaxsGmMUawetB4ZcSGNUiPw3qJEPhKgoa7dVyOoSZiIkbBdvgk 5Ugm1Ow1JUaAQuws5DrxvZDtJXR1pLm1Njyabk4fNWBbHS7wO1MxrVMbF0h5aNfUIyU9 r4B/ROaMPsrRjYgGwMPluvT46M83PyA3a7+G2slaFGYVE9detetNX6j7r/km/Eo2MKmf 626vZsCVZsgKFanwcblAdggg72Q2gGLPHsLrbMmDQuCHjvlWnpqn3baM2F82wLXPMdro JAwA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n5si7969663pgd.527.2019.08.18.19.55.49; Sun, 18 Aug 2019 19:56:04 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726703AbfHSCyj (ORCPT + 99 others); Sun, 18 Aug 2019 22:54:39 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:44743 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726509AbfHSCyO (ORCPT ); Sun, 18 Aug 2019 22:54:14 -0400 X-UUID: 8d35b9cc98fc41b9bb8235c345b0d536-20190819 X-UUID: 8d35b9cc98fc41b9bb8235c345b0d536-20190819 Received: from mtkcas09.mediatek.inc [(172.21.101.178)] by mailgw01.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0707 with TLS) with ESMTP id 1775183132; Mon, 19 Aug 2019 10:54:07 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs08n2.mediatek.inc (172.21.101.56) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Mon, 19 Aug 2019 10:54:01 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Mon, 19 Aug 2019 10:54:01 +0800 From: Bibby Hsieh To: Jassi Brar , Matthias Brugger , Rob Herring , CK HU CC: Daniel Kurtz , Sascha Hauer , , , , , , Sascha Hauer , Philipp Zabel , Nicolas Boichat , YT Shen , Daoyuan Huang , Jiaguang Zhang , Dennis-YC Hsieh , Houlong Wei , , Bibby Hsieh Subject: [PATCH v12 00/12] support gce on mt8183 platform Date: Mon, 19 Aug 2019 10:53:47 +0800 Message-ID: <20190819025359.11381-1-bibby.hsieh@mediatek.com> X-Mailer: git-send-email 2.18.0 MIME-Version: 1.0 Content-Type: text/plain X-TM-SNTS-SMTP: 98900A4E4EA349DAEB7B18FB1F3E8B7A3BF8FAEADF1C684E94E501FF92E8AB052000:8 X-MTK: N Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Changes since v11: - correct some data type to avoid type conversion. Changes since v10: - remove subsys-cell from gce device node - use of_parse_phandle_with_fixed_args instead of of_parse_phandle_with_args Changes since v8 and v9: - change the error return code in cmdq_dev_get_client_reg() Changes since v7: - remove the memory allocation out of cmdq_dev_get_client_reg() - rebase onto 5.2-rc1 Changes since v6: - remove cmdq_dev_get_event function and gce event property - separate some changes to indepentent patch - change the binding document related to gce-client-reg property Changes since v5: - fix typo - remove gce-event-name form the dt-binding - add reasons in commit message Changes since v4: - refine the architecture of the packet encoder function - refine the gce enevt property - change the patch's title Changes since v3: - fix a typo in dt-binding and dtsi - cast the return value to right format Changes since v2: - according to CK's review comment, change the property name and refine the parameter - change the patch's title - remove unused property from dt-binding and dts Changes since v1: - add prefix "cmdq" in the commit subject - add dt-binding document for get event and subsys function - add fix up tag in fixup patch - fix up some coding style (alignment) MTK will support gce function on mt8183 platform. dt-binding: gce: add gce header file for mt8183 mailbox: mediatek: cmdq: support mt8183 gce function arm64: dts: add gce node for mt8183 Besides above patches, we refine gce driver on those patches. soc: mediatek: cmdq: reorder the parameter soc: mediatek: cmdq: change the type of input parameter mailbox: mediatek: cmdq: move the CMDQ_IRQ_MASK into cmdq driver data soc: mediatek: cmdq: clear the event in cmdq initial flow In order to enhance the convenience of gce usage, we add new helper functions and refine the method of instruction combining. dt-binding: gce: remove thread-num property dt-binding: gce: add binding for gce client reg property soc: mediatek: cmdq: define the instruction struct soc: mediatek: cmdq: add polling function soc: mediatek: cmdq: add cmdq_dev_get_client_reg function Bibby Hsieh (12): dt-binding: gce: remove thread-num property dt-binding: gce: add gce header file for mt8183 dt-binding: gce: add binding for gce client reg property mailbox: mediatek: cmdq: move the CMDQ_IRQ_MASK into cmdq driver data mailbox: mediatek: cmdq: support mt8183 gce function soc: mediatek: cmdq: clear the event in cmdq initial flow soc: mediatek: cmdq: reorder the parameter soc: mediatek: cmdq: change the type of input parameter soc: mediatek: cmdq: define the instruction struct soc: mediatek: cmdq: add polling function soc: mediatek: cmdq: add cmdq_dev_get_client_reg function arm64: dts: add gce node for mt8183 .../devicetree/bindings/mailbox/mtk-gce.txt | 23 ++- arch/arm64/boot/dts/mediatek/mt8183.dtsi | 10 + drivers/mailbox/mtk-cmdq-mailbox.c | 18 +- drivers/soc/mediatek/mtk-cmdq-helper.c | 172 +++++++++++++---- include/dt-bindings/gce/mt8183-gce.h | 177 ++++++++++++++++++ include/linux/mailbox/mtk-cmdq-mailbox.h | 5 + include/linux/soc/mediatek/mtk-cmdq.h | 53 +++++- 7 files changed, 396 insertions(+), 62 deletions(-) create mode 100644 include/dt-bindings/gce/mt8183-gce.h -- 2.18.0