Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp3116132imm; Sun, 7 Oct 2018 20:44:21 -0700 (PDT) X-Google-Smtp-Source: ACcGV63EQTXHo22NXeT1TQ9lDr9FewqhKJ2Bc39bfoMBIuOv5VmBQh9/kDh1PRLUaa8EQXwjR0Cr X-Received: by 2002:a17:902:7b84:: with SMTP id w4-v6mr21550434pll.32.1538970261835; Sun, 07 Oct 2018 20:44:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538970261; cv=none; d=google.com; s=arc-20160816; b=GJvPY1EIAaIEx1mshKG3SkX3wo9PV+bwcAXQ65yy4tQZA44UwoKJpEgiLkXYCL/FmO m1M7j7/yFQA+rz3b9K73Tx11nTJpKUHHFs8Y5GuGIoVCRA/8kxQKMOXJKTWYBvYcXSV1 TGwEJ0nzjkthNQKdgsiH/zTjjz0m4QKXAJgFH2SttCvfPqfpqG6+WnfDNoZH1H3m0IPv es/Y6HSHhNieXxdZtBzm7dWzJefem0DwIalRbAIpROAW8vRQ21oL5U7nlcgu6fT+dCco 3MHtpk3kMVbtTIlQxnw231zpNrVqICFzcInXG+CIDXKs32MbNDB8FKLDT6Cpw9f3GpU5 cvww== 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=xbee5BfIvbbA/1qCdAOcxJDyVaPJL7cedmMDfp/0h6U=; b=SD7LaWyyHj7nEpxB+F+Ald+hCu2icpcfnuPF9xuIz/kApuRyXYe/DLwc5t3nC4m3+7 irhYdoL/LWB0rgrQDQExqfvnwuVZwcIbJWHeRPN9EqlS2xpIWsjhOGsJGQ+rLK/JQr6P J5o2rm9mgl1eqRxpFNXRDH6+oSLlnNaM3mT73XsYqNNCF7A28lhlShyMEmVTNplZRCdk gpHCNA4TE/9W1MJwnnDOO8yLCCmZzCoUSxTh6wKJkGHBbC7UGs4k34rZ/ovpnzSV36RA nwGmbikfmLXBzvA8AxJX2/aB1K2Q7KSSjomw+bmsOzhamLKIxahBBbbykpMjSS2Zrs1z Mkbw== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h63-v6si17657121pfd.228.2018.10.07.20.44.05; Sun, 07 Oct 2018 20:44:21 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726691AbeJHKxg (ORCPT + 99 others); Mon, 8 Oct 2018 06:53:36 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:36899 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726113AbeJHKxg (ORCPT ); Mon, 8 Oct 2018 06:53:36 -0400 X-UUID: de15c2f054324dad9ba2a00c32bd0822-20181008 X-UUID: de15c2f054324dad9ba2a00c32bd0822-20181008 Received: from mtkcas06.mediatek.inc [(172.21.101.30)] by mailgw02.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 91106229; Mon, 08 Oct 2018 11:43:43 +0800 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by mtkmbs03n1.mediatek.inc (172.21.101.181) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Mon, 8 Oct 2018 11:43:42 +0800 Received: from localhost.localdomain (10.17.3.153) by MTKCAS06.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Mon, 8 Oct 2018 11:43:40 +0800 From: Houlong Wei To: Matthias Brugger CC: Jassi Brar , Rob Herring , Daniel Kurtz , Sascha Hauer , , , , , , Sascha Hauer , Philipp Zabel , Nicolas Boichat , CK HU , Bibby Hsieh , YT Shen , Daoyuan Huang , Jiaguang Zhang , Dennis-YC Hsieh , Monica Wang , Houlong Wei , HS Liao , , , Subject: [PATCH v26 0/2] MediaTek MT8173 CMDQ support Date: Mon, 8 Oct 2018 11:43:22 +0800 Message-ID: <1538970204-7517-1-git-send-email-houlong.wei@mediatek.com> X-Mailer: git-send-email 1.7.9.5 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 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 v25: -Replace WARN_ON() with WARN_ONCE() and add debug information. Changes since v24: -move WARN_ON() into cmdq_pkt_append_command() from outside Changes since v23: -rebase on v4.19-rc1 -revise return value of cmdq_mbox_create() -revise cmdq_pkt_create() -add MODULE_LICENSE() for mtk-cmdq-helper.c -adjust functions order in mtk-cmdq.h 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 (2): arm64: dts: mt8173: Add GCE node soc: mediatek: Add Mediatek CMDQ helper arch/arm64/boot/dts/mediatek/mt8173.dtsi | 10 + drivers/soc/mediatek/Kconfig | 12 ++ drivers/soc/mediatek/Makefile | 1 + drivers/soc/mediatek/mtk-cmdq-helper.c | 292 ++++++++++++++++++++++++++++++ include/linux/soc/mediatek/mtk-cmdq.h | 133 ++++++++++++++ 5 files changed, 448 insertions(+) create mode 100644 drivers/soc/mediatek/mtk-cmdq-helper.c create mode 100644 include/linux/soc/mediatek/mtk-cmdq.h -- 1.7.9.5