Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp3768873ybl; Tue, 20 Aug 2019 01:52:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqzje2RV05Unc7YizgkKRupzzW7aMaSGHhjz5dFKOq/kEhaO/lWXSNrAx36/xzxRtjHdSUSM X-Received: by 2002:a17:902:4643:: with SMTP id o61mr26927378pld.101.1566291170884; Tue, 20 Aug 2019 01:52:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566291170; cv=none; d=google.com; s=arc-20160816; b=OELYo42xopb6V8gOwhK1JLSMA0doqecBlMlqdhirKXflBoQfqLO4MftSyfmpSW48tw Lr9LRxyQVnQ+tQrzaHwIA3amKlSBz0SBrEywwkpo84bzuk0ZlzudxZEpsPVPLSwInUF+ sazlVL7hSj6jp+udiwB6CvOYcseQ/WU2st2zJS7kHpVcwxdh7j11lrGU+mXo/VP8yCqR NLmJ3I1KAbLjDifSmk/uxsk16XLfTlywBn8BNHfjoj7AzHyNehZorG6ni6Ng2EA0unnY 5/TwBAZ4j+75Zgd0MYVza6jTOCF8/JoKX+x/7YAUIyOq1/JsFY5pXqFfsFj5Mdl9sm/k fa4g== 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=+NrBnSd1j2yLPVO7naS98ygZKTRNAojlBZWyObJ3LTY=; b=qkucLAr0ktAruYCiWOM7bCVA9VurFHLpjPBKRCoR+Umuu3euMaMsXvAfdcU5c88+2T 0TtnynCRdf2QrebZ06/OoAs5FON2ljTMUFoP0O7hShx7W4bxKeUuvuU2nE1+ujvXoNRP QKq0+SMVY+FqHVFx6JjIvjYmDg8NVBdkjV26RXrNrkT4nLRKZuCXSLYa6DqimJBxjjHu NoIujGL7MQ22BDDZ2hw3kOEg8LQ7G1qTm0DbBZqP73wHSQGn+wO41pANsJ0vnC9l6THc 8Iw1uVTQlfg/Lfb++sHgykKobdEKAqGi/qwUqZlaY2D3H0IwL+eSekR4zbO+ij0stkSr sMBA== 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 t27si11585774pgk.502.2019.08.20.01.52.36; Tue, 20 Aug 2019 01:52:50 -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 S1729740AbfHTIuM (ORCPT + 99 others); Tue, 20 Aug 2019 04:50:12 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:4919 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1729611AbfHTIto (ORCPT ); Tue, 20 Aug 2019 04:49:44 -0400 X-UUID: c046de28b37a4f818752f358034b2362-20190820 X-UUID: c046de28b37a4f818752f358034b2362-20190820 Received: from mtkcas07.mediatek.inc [(172.21.101.84)] by mailgw02.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0707 with TLS) with ESMTP id 973749505; Tue, 20 Aug 2019 16:49:33 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by mtkmbs07n2.mediatek.inc (172.21.101.141) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 20 Aug 2019 16:49:32 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Tue, 20 Aug 2019 16:49:31 +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: [RESEND, PATCH v13 00/12] support gce on mt8183 platform Date: Tue, 20 Aug 2019 16:49:20 +0800 Message-ID: <20190820084932.22282-1-bibby.hsieh@mediatek.com> X-Mailer: git-send-email 2.18.0 MIME-Version: 1.0 Content-Type: text/plain X-MTK: N Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Changes since v12: - clear the value of command ptr address. - fixup some typo and remove unused define. 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 | 173 +++++++++++++---- include/dt-bindings/gce/mt8183-gce.h | 175 ++++++++++++++++++ include/linux/mailbox/mtk-cmdq-mailbox.h | 5 + include/linux/soc/mediatek/mtk-cmdq.h | 53 +++++- 7 files changed, 395 insertions(+), 62 deletions(-) create mode 100644 include/dt-bindings/gce/mt8183-gce.h -- 2.18.0