Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp2159726ybl; Sun, 18 Aug 2019 19:57:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqxD1gIINedrPiD480fXiwNdkHoEUZEV62SKiuBA2qQhdfPR3dddA0Tuvy1fLVc2pNrOANze X-Received: by 2002:a63:c84d:: with SMTP id l13mr17983199pgi.154.1566183468708; Sun, 18 Aug 2019 19:57:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566183468; cv=none; d=google.com; s=arc-20160816; b=TbB/WC8+s+BJA+9iPnaHG3AO/HCWMl1m6b6L8DyUwn5PLZYt5pIHxD02iUwydHhEFL NQ8IsKEK3eQsZPl2qNw3hyn+fHhDsR036OXpm83pVsLgYZyg29RUQE2FyqltPqmEreXw lmBEFvFDwwj28dTFVDx3IPdB37svV5ixWcYWyTRcslSVvNKKdPjVfjKCMez7TwiD4Xrh nekEw6BGHiYp9siujUn6hJO7dw37NJq/GWMWAo++OGcKSf8UuyepC9J2uIVwUpVFASFv pGEJ9KAx4s1u5AjOg592laMCXpBZNDAiH5L0qP8t0H25BNUtjQ51s78j03Zhdd6XdXXv CiwQ== 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=pWjCv1+KYsnFuyHNIiubyt4ZW650I8wYOhLuZ3px1xgPpjMc5AoYBuRBbaN3tTLsZz N+VoASS4XaGumhe7z8UOxjy7IdT0zYD1hp1kiPqgv6e38wWEaLszoYgbvI5pduH5cCa3 lsMXgqLqrTHrcdnlWTGWNTMdb186Re2wpDPcdHO7oxL8ibfAzTnuQPnTny/PwlWDSc/E a27uNQd5LJrbHZLLGU0Zc+sCGBfpLYZC6CLjLeeEX8Nb5WoTk9qysBSqgDZNr5J5ts53 ++otUfw81aNbKkG/bdMHNpPyoE5e4gZNHaSHd9e2ajiFFvZdGwS3vAnDt8g2bBZn1mqL PbJw== 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 m9si8951603pll.333.2019.08.18.19.57.33; Sun, 18 Aug 2019 19:57:48 -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 S1726769AbfHSCyv (ORCPT + 99 others); Sun, 18 Aug 2019 22:54:51 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:44811 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726186AbfHSCyL (ORCPT ); Sun, 18 Aug 2019 22:54:11 -0400 X-UUID: 711cc049154d441aa253fa77b393a656-20190819 X-UUID: 711cc049154d441aa253fa77b393a656-20190819 Received: from mtkmrs01.mediatek.inc [(172.21.131.159)] by mailgw02.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0707 with TLS) with ESMTP id 1954448429; Mon, 19 Aug 2019 10:54:03 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs02n2.mediatek.inc (172.21.101.101) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Mon, 19 Aug 2019 10:54:02 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Mon, 19 Aug 2019 10:54:02 +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 v12 07/12] soc: mediatek: cmdq: reorder the parameter Date: Mon, 19 Aug 2019 10:53:54 +0800 Message-ID: <20190819025359.11381-8-bibby.hsieh@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20190819025359.11381-1-bibby.hsieh@mediatek.com> References: <20190819025359.11381-1-bibby.hsieh@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-TM-SNTS-SMTP: 778B834D41414594B95B4BBDA7E93C0CA4C6882DA380D084060AA7C5F29153672000: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