From nobody Sun Dec 14 11:34:18 2025 Received: from mailgw02.mediatek.com (unknown [210.61.82.184]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0228430F555; Fri, 17 Oct 2025 06:50:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=210.61.82.184 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760683846; cv=none; b=oywm2RFCNiF7DrG8L7BL7zJ8Cw7sftUEllI87utRH9mvYF5lSihlO2m5fjzPt4vKlP88Dg67N5XTO8i5i3Pq49oC25ePovg+ZVkeqYor0+CiJpXOfKP0/0O3dQ9LEDqjzZb/8eESPthfETrD+lBJyVm3wYQ6Wxc83tZu+mnWbYM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760683846; c=relaxed/simple; bh=ZFNtuyBlsIRaFDQEtk36x8lIF+TbzaYLInskonsnIWk=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=ZkPiAVhlO87ovqYJB92w/tTcToP1/Lfkr7pjjc9mzUBocs74rQh0S+0ZKQs62OsApmwsx5xnNMUelS7injJJ8alDr3Y297qK4hR2L6L963QeuQFFtxktn4zQ2V1phU2BotgoLt9HutGEw5++o8kIDp3iBzQWRGeEGqOxAHYUj/c= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=mediatek.com; spf=pass smtp.mailfrom=mediatek.com; dkim=pass (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b=mTcrjCdC; arc=none smtp.client-ip=210.61.82.184 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=mediatek.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mediatek.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b="mTcrjCdC" X-UUID: 94b0d932ab2511f0b33aeb1e7f16c2b6-20251017 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=GaCDgUVMB4sgbM1/K5J9BFG9g9jS7vE/ZZlkt+ZP8pY=; b=mTcrjCdCN/dyS1M3XB9SSDiYtq19yW0J5mj/4bZLuBcQtAMmDvtSlRKOpru5IQVXILeJct6jkylyXweij+9ZJg3NsebE32l5hLkcjrB3IKngfyRJLvQ2JL+DywWoFG1srnoOsI0LlTM7EGUwOOH26WVmw9GpMVvcQuPod+1d6iI=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.3.6,REQID:41880133-7d71-428d-933d-625e47d4521c,IP:0,UR L:0,TC:0,Content:0,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTION:r elease,TS:0 X-CID-META: VersionHash:a9d874c,CLOUDID:1c6d45b9-795c-4f99-91f3-c115e0d49051,B ulkID:nil,BulkQuantity:0,Recheck:0,SF:81|82|102|836|888|898,TC:-5,Content: 0|15|50,EDM:-3,IP:nil,URL:0,File:130,RT:nil,Bulk:nil,QS:nil,BEC:nil,COL:0, OSI:0,OSA:0,AV:0,LES:1,SPR:NO,DKR:0,DKP:0,BRR:0,BRE:0,ARC:0 X-CID-BVR: 2,SSN|SDN X-CID-BAS: 2,SSN|SDN,0,_ X-CID-FACTOR: TF_CID_SPAM_SNR X-CID-RHF: D41D8CD98F00B204E9800998ECF8427E X-UUID: 94b0d932ab2511f0b33aeb1e7f16c2b6-20251017 Received: from mtkmbs10n2.mediatek.inc [(172.21.101.183)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 1353878991; Fri, 17 Oct 2025 14:50:34 +0800 Received: from mtkmbs13n2.mediatek.inc (172.21.101.108) by mtkmbs10n1.mediatek.inc (172.21.101.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1748.10; Fri, 17 Oct 2025 14:50:31 +0800 Received: from mtksitap99.mediatek.inc (10.233.130.16) by mtkmbs13n2.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.1748.10 via Frontend Transport; Fri, 17 Oct 2025 14:50:31 +0800 From: Jason-JH Lin To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jassi Brar , Chun-Kuang Hu , AngeloGioacchino Del Regno , Mauro Carvalho Chehab CC: Matthias Brugger , Nicolas Dufresne , Jason-JH Lin , Nancy Lin , Singo Chang , "Paul-PL Chen" , Moudy Ho , "Xiandong Wang" , Sirius Wang , Fei Shao , Chen-yu Tsai , , , , , , , Subject: [PATCH v8 16/20] soc: mediatek: mtk-cmdq: Remove shift_pa parameter from cmdq_pkt_jump() Date: Fri, 17 Oct 2025 14:44:41 +0800 Message-ID: <20251017065028.1676930-17-jason-jh.lin@mediatek.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20251017065028.1676930-1-jason-jh.lin@mediatek.com> References: <20251017065028.1676930-1-jason-jh.lin@mediatek.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-MTK: N Content-Type: text/plain; charset="utf-8" Since shift_pa will be stored in the cmdq_mbox_priv structure within cmdq_pkt, all shift_pa parameters in CMDQ helper APIs can be removed. Remove the shift_pa parameters from cmdq_pkt_jump(), cmdq_pkt_jump_abs(), and cmdq_pkt_jump_rel(). Signed-off-by: Jason-JH Lin Reviewed-by: AngeloGioacchino Del Regno --- drivers/soc/mediatek/mtk-cmdq-helper.c | 6 +++--- include/linux/soc/mediatek/mtk-cmdq.h | 20 ++++++++------------ 2 files changed, 11 insertions(+), 15 deletions(-) diff --git a/drivers/soc/mediatek/mtk-cmdq-helper.c b/drivers/soc/mediatek/= mtk-cmdq-helper.c index 1b4d4a1e2984..0ab87eb04614 100644 --- a/drivers/soc/mediatek/mtk-cmdq-helper.c +++ b/drivers/soc/mediatek/mtk-cmdq-helper.c @@ -562,7 +562,7 @@ int cmdq_pkt_assign(struct cmdq_pkt *pkt, u16 reg_idx, = u32 value) } EXPORT_SYMBOL(cmdq_pkt_assign); =20 -int cmdq_pkt_jump_abs(struct cmdq_pkt *pkt, dma_addr_t addr, u8 shift_pa) +int cmdq_pkt_jump_abs(struct cmdq_pkt *pkt, dma_addr_t addr) { struct cmdq_instruction inst =3D { .op =3D CMDQ_CODE_JUMP, @@ -573,11 +573,11 @@ int cmdq_pkt_jump_abs(struct cmdq_pkt *pkt, dma_addr_= t addr, u8 shift_pa) } EXPORT_SYMBOL(cmdq_pkt_jump_abs); =20 -int cmdq_pkt_jump_rel(struct cmdq_pkt *pkt, s32 offset, u8 shift_pa) +int cmdq_pkt_jump_rel(struct cmdq_pkt *pkt, s32 offset) { struct cmdq_instruction inst =3D { .op =3D CMDQ_CODE_JUMP, - .value =3D (u32)offset >> shift_pa + .value =3D (u32)offset >> pkt->priv.shift_pa }; return cmdq_pkt_append_command(pkt, inst); } diff --git a/include/linux/soc/mediatek/mtk-cmdq.h b/include/linux/soc/medi= atek/mtk-cmdq.h index f6dc43c036bd..af66410b06d1 100644 --- a/include/linux/soc/mediatek/mtk-cmdq.h +++ b/include/linux/soc/mediatek/mtk-cmdq.h @@ -411,17 +411,15 @@ int cmdq_pkt_poll_addr(struct cmdq_pkt *pkt, dma_addr= _t addr, u32 value, u32 mas * contains more instruction. * @pkt: the CMDQ packet * @addr: absolute physical address of target instruction buffer - * @shift_pa: shift bits of physical address in CMDQ instruction. This val= ue - * is got by cmdq_get_shift_pa(). * * Return: 0 for success; else the error code is returned */ -int cmdq_pkt_jump_abs(struct cmdq_pkt *pkt, dma_addr_t addr, u8 shift_pa); +int cmdq_pkt_jump_abs(struct cmdq_pkt *pkt, dma_addr_t addr); =20 /* This wrapper has to be removed after all users migrated to jump_abs */ -static inline int cmdq_pkt_jump(struct cmdq_pkt *pkt, dma_addr_t addr, u8 = shift_pa) +static inline int cmdq_pkt_jump(struct cmdq_pkt *pkt, dma_addr_t addr) { - return cmdq_pkt_jump_abs(pkt, addr, shift_pa); + return cmdq_pkt_jump_abs(pkt, addr); } =20 /** @@ -431,12 +429,10 @@ static inline int cmdq_pkt_jump(struct cmdq_pkt *pkt,= dma_addr_t addr, u8 shift_ * target address should contains more instruction. * @pkt: the CMDQ packet * @offset: relative offset of target instruction buffer from current PC. - * @shift_pa: shift bits of physical address in CMDQ instruction. This val= ue - * is got by cmdq_get_shift_pa(). * * Return: 0 for success; else the error code is returned */ -int cmdq_pkt_jump_rel(struct cmdq_pkt *pkt, s32 offset, u8 shift_pa); +int cmdq_pkt_jump_rel(struct cmdq_pkt *pkt, s32 offset); =20 /** * cmdq_pkt_jump_rel_temp() - Temporary wrapper for new CMDQ helper API @@ -453,7 +449,7 @@ int cmdq_pkt_jump_rel(struct cmdq_pkt *pkt, s32 offset,= u8 shift_pa); */ static inline int cmdq_pkt_jump_rel_temp(struct cmdq_pkt *pkt, s32 offset,= u8 shift_pa) { - return cmdq_pkt_jump_rel(pkt, offset, shift_pa); + return cmdq_pkt_jump_rel(pkt, offset); } =20 /** @@ -595,17 +591,17 @@ static inline int cmdq_pkt_poll_addr(struct cmdq_pkt = *pkt, dma_addr_t addr, u32 return -EINVAL; } =20 -static inline int cmdq_pkt_jump_abs(struct cmdq_pkt *pkt, dma_addr_t addr,= u8 shift_pa) +static inline int cmdq_pkt_jump_abs(struct cmdq_pkt *pkt, dma_addr_t addr) { return -EINVAL; } =20 -static inline int cmdq_pkt_jump(struct cmdq_pkt *pkt, dma_addr_t addr, u8 = shift_pa) +static inline int cmdq_pkt_jump(struct cmdq_pkt *pkt, dma_addr_t addr) { return -EINVAL; } =20 -static inline int cmdq_pkt_jump_rel(struct cmdq_pkt *pkt, s32 offset, u8 s= hift_pa) +static inline int cmdq_pkt_jump_rel(struct cmdq_pkt *pkt, s32 offset) { return -EINVAL; } --=20 2.43.0