Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp3768910ybl; Tue, 20 Aug 2019 01:52:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqx/6iUamGAkKHs0asLlK6svYBhSICckG/73O95cKf3DOBiGpOjn/QwNXBETrYcMHKUkkiFy X-Received: by 2002:a17:90a:fa0a:: with SMTP id cm10mr25155617pjb.133.1566291173541; Tue, 20 Aug 2019 01:52:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566291173; cv=none; d=google.com; s=arc-20160816; b=OYWY8n5+jcoZpDSDgyGOa7rFrJGqBPn+KxoTzU5lyhF9xQwEKJPBR2rfLlySI72YSj ot3n5FCEczwFsRl3ZUJO3Ecm90Fbk96vVV62Dv0UBCoLfSkK8qhCE9L3aUnvJeK88Orb SwEKgqeJFRD0/1wMldSxDW9OBa8bFEfTW+bOrss2nr4iwc8Y8CgI5Zj3Ttpfh/n9nETZ 1ne5HQNydInfIO0LiVo1FK8RNbNcdAGfb1vWFyLvfZaPeT/2F0RfOAip/LGBFSNIA1Rk aN6nmKLMZOMBJ5fgw961Ysod2Uo8YYcaDwytR0cPnczBMxUwqWqMlMXqmQYzmPeQ+sqr 3S/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=V6YNBlhulTulzv6HdanV7rAk99QP4O2bxDhkA1seIYY=; b=tuO6jLGT/IBIrMbpRGHcNTE2qJERfB2CYb1x7OcpfgliTP+q3nIIJzXwoOb98hed8S TXV6k1e0+0QtykzRheIy5EOOMO49sSE8T7Yp0991/AOLPnSx5tISuyfcB1B3Drvhw71H ATUVHS/O2N0WqbznfH2+eIdWh00S8oELkQheiUcoErcr9FunyNeOwzpHQvRhWNnCLb65 h4+CpUrYncrfvsnwuH59tmPol2dsbs6/LR60fltcH+A/vkf2u1XREMadUtg6VZcMCli7 xPZfCFBegj1P6PHwZExXIrMBIS52J/IPu/NMzkU+wva55jQXQivDLdD6aehGyC6i8mjw oNZQ== 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 a63si5088170pla.54.2019.08.20.01.52.38; Tue, 20 Aug 2019 01:52:53 -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 S1729592AbfHTIud (ORCPT + 99 others); Tue, 20 Aug 2019 04:50:33 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:3362 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1729471AbfHTItm (ORCPT ); Tue, 20 Aug 2019 04:49:42 -0400 X-UUID: 3c23b414eee84ad8b92a0362f3c7a2a7-20190820 X-UUID: 3c23b414eee84ad8b92a0362f3c7a2a7-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 1457221581; Tue, 20 Aug 2019 16:49:35 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by mtkmbs08n2.mediatek.inc (172.21.101.56) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 20 Aug 2019 16:49:35 +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:32 +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 07/12] soc: mediatek: cmdq: reorder the parameter Date: Tue, 20 Aug 2019 16:49:27 +0800 Message-ID: <20190820084932.22282-8-bibby.hsieh@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20190820084932.22282-1-bibby.hsieh@mediatek.com> References: <20190820084932.22282-1-bibby.hsieh@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-TM-SNTS-SMTP: BA5AB19D8A34E2B035AD34C2595402A83C1C6A4EED0BAD28E928D0AC720751AF2000:8 X-MTK: N Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The order of gce instructions is [subsys offset value] so reorder the parameter of cmdq_pkt_write_mask and cmdq_pkt_write function. Signed-off-by: Bibby Hsieh Reviewed-by: CK Hu --- drivers/soc/mediatek/mtk-cmdq-helper.c | 6 +++--- include/linux/soc/mediatek/mtk-cmdq.h | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/soc/mediatek/mtk-cmdq-helper.c b/drivers/soc/mediatek/mtk-cmdq-helper.c index ff9fef5a032b..082b8978651e 100644 --- a/drivers/soc/mediatek/mtk-cmdq-helper.c +++ b/drivers/soc/mediatek/mtk-cmdq-helper.c @@ -136,7 +136,7 @@ static int cmdq_pkt_append_command(struct cmdq_pkt *pkt, enum cmdq_code code, return 0; } -int cmdq_pkt_write(struct cmdq_pkt *pkt, u32 value, u32 subsys, u32 offset) +int cmdq_pkt_write(struct cmdq_pkt *pkt, u32 subsys, u32 offset, u32 value) { u32 arg_a = (offset & CMDQ_ARG_A_WRITE_MASK) | (subsys << CMDQ_SUBSYS_SHIFT); @@ -145,8 +145,8 @@ int cmdq_pkt_write(struct cmdq_pkt *pkt, u32 value, u32 subsys, u32 offset) } EXPORT_SYMBOL(cmdq_pkt_write); -int cmdq_pkt_write_mask(struct cmdq_pkt *pkt, u32 value, - u32 subsys, u32 offset, u32 mask) +int cmdq_pkt_write_mask(struct cmdq_pkt *pkt, u32 subsys, + u32 offset, u32 value, u32 mask) { u32 offset_mask = offset; int err = 0; diff --git a/include/linux/soc/mediatek/mtk-cmdq.h b/include/linux/soc/mediatek/mtk-cmdq.h index 4e8899972db4..39d813dde4b4 100644 --- a/include/linux/soc/mediatek/mtk-cmdq.h +++ b/include/linux/soc/mediatek/mtk-cmdq.h @@ -60,26 +60,26 @@ void cmdq_pkt_destroy(struct cmdq_pkt *pkt); /** * cmdq_pkt_write() - append write command to the CMDQ packet * @pkt: the CMDQ packet - * @value: the specified target register value * @subsys: the CMDQ sub system code * @offset: register offset from CMDQ sub system + * @value: the specified target register value * * Return: 0 for success; else the error code is returned */ -int cmdq_pkt_write(struct cmdq_pkt *pkt, u32 value, u32 subsys, u32 offset); +int cmdq_pkt_write(struct cmdq_pkt *pkt, u32 subsys, u32 offset, u32 value); /** * cmdq_pkt_write_mask() - append write command with mask to the CMDQ packet * @pkt: the CMDQ packet - * @value: the specified target register value * @subsys: the CMDQ sub system code * @offset: register offset from CMDQ sub system + * @value: the specified target register value * @mask: the specified target register mask * * Return: 0 for success; else the error code is returned */ -int cmdq_pkt_write_mask(struct cmdq_pkt *pkt, u32 value, - u32 subsys, u32 offset, u32 mask); +int cmdq_pkt_write_mask(struct cmdq_pkt *pkt, u32 subsys, + u32 offset, u32 value, u32 mask); /** * cmdq_pkt_wfe() - append wait for event command to the CMDQ packet -- 2.18.0