Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3060615ybi; Mon, 29 Jul 2019 00:04:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqxsM5WEvvRj8SZ25FMxkaXKY4MzF+rWohsbq1xHinBJotorlJtzYkk0p0g4myc+j8THJIca X-Received: by 2002:a17:902:4201:: with SMTP id g1mr108750016pld.300.1564383898094; Mon, 29 Jul 2019 00:04:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564383898; cv=none; d=google.com; s=arc-20160816; b=BEkFFqu9GW3wSf2E8LWbQ/tjZtFv7ly5hR7I3q14j5Cz7QL1XAOxmng1LHDSc/i8NV k9CQ7g6PFaLKFtfJzxgyK99v7kJlMTacZYZ1L5ABFvS3aKjr/qvTDUZuiYR0lAFVzyaY HWfHht38cwVSxJxMDnR5R1wCLdvfvdPXQEp8tnPXU4GIgWWy7iUbngh9/D8rgdWtrCYh HJKalpKLcqTrD7WDDNjs9KgvYY5wfpLlWA7+XwZPasiD6jNDz3LvyGVVvSEEO6TwhMFB VgpzeXD69bUwGQiEG4votiNV98qdX7aZcqcoYq4qwuA4+gc3HXc0fbxzlfZKy+VN0cIr qCVw== 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=VBH+4WbrmrJRSsqMb4PH7fzgYDNCpw/bxtEhILETgyE=; b=DRkzdlgRqf1phV9yJgAO/buV/Fyx/CrsVXQGsp7DHsXKz2OFurQMJLpjjrl3kvmhQq zJ1JQ08d5hrddNDEIrPBeG3PWb5v2bY+7LOLeaLVPyrA3G6olKb416RMid5LNgeQx/kH AqXp03aQ7vh9x99yv/lqmSa2/f4TDtQLas0mx3LBxetmhgnYM9WhobjVi+HE2uozjYSm GkNUtwKQPK+gKCy2E0ezKbtnU2vPflvtNgHXe8T+aN7ePUFznrxdK71yHuC/KS3rYTQa klpkaPabktXZ4nkWOMO63PdS6O6kwHvUbdiPzdGfqtSTIIJ6MUWAGPSQ84ifqDhj8sXY 7Y7Q== 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 d7si23939666plr.18.2019.07.29.00.04.42; Mon, 29 Jul 2019 00:04:58 -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 S1727208AbfG2HBW (ORCPT + 99 others); Mon, 29 Jul 2019 03:01:22 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:64135 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726951AbfG2HBR (ORCPT ); Mon, 29 Jul 2019 03:01:17 -0400 X-UUID: 09228d971fc944e99e7050b6524d199e-20190729 X-UUID: 09228d971fc944e99e7050b6524d199e-20190729 Received: from mtkcas06.mediatek.inc [(172.21.101.30)] by mailgw01.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0707 with TLS) with ESMTP id 1515558554; Mon, 29 Jul 2019 15:01:07 +0800 Received: from mtkcas09.mediatek.inc (172.21.101.178) by mtkmbs07n1.mediatek.inc (172.21.101.16) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Mon, 29 Jul 2019 15:01:08 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkcas09.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Mon, 29 Jul 2019 15:01:08 +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 v11 00/12] support gce on mt8183 platform Date: Mon, 29 Jul 2019 15:00:54 +0800 Message-ID: <20190729070106.9332-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 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 | 170 +++++++++++++---- 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, 395 insertions(+), 61 deletions(-) create mode 100644 include/dt-bindings/gce/mt8183-gce.h -- 2.18.0