From nobody Fri Apr 3 02:59:58 2026 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 311FC2882D7; Wed, 25 Mar 2026 04:05:05 +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=1774411508; cv=none; b=GL8vp0BIvy2SZQLNDJBjtJAChNoh24USIeB0GniUWh7jsE4c1dLYSJnNzVlMu1j+Ac0PvFUBxttJiT9Xrxb/9eluWSwV85BjqN1aZdKTSkpoI33SvDWXs2Kb4XTv864ITKY3w8MEe+3rQ2lCuEVOkM9T2gTYPUOyOds8iH62Q40= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774411508; c=relaxed/simple; bh=gbpTpxaa/ts0Bvf0mmi/F5HTwC9XkBKV5zHVY6nNKO0=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=j6+VUYN4d32CVrw1T7y21hojRLu6zy/jGYfyg4dhyvhMHO8C6N5O3YFEa8eK7hFVBd9V5KmYisDgiZPHuLi83YPa2m56dqB0LOz6bM/qhHYU+E900BWn08+Gkxp3Vr92y3Qm3lkM7SX2sv8wTCZlpQvVff595qxNo5xBK1xX9/4= 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=FCsSVkwi; 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="FCsSVkwi" X-UUID: caa7433a27ff11f1a39cd589f645bc18-20260325 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=oVtXg1u//KQSDkG3AxcksQOdaQT8WeDudVdcXW7j2L4=; b=FCsSVkwiMfovm4e4uDE5YPD4hts9SWBAUoYOGei/OtbKvXIPTkJ4hlWyArBFBM2UaDfnow1w2D3U4YCd/0BBmR3sqrG9unusriyRDGNGHVticAaKn21aSqsSWYwaReyLDNsqxePYhBr8m7diNO9zm8oHwijFf931ZrK6uflcr2Q=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.3.12,REQID:be801dfe-f9e8-4313-9543-a192d194e1eb,IP:0,U RL:0,TC:0,Content:0,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTION: release,TS:0 X-CID-META: VersionHash:e7bac3a,CLOUDID:e053aa8e-6df4-4a3d-a7a4-fbdc42d669ce,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:0,Bulk:nil,QS:nil,BEC:-1,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: caa7433a27ff11f1a39cd589f645bc18-20260325 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 1087379403; Wed, 25 Mar 2026 12:04:59 +0800 Received: from mtkmbs13n2.mediatek.inc (172.21.101.108) by MTKMBS14N1.mediatek.inc (172.21.101.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.29; Wed, 25 Mar 2026 12:04:58 +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.2562.29 via Frontend Transport; Wed, 25 Mar 2026 12:04:57 +0800 From: Jason-JH Lin To: Jassi Brar , Chun-Kuang Hu , AngeloGioacchino Del Regno , Nicolas Dufresne , Mauro Carvalho Chehab CC: Matthias Brugger , Jason-JH Lin , Nancy Lin , Singo Chang , Paul-PL Chen , Moudy Ho , Xiandong Wang , Sirius Wang , Fei Shao , Chen-yu Tsai , , , , , , Subject: [PATCH v2 1/3] soc: mediatek: mtk-cmdq: Remove cmdq_pkt_jump() and cmdq_pkt_jump_rel_temp() Date: Wed, 25 Mar 2026 12:04:20 +0800 Message-ID: <20260325040457.2113120-2-jason-jh.lin@mediatek.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20260325040457.2113120-1-jason-jh.lin@mediatek.com> References: <20260325040457.2113120-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 all users have migrated to the new cmdq_pkt_jump* APIs without shift_pa, the wrapper APIs cmdq_pkt_jump() and cmdq_pkt_jump_rel_temp() can be removed. Signed-off-by: Jason-JH Lin Reviewed-by: AngeloGioacchino Del Regno --- include/linux/soc/mediatek/mtk-cmdq.h | 30 --------------------------- 1 file changed, 30 deletions(-) diff --git a/include/linux/soc/mediatek/mtk-cmdq.h b/include/linux/soc/medi= atek/mtk-cmdq.h index 3d0de1a9cac1..be67bee043ce 100644 --- a/include/linux/soc/mediatek/mtk-cmdq.h +++ b/include/linux/soc/mediatek/mtk-cmdq.h @@ -423,12 +423,6 @@ int cmdq_pkt_poll_addr(struct cmdq_pkt *pkt, dma_addr_= t addr, u32 value, u32 mas */ 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) -{ - return cmdq_pkt_jump_abs(pkt, addr); -} - /** * cmdq_pkt_jump_rel() - Append jump command to the CMDQ packet, ask GCE * to execute an instruction that change current thread @@ -441,24 +435,6 @@ static inline int cmdq_pkt_jump(struct cmdq_pkt *pkt, = dma_addr_t addr) */ int cmdq_pkt_jump_rel(struct cmdq_pkt *pkt, s32 offset); =20 -/** - * cmdq_pkt_jump_rel_temp() - Temporary wrapper for new CMDQ helper API - * @pkt: the CMDQ packet - * @offset: relative offset of target instruction buffer from current PC. - * @shift_pa: [DEPRECATED] shift bits of physical address in CMDQ instruct= ion. - * This value is got by cmdq_get_shift_pa(). - * - * This function is a temporary wrapper that was introduced only for ease = of - * migration of the many users of the CMDQ API located in multiple kernel - * subsystems. - * - * This has to be removed after all users are migrated to the newer CMDQ A= PI. - */ -static inline int cmdq_pkt_jump_rel_temp(struct cmdq_pkt *pkt, s32 offset,= u8 shift_pa) -{ - return cmdq_pkt_jump_rel(pkt, offset); -} - /** * cmdq_pkt_eoc() - Append EOC and ask GCE to generate an IRQ at end of ex= ecution * @pkt: The CMDQ packet @@ -613,12 +589,6 @@ static inline int cmdq_pkt_jump_rel(struct cmdq_pkt *p= kt, s32 offset) return -EINVAL; } =20 -/* This wrapper has to be removed after all users migrated to jump_rel */ -static inline int cmdq_pkt_jump_rel_temp(struct cmdq_pkt *pkt, s32 offset,= u8 shift_pa) -{ - return -EINVAL; -} - static inline int cmdq_pkt_eoc(struct cmdq_pkt *pkt) { return -EINVAL; --=20 2.43.0 From nobody Fri Apr 3 02:59:58 2026 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 495EB2DC79F; Wed, 25 Mar 2026 04:05:06 +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=1774411509; cv=none; b=m47NF1fLAFsBqq6INXxuhR+A53yfUlIWrLirNzfIjYNk4+OBLKCNgIVk9pv+6njCeqRJTyp/sOjay8GLh+jo6lvYJiZw++VUbFNdemWofa1YJyJHQI2bxQSbCUm6KVAkSOU5DXWsrTYsi1vfj5Ak4irYZNfS0KoLFWqsOkHrxUY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774411509; c=relaxed/simple; bh=htkOtGvaV4AcgMcPGKDQonuDRdeUFq+5Th+tYc++qA4=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=ole6pMTgB/R187gkHNC71pY6pB+/W1dUjINiX0PhOLV/ctUamVbgobr3LQp+Aafyn4eb09aYz27A5oEZUuwAPjYAU5BLN3i0wp2humSQIPMfmbMnUmgyvodEAXfk5nslb+RWnKYhRiYQSPXW4lhRXMg9hrzKLEI8jf889YawDJQ= 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=Cur7N8ZL; 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="Cur7N8ZL" X-UUID: caaa9b5227ff11f1a39cd589f645bc18-20260325 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=5EmVMlVF6F/sW77krrXtoXn+FTQFaHjK8lLFyo5xvjw=; b=Cur7N8ZL7Cmfiy+JHzPi68NZUtxIA0IxQZbXMlB0iOayEULa0wxIKEJihU2zls+z25E+4bTH5yg/najCX36DaccM1rBLL1eJIS+KlDtey0e/6GAGYMOhUcPM8Gc10AKwFatFTMCUZSlgkKXFCYO5Cjj0w21W1f/AJf2PT018+Ck=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.3.12,REQID:4c4494ea-2e38-4a75-9ee2-795bd476cf1f,IP:0,U RL:0,TC:0,Content:39,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTION :release,TS:39 X-CID-META: VersionHash:e7bac3a,CLOUDID:afb92d94-f8ef-4ca8-bea0-143568f9ca1d,B ulkID:nil,BulkQuantity:0,Recheck:0,SF:81|82|102|836|888|898,TC:-5,Content: 4|15|50,EDM:-3,IP:nil,URL:0,File:130,RT:0,Bulk:nil,QS:nil,BEC:-1,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: caaa9b5227ff11f1a39cd589f645bc18-20260325 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 1543015400; Wed, 25 Mar 2026 12:04:59 +0800 Received: from mtkmbs13n2.mediatek.inc (172.21.101.108) by MTKMBS14N1.mediatek.inc (172.21.101.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.29; Wed, 25 Mar 2026 12:04:58 +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.2562.29 via Frontend Transport; Wed, 25 Mar 2026 12:04:58 +0800 From: Jason-JH Lin To: Jassi Brar , Chun-Kuang Hu , AngeloGioacchino Del Regno , Nicolas Dufresne , Mauro Carvalho Chehab CC: Matthias Brugger , Jason-JH Lin , Nancy Lin , Singo Chang , Paul-PL Chen , Moudy Ho , Xiandong Wang , Sirius Wang , Fei Shao , Chen-yu Tsai , , , , , , Subject: [PATCH v2 2/3] soc: mediatek: mtk-cmdq: Remove cmdq_pkt_write() and cmdq_pkt_write_mask() Date: Wed, 25 Mar 2026 12:04:21 +0800 Message-ID: <20260325040457.2113120-3-jason-jh.lin@mediatek.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20260325040457.2113120-1-jason-jh.lin@mediatek.com> References: <20260325040457.2113120-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" The original cmdq_pkt_write() and cmdq_pkt_write_mask() only supported generating GCE instructions with subsys ID. They have been replaced by cmdq_pkt_write_pa(), cmdq_pkt_write_subsys(), cmdq_pkt_write_mask_pa() and cmdq_pkt_write_mask_subsys(). These 2 functions can now be removed as they are no longer in use. Signed-off-by: Jason-JH Lin Reviewed-by: AngeloGioacchino Del Regno --- drivers/soc/mediatek/mtk-cmdq-helper.c | 49 ++++++++++---------------- include/linux/soc/mediatek/mtk-cmdq.h | 35 ------------------ 2 files changed, 18 insertions(+), 66 deletions(-) diff --git a/drivers/soc/mediatek/mtk-cmdq-helper.c b/drivers/soc/mediatek/= mtk-cmdq-helper.c index 9cec6a096d8b..be5e6d80f4c0 100644 --- a/drivers/soc/mediatek/mtk-cmdq-helper.c +++ b/drivers/soc/mediatek/mtk-cmdq-helper.c @@ -215,18 +215,6 @@ static int cmdq_pkt_mask(struct cmdq_pkt *pkt, u32 mas= k) return cmdq_pkt_append_command(pkt, inst); } =20 -int cmdq_pkt_write(struct cmdq_pkt *pkt, u8 subsys, u16 offset, u32 value) -{ - struct cmdq_instruction inst =3D { - .op =3D CMDQ_CODE_WRITE, - .value =3D value, - .offset =3D offset, - .subsys =3D subsys - }; - return cmdq_pkt_append_command(pkt, inst); -} -EXPORT_SYMBOL(cmdq_pkt_write); - int cmdq_pkt_write_pa(struct cmdq_pkt *pkt, u8 subsys /*unused*/, u32 pa_b= ase, u16 offset, u32 value) { @@ -243,27 +231,16 @@ EXPORT_SYMBOL(cmdq_pkt_write_pa); int cmdq_pkt_write_subsys(struct cmdq_pkt *pkt, u8 subsys, u32 pa_base /*u= nused*/, u16 offset, u32 value) { - return cmdq_pkt_write(pkt, subsys, offset, value); + struct cmdq_instruction inst =3D { + .op =3D CMDQ_CODE_WRITE, + .value =3D value, + .offset =3D offset, + .subsys =3D subsys + }; + return cmdq_pkt_append_command(pkt, inst); } EXPORT_SYMBOL(cmdq_pkt_write_subsys); =20 -int cmdq_pkt_write_mask(struct cmdq_pkt *pkt, u8 subsys, - u16 offset, u32 value, u32 mask) -{ - u16 offset_mask =3D offset; - int err; - - if (mask !=3D GENMASK(31, 0)) { - err =3D cmdq_pkt_mask(pkt, mask); - if (err < 0) - return err; - - offset_mask |=3D CMDQ_WRITE_ENABLE_MASK; - } - return cmdq_pkt_write(pkt, subsys, offset_mask, value); -} -EXPORT_SYMBOL(cmdq_pkt_write_mask); - int cmdq_pkt_write_mask_pa(struct cmdq_pkt *pkt, u8 subsys /*unused*/, u32= pa_base, u16 offset, u32 value, u32 mask) { @@ -281,7 +258,17 @@ EXPORT_SYMBOL(cmdq_pkt_write_mask_pa); int cmdq_pkt_write_mask_subsys(struct cmdq_pkt *pkt, u8 subsys, u32 pa_bas= e /*unused*/, u16 offset, u32 value, u32 mask) { - return cmdq_pkt_write_mask(pkt, subsys, offset, value, mask); + u16 offset_mask =3D offset; + int err; + + if (mask !=3D GENMASK(31, 0)) { + err =3D cmdq_pkt_mask(pkt, mask); + if (err < 0) + return err; + + offset_mask |=3D CMDQ_WRITE_ENABLE_MASK; + } + return cmdq_pkt_write_subsys(pkt, subsys, pa_base, offset_mask, value); } EXPORT_SYMBOL(cmdq_pkt_write_mask_subsys); =20 diff --git a/include/linux/soc/mediatek/mtk-cmdq.h b/include/linux/soc/medi= atek/mtk-cmdq.h index be67bee043ce..0e8fb4743d18 100644 --- a/include/linux/soc/mediatek/mtk-cmdq.h +++ b/include/linux/soc/mediatek/mtk-cmdq.h @@ -124,17 +124,6 @@ int cmdq_pkt_create(struct cmdq_client *client, struct= cmdq_pkt *pkt, size_t siz */ void cmdq_pkt_destroy(struct cmdq_client *client, struct cmdq_pkt *pkt); =20 -/** - * cmdq_pkt_write() - append write command to the CMDQ packet - * @pkt: the CMDQ packet - * @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, u8 subsys, u16 offset, u32 value); - /** * cmdq_pkt_write_pa() - append write command to the CMDQ packet with pa_b= ase * @pkt: the CMDQ packet @@ -161,19 +150,6 @@ int cmdq_pkt_write_pa(struct cmdq_pkt *pkt, u8 subsys = /*unused*/, int cmdq_pkt_write_subsys(struct cmdq_pkt *pkt, u8 subsys, u32 pa_base /*unused*/, u16 offset, u32 value); =20 -/** - * cmdq_pkt_write_mask() - append write command with mask to the CMDQ pack= et - * @pkt: the CMDQ packet - * @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, u8 subsys, - u16 offset, u32 value, u32 mask); - /** * cmdq_pkt_write_mask_pa() - append write command with mask to the CMDQ p= acket with pa * @pkt: the CMDQ packet @@ -471,11 +447,6 @@ static inline int cmdq_pkt_create(struct cmdq_client *= client, struct cmdq_pkt *p =20 static inline void cmdq_pkt_destroy(struct cmdq_client *client, struct cmd= q_pkt *pkt) { } =20 -static inline int cmdq_pkt_write(struct cmdq_pkt *pkt, u8 subsys, u16 offs= et, u32 value) -{ - return -ENOENT; -} - static inline int cmdq_pkt_write_pa(struct cmdq_pkt *pkt, u8 subsys /*unus= ed*/, u32 pa_base, u16 offset, u32 value) { @@ -488,12 +459,6 @@ static inline int cmdq_pkt_write_subsys(struct cmdq_pk= t *pkt, u8 subsys, return -ENOENT; } =20 -static inline int cmdq_pkt_write_mask(struct cmdq_pkt *pkt, u8 subsys, - u16 offset, u32 value, u32 mask) -{ - return -ENOENT; -} - static inline int cmdq_pkt_write_mask_pa(struct cmdq_pkt *pkt, u8 subsys /= *unused*/, u32 pa_base, u16 offset, u32 value, u32 mask) { --=20 2.43.0 From nobody Fri Apr 3 02:59:58 2026 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 673BF2D5950; Wed, 25 Mar 2026 04:05:05 +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=1774411507; cv=none; b=bmHfCOas2v2F3ni1xZz22j4lThUfCE5QVdxydvKgxntlvt/NhnUEB1j6YSFnUyL43KkfjSFL641Sndx8eMGX0okl9r+vjWl+0JMrbk9Naojnm2ydcE8X38vC5u/VbPoCpCiYZS+rWA0g7ouEnIEZIl1qKIcyF7t3Xv6G4et6YOY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774411507; c=relaxed/simple; bh=OKAC+vqoPH4G4aFuN7LdkobqRd8Cvd2aSwcL3g/1kHw=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=cS3+YK8MsslVw4cajjQJv6TZ/cfP8e8a3LqvfBUKRlVzsG0qG3Rfb3dX/2eSQmUpmy8jBP24WVmkZV31ACW5R2Sd41K/QznHcjQXb+4aMIJp6jrzwJibKWtr5UZIKoATYiQFuZYuM7CiG8XZOSwYwoHkB+FQegIh5PFbPfAqMhU= 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=GknNOrM1; 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="GknNOrM1" X-UUID: cacf79ae27ff11f1a39cd589f645bc18-20260325 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=e+46r3Yi/z7wZ4y5BUiRO0AV6aK9RmoAXly/Gf3gLZg=; b=GknNOrM1WVH+zUhPgRMOX9OHxDCZmt5AJlWp72qjMqM8lMMYsdZ9E8/r5WHG34rtSih99l84zDPbfilcoeYOX3ipP+emGJwji3fHZcMPuLUM0y61hQgeRCw9L7KDGUVGbniLWGqyjZOhqO3+j1THSCnI1QhKNoZCi3VFnNCnrfU=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.3.12,REQID:866c456c-2c52-4560-9edf-e935aa5e08ed,IP:0,U RL:0,TC:0,Content:100,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTIO N:release,TS:100 X-CID-META: VersionHash:e7bac3a,CLOUDID:414c1ad5-060f-4ecc-9ee0-121eeeb4a682,B ulkID:nil,BulkQuantity:0,Recheck:0,SF:81|82|102|836|888|898,TC:-5,Content: 3|15|50,EDM:-3,IP:nil,URL:0,File:130,RT:0,Bulk:nil,QS:nil,BEC:-1,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: cacf79ae27ff11f1a39cd589f645bc18-20260325 Received: from mtkmbs11n1.mediatek.inc [(172.21.101.185)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 165407874; Wed, 25 Mar 2026 12:04:59 +0800 Received: from mtkmbs13n2.mediatek.inc (172.21.101.108) by mtkmbs13n2.mediatek.inc (172.21.101.108) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.29; Wed, 25 Mar 2026 12:04:58 +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.2562.29 via Frontend Transport; Wed, 25 Mar 2026 12:04:58 +0800 From: Jason-JH Lin To: Jassi Brar , Chun-Kuang Hu , AngeloGioacchino Del Regno , Nicolas Dufresne , Mauro Carvalho Chehab CC: Matthias Brugger , Jason-JH Lin , Nancy Lin , Singo Chang , Paul-PL Chen , Moudy Ho , Xiandong Wang , Sirius Wang , Fei Shao , Chen-yu Tsai , , , , , , Subject: [PATCH v2 3/3] mailbox: mtk-cmdq: Remove unsued cmdq_get_shift_pa() Date: Wed, 25 Mar 2026 12:04:22 +0800 Message-ID: <20260325040457.2113120-4-jason-jh.lin@mediatek.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20260325040457.2113120-1-jason-jh.lin@mediatek.com> References: <20260325040457.2113120-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 the mailbox driver data can be obtained using cmdq_get_mbox_priv() and all CMDQ users have transitioned to cmdq_get_mbox_priv(), cmdq_get_shift_pa() can be removed. Signed-off-by: Jason-JH Lin Reviewed-by: AngeloGioacchino Del Regno Acked-by: Jassi Brar --- drivers/mailbox/mtk-cmdq-mailbox.c | 8 -------- include/linux/mailbox/mtk-cmdq-mailbox.h | 12 ------------ 2 files changed, 20 deletions(-) diff --git a/drivers/mailbox/mtk-cmdq-mailbox.c b/drivers/mailbox/mtk-cmdq-= mailbox.c index d7c6b38888a3..f463f443e834 100644 --- a/drivers/mailbox/mtk-cmdq-mailbox.c +++ b/drivers/mailbox/mtk-cmdq-mailbox.c @@ -123,14 +123,6 @@ void cmdq_get_mbox_priv(struct mbox_chan *chan, struct= cmdq_mbox_priv *priv) } EXPORT_SYMBOL(cmdq_get_mbox_priv); =20 -u8 cmdq_get_shift_pa(struct mbox_chan *chan) -{ - struct cmdq *cmdq =3D container_of(chan->mbox, struct cmdq, mbox); - - return cmdq->pdata->shift; -} -EXPORT_SYMBOL(cmdq_get_shift_pa); - static void cmdq_vm_init(struct cmdq *cmdq) { int i; diff --git a/include/linux/mailbox/mtk-cmdq-mailbox.h b/include/linux/mailb= ox/mtk-cmdq-mailbox.h index 07c1bfbdb8c4..a42b44d5fd49 100644 --- a/include/linux/mailbox/mtk-cmdq-mailbox.h +++ b/include/linux/mailbox/mtk-cmdq-mailbox.h @@ -96,16 +96,4 @@ struct cmdq_pkt { */ void cmdq_get_mbox_priv(struct mbox_chan *chan, struct cmdq_mbox_priv *pri= v); =20 -/** - * cmdq_get_shift_pa() - get the shift bits of physical address - * @chan: mailbox channel - * - * GCE can only fetch the command buffer address from a 32-bit register. - * Some SOCs support more than 32-bit command buffer address for GCE, which - * requires some shift bits to make the address fit into the 32-bit regist= er. - * - * Return: the shift bits of physical address - */ -u8 cmdq_get_shift_pa(struct mbox_chan *chan); - #endif /* __MTK_CMDQ_MAILBOX_H__ */ --=20 2.43.0