From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6D564C04AAC for ; Tue, 21 May 2019 02:31:00 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3DB192171F for ; Tue, 21 May 2019 02:31:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="fdpRzx8o" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3DB192171F Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=mediatek.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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:References:In-Reply-To: Date:To:From:Subject:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=sJsjRqt0sbP6dZbzv62pt2oI/7G6mw1zJKdbvk5kTFY=; b=fdpRzx8oypUnG/ +QPxBPnS0STJepN0De+cW9yNlgjMI0oCOYWKmSPBNlw37Cvvp3UHlEzNH91Lo2KbZTy2WhECwU0l6 EYNcDcdiPb/D5sOxrRszC4XxvDEjmCUZWWhCdVS8GJ+xxONWKhd0hKMPCQx4qITwc93nBpApvK12c 3GWH/wTF2GrBW0V/CMTaNQcoW1apbZ6qAcJdbeCYhv9eVJEDI2y4/t/JVw8yiVDo18+t93qEP9Al1 KJBneGhRKYfzTwkl2sd0Py3/jfApYM23h06HQbl4y8swr4ei7z0DV2oloUQ+dE2+xTNjEeTA8HIqk 3DE4V+jmXFbIG/t2sMKQ==; 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 1hSuYG-0000Pa-Be; Tue, 21 May 2019 02:30:52 +0000 Received: from mailgw01.mediatek.com ([216.200.240.184]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hSuYD-0000Ox-Cp; Tue, 21 May 2019 02:30:50 +0000 X-UUID: 26243c531dc545f089beab8469938b2d-20190520 X-UUID: 26243c531dc545f089beab8469938b2d-20190520 Received: from mtkcas66.mediatek.inc [(172.29.193.44)] by mailgw01.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLS) with ESMTP id 1771749030; Mon, 20 May 2019 18:30:30 -0800 Received: from mtkmbs03n2.mediatek.inc (172.21.101.182) by MTKMBS62N2.mediatek.inc (172.29.193.42) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Mon, 20 May 2019 19:30:29 -0700 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs03n2.mediatek.inc (172.21.101.182) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 21 May 2019 10:30:21 +0800 Received: from [172.21.77.4] (172.21.77.4) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Tue, 21 May 2019 10:30:21 +0800 Message-ID: <1558405821.25526.2.camel@mtksdaap41> Subject: Re: [PATCH v7 08/12] soc: mediatek: cmdq: change the type of input parameter From: CK Hu To: Bibby Hsieh Date: Tue, 21 May 2019 10:30:21 +0800 In-Reply-To: <20190521011108.40428-9-bibby.hsieh@mediatek.com> References: <20190521011108.40428-1-bibby.hsieh@mediatek.com> <20190521011108.40428-9-bibby.hsieh@mediatek.com> X-Mailer: Evolution 3.10.4-0ubuntu2 MIME-Version: 1.0 X-TM-SNTS-SMTP: E88ADBB64ED6F6756962BB9AC0D0364B8ABFDF368B7F2FE8B55D8484F273F8A92000:8 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190520_193049_437880_34B523F6 X-CRM114-Status: GOOD ( 15.35 ) X-BeenThere: linux-arm-kernel@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 , Jassi Brar , linux-kernel@vger.kernel.org, Daniel Kurtz , Dennis-YC Hsieh , YT Shen , Rob Herring , linux-mediatek@lists.infradead.org, Houlong Wei , Sascha Hauer , Matthias Brugger , Jiaguang Zhang , linux-arm-kernel@lists.infradead.org, ginny.chen@mediatek.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi, Bibby: On Tue, 2019-05-21 at 09:11 +0800, Bibby Hsieh wrote: > According to the cmdq hardware design, the subsys is u8, > the offset is u16 and the event id is u16. > This patch changes the type of subsys, offset and event id > to the correct type. Reviewed-by: CK Hu > > Signed-off-by: Bibby Hsieh > --- > drivers/soc/mediatek/mtk-cmdq-helper.c | 10 +++++----- > include/linux/soc/mediatek/mtk-cmdq.h | 10 +++++----- > 2 files changed, 10 insertions(+), 10 deletions(-) > > diff --git a/drivers/soc/mediatek/mtk-cmdq-helper.c b/drivers/soc/mediatek/mtk-cmdq-helper.c > index 082b8978651e..7aa0517ff2f3 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 subsys, u32 offset, u32 value) > +int cmdq_pkt_write(struct cmdq_pkt *pkt, u8 subsys, u16 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 subsys, u32 offset, u32 value) > } > EXPORT_SYMBOL(cmdq_pkt_write); > > -int cmdq_pkt_write_mask(struct cmdq_pkt *pkt, u32 subsys, > - u32 offset, u32 value, u32 mask) > +int cmdq_pkt_write_mask(struct cmdq_pkt *pkt, u8 subsys, > + u16 offset, u32 value, u32 mask) > { > u32 offset_mask = offset; > int err = 0; > @@ -161,7 +161,7 @@ int cmdq_pkt_write_mask(struct cmdq_pkt *pkt, u32 subsys, > } > EXPORT_SYMBOL(cmdq_pkt_write_mask); > > -int cmdq_pkt_wfe(struct cmdq_pkt *pkt, u32 event) > +int cmdq_pkt_wfe(struct cmdq_pkt *pkt, u16 event) > { > u32 arg_b; > > @@ -181,7 +181,7 @@ int cmdq_pkt_wfe(struct cmdq_pkt *pkt, u32 event) > } > EXPORT_SYMBOL(cmdq_pkt_wfe); > > -int cmdq_pkt_clear_event(struct cmdq_pkt *pkt, u32 event) > +int cmdq_pkt_clear_event(struct cmdq_pkt *pkt, u16 event) > { > if (event >= CMDQ_MAX_EVENT) > return -EINVAL; > diff --git a/include/linux/soc/mediatek/mtk-cmdq.h b/include/linux/soc/mediatek/mtk-cmdq.h > index 39d813dde4b4..9618debb9ceb 100644 > --- a/include/linux/soc/mediatek/mtk-cmdq.h > +++ b/include/linux/soc/mediatek/mtk-cmdq.h > @@ -66,7 +66,7 @@ void cmdq_pkt_destroy(struct cmdq_pkt *pkt); > * > * Return: 0 for success; else the error code is returned > */ > -int cmdq_pkt_write(struct cmdq_pkt *pkt, u32 subsys, u32 offset, u32 value); > +int cmdq_pkt_write(struct cmdq_pkt *pkt, u8 subsys, u16 offset, u32 value); > > /** > * cmdq_pkt_write_mask() - append write command with mask to the CMDQ packet > @@ -78,8 +78,8 @@ int cmdq_pkt_write(struct cmdq_pkt *pkt, u32 subsys, u32 offset, u32 value); > * > * Return: 0 for success; else the error code is returned > */ > -int cmdq_pkt_write_mask(struct cmdq_pkt *pkt, u32 subsys, > - u32 offset, u32 value, u32 mask); > +int cmdq_pkt_write_mask(struct cmdq_pkt *pkt, u8 subsys, > + u16 offset, u32 value, u32 mask); > > /** > * cmdq_pkt_wfe() - append wait for event command to the CMDQ packet > @@ -88,7 +88,7 @@ int cmdq_pkt_write_mask(struct cmdq_pkt *pkt, u32 subsys, > * > * Return: 0 for success; else the error code is returned > */ > -int cmdq_pkt_wfe(struct cmdq_pkt *pkt, u32 event); > +int cmdq_pkt_wfe(struct cmdq_pkt *pkt, u16 event); > > /** > * cmdq_pkt_clear_event() - append clear event command to the CMDQ packet > @@ -97,7 +97,7 @@ int cmdq_pkt_wfe(struct cmdq_pkt *pkt, u32 event); > * > * Return: 0 for success; else the error code is returned > */ > -int cmdq_pkt_clear_event(struct cmdq_pkt *pkt, u32 event); > +int cmdq_pkt_clear_event(struct cmdq_pkt *pkt, u16 event); > > /** > * cmdq_pkt_flush_async() - trigger CMDQ to asynchronously execute the CMDQ _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel