Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3060655ybi; Mon, 29 Jul 2019 00:05:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqyq5ZWQtQoVMwZQYIDP0q3QZE/iPrAISlwbFbFxh4ksmAclt9TfZ5UNuCiEEIXOKnGeZPSB X-Received: by 2002:a17:902:a413:: with SMTP id p19mr109384303plq.134.1564383900573; Mon, 29 Jul 2019 00:05:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564383900; cv=none; d=google.com; s=arc-20160816; b=Ni8EZILrY7ZJaSauo2zfgKlHLdxkedI0pqs3Zg0XjysRj5ipEHrOkAIgUZw2mMFF1N LFvUUJ5bHFvIlE4/DzRD/QvPP5lUnbWi0Cb4ySCxkKfnV67+/0zUQQCJuESw+xg3nftK CCW8RnaxcGOlar1WRQoMSm1HZmrOdV+69nzw/yORj5YkK7Y186fXh6UuhZTnvtInvZ3N 6t7HkTy1IFnoog4mZCGJ4eGFDtlkG6DU5HakM/iwyY06Tlz+0VlNlB4mpCr0RkQUTFxh k9kbktuc7vpwIQQJFjreC3lGa6RPqbk9rRGVfgVNzNeByFexxgLvner8vH0UyDLYkYGw DPtQ== 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=yVi4veTQHmEkp5zH9XvdQLaSKHvaRQ2yGcEGYlZrEVtBkghdUGeraxTNjsu+ZU3Qsc 1iYafbzwLg/C0g3JXp6xHMP/3c/9f/sDsRdZfy3kGn07lwm/0uqJHDB9yVRKGcGKq45X +9Ckldt+EMPWaypDf5G23nlPsIvPT1Bxumrxg190ZeNAvZTNONRlti5/vTEC9FzmYP59 MrXndRVWuG7UOuxfWh3hO8KCHYj/xKePtQRRFkGASuRjjWIE5k1PYXKJuEDE5cl/4aHX lWXYaMdGqe0QU+yg7qoCGWaa9mvs2mmwcxdyPuRzfZXZqmC/2KgcK8tpXIdpDlTmwFdm DY8Q== 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 i64si27788705pge.307.2019.07.29.00.04.45; Mon, 29 Jul 2019 00:05:00 -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 S1727335AbfG2HBd (ORCPT + 99 others); Mon, 29 Jul 2019 03:01:33 -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 S1727149AbfG2HBY (ORCPT ); Mon, 29 Jul 2019 03:01:24 -0400 X-UUID: 227b2936150e49ada9adae42fad49f0a-20190729 X-UUID: 227b2936150e49ada9adae42fad49f0a-20190729 Received: from mtkcas08.mediatek.inc [(172.21.101.126)] by mailgw01.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0707 with TLS) with ESMTP id 788266101; Mon, 29 Jul 2019 15:01:07 +0800 Received: from mtkcas09.mediatek.inc (172.21.101.178) by mtkmbs01n1.mediatek.inc (172.21.101.68) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Mon, 29 Jul 2019 15:01:09 +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:10 +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 07/12] soc: mediatek: cmdq: reorder the parameter Date: Mon, 29 Jul 2019 15:01:01 +0800 Message-ID: <20190729070106.9332-8-bibby.hsieh@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20190729070106.9332-1-bibby.hsieh@mediatek.com> References: <20190729070106.9332-1-bibby.hsieh@mediatek.com> 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 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