From patchwork Wed Jul 25 01:26:38 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "houlong.wei" X-Patchwork-Id: 10543387 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0EBEB180E for ; Wed, 25 Jul 2018 01:27:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4012929660 for ; Wed, 25 Jul 2018 01:27:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 32DA82966E; Wed, 25 Jul 2018 01:27:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E204F29660 for ; Wed, 25 Jul 2018 01:27:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=Qxs8ckuJy5c8dWn6/nm7ki2Q+axmNUhc62E4gIcNk3o=; b=dTgjGAwAuJgaAs l92e+57b+UGaP5OnpqCP1WtHW8H8Kb1bR5nqLQ3DcLkae0LwWU45obWJz6ZBeeuSNVI2jRikzBo0h +WkQQiHIcqmDrOywmlocFmt5MKQzbthohoRDfOTln7nGnTKilUldhrpaQKSWYqBPpEtCIQlEVN1tY buDmiUVTEpalkqUV7eN9obzSVyitls37V0Osm6bAbvUTKlcVk3FYtFhCY6PHDmfMW9kg/+bumOl4p IsUQcPYWHU+eAMZoWGtoBkNjp1Fe+ltAZY7UkpNBjXrD2vUdzyBIb5QxzSByqDMFe4fGMdZ5KiHRc m9Frz1qNvCyIElz9wdjA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fi8aX-0004Am-6N; Wed, 25 Jul 2018 01:27:37 +0000 Received: from [210.61.82.183] (helo=mailgw01.mediatek.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fi8aK-0003xf-7y; Wed, 25 Jul 2018 01:27:26 +0000 X-UUID: f80a00c0099b48c69db80ab43e6ab9be-20180725 Received: from mtkcas09.mediatek.inc [(172.21.101.178)] by mailgw01.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 491444132; Wed, 25 Jul 2018 09:27:06 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs02n1.mediatek.inc (172.21.101.77) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Wed, 25 Jul 2018 09:27:04 +0800 Received: from localhost.localdomain (10.17.3.153) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1210.3 via Frontend Transport; Wed, 25 Jul 2018 09:27:02 +0800 From: Houlong Wei To: Jassi Brar , Matthias Brugger , Rob Herring Subject: [PATCH v23 0/4] MediaTek MT8173 CMDQ support Date: Wed, 25 Jul 2018 09:26:38 +0800 Message-ID: <1532482002-11164-1-git-send-email-houlong.wei@mediatek.com> X-Mailer: git-send-email 1.7.9.5 MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180724_182724_417605_E7F42F93 X-CRM114-Status: GOOD ( 10.67 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Nicolas Boichat , Philipp Zabel , srv_heupstream@mediatek.com, Daoyuan Huang , Sascha Hauer , linux-kernel@vger.kernel.org, HS Liao , Dennis-YC Hsieh , Monica Wang , linux-mediatek@lists.infradead.org, Houlong Wei , Sascha Hauer , enzhu.wang@mediatek.com, CK HU , Jiaguang Zhang , Bibby Hsieh , linux-arm-kernel@lists.infradead.org, ginny.chen@mediatek.com Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Hi, This is Mediatek MT8173 Command Queue(CMDQ) driver. The CMDQ is used to help write registers with critical time limitation, such as updating display configuration during the vblank. It controls Global Command Engine (GCE) hardware to achieve this requirement. Changes since v22: -remove properties 'timeout' and 'thread-num' from device tree -move timer from CMDQ driver to CMDQ helper -move dma unmap from CMDQ driver to CMDQ helper -config thread number in CMDQ match table -remove reallocate mechanism and let client specify the cmdq buffer size -let client specify the timeout time Changes since v21: -rebase on v4.18-rc1 -remove subsys code and event id definition from mtk-cmdq-helper.c -add mt8173-gce.h to define the subsys code and envent id Changes since v20: -rebase on v4.15-rc1 -move dma_map_single outside of spinlock Changes since v19: - rebase to v4.10-rc2 Houlong Wei (4): dt-bindings: soc: Add documentation for the MediaTek GCE unit mailbox: mediatek: Add Mediatek CMDQ driver arm64: dts: mt8173: Add GCE node soc: mediatek: Add Mediatek CMDQ helper .../devicetree/bindings/mailbox/mtk-gce.txt | 57 +++ arch/arm64/boot/dts/mediatek/mt8173.dtsi | 10 + drivers/mailbox/Kconfig | 10 + drivers/mailbox/Makefile | 2 + drivers/mailbox/mtk-cmdq-mailbox.c | 569 +++++++++++++++++++++ drivers/soc/mediatek/Kconfig | 12 + drivers/soc/mediatek/Makefile | 1 + drivers/soc/mediatek/mtk-cmdq-helper.c | 291 +++++++++++ include/dt-bindings/gce/mt8173-gce.h | 44 ++ include/linux/mailbox/mtk-cmdq-mailbox.h | 77 +++ include/linux/soc/mediatek/mtk-cmdq.h | 135 +++++ 11 files changed, 1208 insertions(+) create mode 100644 Documentation/devicetree/bindings/mailbox/mtk-gce.txt create mode 100644 drivers/mailbox/mtk-cmdq-mailbox.c create mode 100644 drivers/soc/mediatek/mtk-cmdq-helper.c create mode 100644 include/dt-bindings/gce/mt8173-gce.h create mode 100644 include/linux/mailbox/mtk-cmdq-mailbox.h create mode 100644 include/linux/soc/mediatek/mtk-cmdq.h