From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (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 964C7549361 for ; Wed, 9 Sep 2026 11:49:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788954542; cv=none; b=CisNWWH50QVwSEwvTwWSSRvz7Khb/P0SBt+eWQ+7Dru8P6aLuxNCMPFmEpVZ6WgM6bZ23vlgHetbLhq/jkWVdb8o2ZCkeuZtozbhAp4hUY+8jCWEwOjFZQ6AYALNHk+aG1iYfGt1r04YLOvfajADP76wmwb8Lh+R/Zd02RSFjB4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788954542; c=relaxed/simple; bh=H4r2oOc7WRDvMW1NBsIUmNGfOhTuI7q4i8EH+5tNZ+c=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=RLCKsA5dl8gc5aJM4PiN+r7IS6n+Quq77pdeCYaWqYuFl7E0N9lhQPhgQ5L+rHW/ZlzszodWB+nqhscSXD9Q+wdE4AqD64asheUPvBvaEOeiG6G8AjPi88hdxGfXjn8bIIhQkBtn28oJEHl+FQWXgMvDv9LedlFCnlGz0cPLehw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=TfWBj5jv; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=DQahbHxN; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="TfWBj5jv"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="DQahbHxN" Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 689BU71i599841 for ; Wed, 9 Sep 2026 11:49:00 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= A/3VVWUKnpeQjJ26Tv6oH3K+LWGjuzJb0mcJX9AvYgM=; b=TfWBj5jvj0Qwr/Tn 06XeQL0ZgA9U1hmaimTSwbVoFJxKj4rYGGc5oE1wC9ik7cGCOim/sQInVFMhqTAb 60anR8mIRlN7rIPKtJ3y0k4K7g9WId8vrC8jVK8Oal8gZpTbsyE4AujmKFsCeCXP 8dkspiIPJiheaGhfPuhwxNN0HyVtK+NuNIodvCIMsADsh+DVBxBQ4AQ8gmInv+RJ ZNeiQEyBJXmOTgS8iwEyq69xeISmpLB2Rov3880rZdhJyf2dtjo8OaKFrMWlXr/3 HTakuuwVmiS3dQxa2CAq0xHjHb3Beqq8Q3BxGosYA88YtdblnE9QC6qwOTB983Nh idgj/Q== Received: from mail-pf1-f199.google.com (mail-pf1-f199.google.com [209.85.210.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4gjywr1sc7-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Wed, 09 Sep 2026 11:48:59 +0000 (GMT) Received: by mail-pf1-f199.google.com with SMTP id d2e1a72fcca58-8627258ef12so4767396b3a.2 for ; Wed, 09 Sep 2026 04:48:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1788954539; x=1789559339; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=A/3VVWUKnpeQjJ26Tv6oH3K+LWGjuzJb0mcJX9AvYgM=; b=DQahbHxNAQS9FhuY/Yx5SBPOK0QTuRjvyOD9MSBogCWo1bpHI5rdDw0nV+CnjE7L4Z hh5k0GMZxR9sWFxTTzsnxTH0Hq5wwMygPr9EfgxkPPo8uz6KhXHu1YiTAplTiO5WkdO+ v8giMw7YiM0Ts0fjkXp0t7rPrCofhJLnw19q1zG8ndhABP/rsOnnB748rX5sKQ+J24Zi VeU/WM+XTj7rbUM0oppou+SZibUfLI8DDiKbJcojDvRkSr1+nfeny+NSUbH4XkcH/xsa mpFhhNSBhPdiA9VEQzZDT0RzPxtK3eIMKpdF/jvseAQft0qokAP7tuwDPGhHDfYdSLzg dlQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1788954539; x=1789559339; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=A/3VVWUKnpeQjJ26Tv6oH3K+LWGjuzJb0mcJX9AvYgM=; b=EkUwbtcLx4+0ET7ZrQWCyqYfk24lr6zWTu1ewzW8tvVyXWU9+UbC8CgEpJpX32zy60 3U48SxiaSZJ/oBUdQwZLMm8OE979SuXF5mszj8rC9mDa13hcr//wiCIf4JMUSC4SjVpW R0o+3hDS2SBD7vydmpN2sC8OQERNdHRMUaf7kKyPekVeS7V+y08QGG+o9x6/mJPb0xZ2 GHkVo+dlNgYYmngbkKvuADS19/maTVUZdv0FQRjTPg6F+ky7EvHlfLtrNxmylVbFcQiI APTOI4ekukmlyF5dDi4GSBhOtfabTf+Fj3gwgtIUHuMRARokrxYpSndnnyY/5OCsUOLa Ox3A== X-Forwarded-Encrypted: i=1; AKwUvBzsjCJRaCtexMH+t33x4UVtqEOu6alvsLghNe3zK+OssN7ANRahjDgpxwCDmbjHFlNq3oCUqpGNXrin@vger.kernel.org X-Gm-Message-State: AFuF++k++R2mVQyHaCI6/OKvS1K2CjN15NJ1/Bn2RSJ7kOCl0dvCdbVm 28a38ekDTYIj4vcoUFSHLyQx6jXpWSyve+9nLiStzORRNhbDyeIf9UImu09ladU3OhpgZdaPIgR RQkqBJmk148er7tHhNqBjStHSGCzKaQDYoMhX9yJiQbTdLziL+z9EZC1+LbBBT7yd X-Gm-Gg: AYBFou2U3j4xrfXNt1fvxivVO8gK0Ya62bt8NxLNIiAtTCpbglJaD1qTZDmOFe4L2f2 jcMJ1O6f80H1e1g1rS8Rvp7vkGL1sp5tNmYH+vyxshNucDUnxAbEJ1yZwTQB07klirI/jAEaquf KzaDqxB/ZXpv0Bj+X+BzMQdn+WPojqkdFCytQ2rJhkwVGkTT9iTL9o80yGcWnvEMMkySNXNDmel azPFU244JQw3ySZx0lhWYPjie05Pc8VQlz+LfPkw64McocVD+ngHMSJrQvLP6bGJb8D8EhB+4AV V/iWMVbVNZ3PgryH0FTuzCZbYxhtaW+BYtucFypHW1nu34j1MmlE4mDTaWoP3NsPrwwcF7sWdF7 ycCnij4gcBRf8OX0PV8JT8rm03vlVu/HhcKE= X-Received: by 2002:a05:6a21:114c:b0:3d1:e510:9052 with SMTP id adf61e73a8af0-3da39ee2689mr54213285637.7.1788954538784; Wed, 09 Sep 2026 04:48:58 -0700 (PDT) X-Received: by 2002:a05:6a21:114c:b0:3d1:e510:9052 with SMTP id adf61e73a8af0-3da39ee2689mr54213212637.7.1788954538370; Wed, 09 Sep 2026 04:48:58 -0700 (PDT) Received: from hu-krichai-hyd.qualcomm.com ([202.46.23.25]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-3339b608409sm50156857eec.21.2026.09.09.04.48.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Sep 2026 04:48:58 -0700 (PDT) From: Krishna Chaitanya Chundru Date: Wed, 09 Sep 2026 17:18:19 +0530 Subject: [PATCH v3 4/5] phy: qcom: qmp: Move qphy_setbits/clrbits/checkbits to common header Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20260909-nord-v3-4-b0a82721c547@oss.qualcomm.com> References: <20260909-nord-v3-0-b0a82721c547@oss.qualcomm.com> In-Reply-To: <20260909-nord-v3-0-b0a82721c547@oss.qualcomm.com> To: Vinod Koul , Neil Armstrong , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Lorenzo Pieralisi , =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= , Manivannan Sadhasivam , Bjorn Helgaas , Bjorn Andersson , Maxime Chevallier , Philipp Zabel Cc: Krishna Chaitanya Chundru , linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, shengchao.guo@oss.qualcomm.com, Qiang Yu X-Mailer: b4 0.15.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1788954507; l=8340; i=krishna.chundru@oss.qualcomm.com; s=20230907; h=from:subject:message-id; bh=H4r2oOc7WRDvMW1NBsIUmNGfOhTuI7q4i8EH+5tNZ+c=; b=NhxNSLF9k2rlgECW4dULXyO0W9RUiPHMohCnyBQUR+D45MiUbAakhih5m89UeX4tiGZmDYvRV Q/ghc9vkeSqAeOTa8K+RgzBYaadmovnxIWRfsfM81tnEmWuTtvmaqJi X-Developer-Key: i=krishna.chundru@oss.qualcomm.com; a=ed25519; pk=10CL2pdAKFyzyOHbfSWHCD0X0my7CXxj8gJScmn1FAg= X-Authority-Analysis: v=2.4 cv=a4YAM0SF c=1 sm=1 tr=0 ts=6aa147ab cx=c_pps a=WW5sKcV1LcKqjgzy2JUPuA==:117 a=ZePRamnt/+rB5gQjfz0u9A==:17 a=IkcTkHD0fZMA:10 a=VdqzKS8jKosA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=DJpcGTmdVt4CTyJn9g5Z:22 a=EUspDBNiAAAA:8 a=NwoWoW-BFzdagI8Imy4A:9 a=QEXdDO2ut3YA:10 a=OpyuDcXvxspvyRM73sMx:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwOTA5MDEzMSBTYWx0ZWRfX5zs8fnzt8ycz xvnKUK9OAEk7BRXCgDJQXmJnb8TD2y2sZNWb69zrySlDQC1N35U+OYjAfnO4cCN11o7a1ghlWll 8A8mL1S5KHSY3iDzQZ43EX8dSSnQz7SIjHWPuifX04e++I0xaBjPwxuUKW1/mKEXeTYrutfSUVb zYnP28wdtqheFuIgVz0l+UPRT9LzDg1hCvMf8sLx0xSSn6rWIpeq/wPlqQnOjJWHoJratnXwngz TeM6iyEf9SwXqPUxlr4garvc777FdTLdzLSERIwiroa1FMltnTssnyUWs+51iu2z630C0KhNuDJ rWcoxf3jRPAdVZsPwenWqZx/RgJjy46OSqCSBemZ58RNjm35zAQ00IthZZhep6oG1Or0//0GuPp TQL52APm6gvT9DBfA1wxm8B5XxzWixe3QWmfDe8i6g3ofNwkV7sNupNudXqsPdAY7JH72/96T4+ lfsUia3H+xmAMTGanzg== X-Proofpoint-Spam-Info: AW1haW4tMjYwOTA5MDEzMSBTYWx0ZWRfXyfGL63n5unis XvmC+F1s0b/ibBSvbQfFSO0LjrTtHxuXdUVxYIJ+jLlbVYHcstc/m3+mtdTG2MZ/wpsEAVqes6n fl0n+eKmMiVQtDFCGrZn+WigeKSUR/Y= X-Proofpoint-ORIG-GUID: r0LX_Ssl-4kHKv22Zu_UEvBfd1jObD_S X-Proofpoint-GUID: r0LX_Ssl-4kHKv22Zu_UEvBfd1jObD_S X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-09-08_03,2026-09-09_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 phishscore=0 lowpriorityscore=0 bulkscore=0 clxscore=1015 spamscore=0 adultscore=0 impostorscore=0 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2609090131 qphy_setbits(), qphy_clrbits() and qphy_checkbits() were duplicated verbatim across phy-qcom-qmp-pcie.c, phy-qcom-qmp-pcie-msm8996.c, phy-qcom-qmp-ufs.c, phy-qcom-qmp-usb.c, phy-qcom-qmp-usbc.c and phy-qcom-qmp-combo.c. Move them to the shared phy-qcom-qmp-common.h, which all of these drivers already include, and drop the local copies. This also makes the helpers available to phy-qcom-qmp-pcie-multiphy.c without introducing yet another copy. Suggested-by: Qiang Yu Signed-off-by: Krishna Chaitanya Chundru --- drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 24 ------------------ drivers/phy/qualcomm/phy-qcom-qmp-common.h | 32 ++++++++++++++++++++++++ drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c | 24 ------------------ drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 32 ------------------------ drivers/phy/qualcomm/phy-qcom-qmp-ufs.c | 24 ------------------ drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 24 ------------------ drivers/phy/qualcomm/phy-qcom-qmp-usbc.c | 24 ------------------ 7 files changed, 32 insertions(+), 152 deletions(-) diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c index c39ced168d03..052d2f7cf671 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c @@ -2622,30 +2622,6 @@ static void qmp_v8_dp_aux_init(struct qmp_combo *qmp); static int qmp_v8_configure_dp_clocks(struct qmp_combo *qmp); static int qmp_v8_configure_dp_phy(struct qmp_combo *qmp); -static inline void qphy_setbits(void __iomem *base, u32 offset, u32 val) -{ - u32 reg; - - reg = readl(base + offset); - reg |= val; - writel(reg, base + offset); - - /* ensure that above write is through */ - readl(base + offset); -} - -static inline void qphy_clrbits(void __iomem *base, u32 offset, u32 val) -{ - u32 reg; - - reg = readl(base + offset); - reg &= ~val; - writel(reg, base + offset); - - /* ensure that above write is through */ - readl(base + offset); -} - /* list of clocks required by phy */ static const char * const qmp_combo_phy_clk_l[] = { "aux", "cfg_ahb", "ref", "com_aux", diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-common.h b/drivers/phy/qualcomm/phy-qcom-qmp-common.h index b945fc14cece..3c0e47f4af75 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-common.h +++ b/drivers/phy/qualcomm/phy-qcom-qmp-common.h @@ -59,4 +59,36 @@ static inline void qmp_configure(struct device *dev, void __iomem *base, qmp_configure_lane(dev, base, tbl, num, 0xff); } +static inline void qphy_setbits(void __iomem *base, u32 offset, u32 val) +{ + u32 reg; + + reg = readl(base + offset); + reg |= val; + writel(reg, base + offset); + + /* ensure that above write is through */ + readl(base + offset); +} + +static inline void qphy_clrbits(void __iomem *base, u32 offset, u32 val) +{ + u32 reg; + + reg = readl(base + offset); + reg &= ~val; + writel(reg, base + offset); + + /* ensure that above write is through */ + readl(base + offset); +} + +static inline bool qphy_checkbits(const void __iomem *base, u32 offset, u32 val) +{ + u32 reg; + + reg = readl(base + offset); + return (reg & val) == val; +} + #endif diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c b/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c index 37e96493b722..ed22b7a256ef 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c @@ -218,30 +218,6 @@ struct qcom_qmp { int init_count; }; -static inline void qphy_setbits(void __iomem *base, u32 offset, u32 val) -{ - u32 reg; - - reg = readl(base + offset); - reg |= val; - writel(reg, base + offset); - - /* ensure that above write is through */ - readl(base + offset); -} - -static inline void qphy_clrbits(void __iomem *base, u32 offset, u32 val) -{ - u32 reg; - - reg = readl(base + offset); - reg &= ~val; - writel(reg, base + offset); - - /* ensure that above write is through */ - readl(base + offset); -} - /* list of clocks required by phy */ static const char * const msm8996_phy_clk_l[] = { "aux", "cfg_ahb", "ref", diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c index da83358c97ea..7fa9bb2b094a 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c @@ -4044,38 +4044,6 @@ struct qmp_pcie { struct clk_fixed_rate aux_clk_fixed; }; -static bool qphy_checkbits(const void __iomem *base, u32 offset, u32 val) -{ - u32 reg; - - reg = readl(base + offset); - return (reg & val) == val; -} - -static inline void qphy_setbits(void __iomem *base, u32 offset, u32 val) -{ - u32 reg; - - reg = readl(base + offset); - reg |= val; - writel(reg, base + offset); - - /* ensure that above write is through */ - readl(base + offset); -} - -static inline void qphy_clrbits(void __iomem *base, u32 offset, u32 val) -{ - u32 reg; - - reg = readl(base + offset); - reg &= ~val; - writel(reg, base + offset); - - /* ensure that above write is through */ - readl(base + offset); -} - /* list of clocks required by phy */ static const char * const qmp_pciephy_clk_l[] = { "aux", "cfg_ahb", "ref", "refgen", "rchng", "phy_aux", diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c b/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c index d4aca22c181e..d15db9ab9a90 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c @@ -1211,30 +1211,6 @@ struct qmp_ufs { u32 submode; }; -static inline void qphy_setbits(void __iomem *base, u32 offset, u32 val) -{ - u32 reg; - - reg = readl(base + offset); - reg |= val; - writel(reg, base + offset); - - /* ensure that above write is through */ - readl(base + offset); -} - -static inline void qphy_clrbits(void __iomem *base, u32 offset, u32 val) -{ - u32 reg; - - reg = readl(base + offset); - reg &= ~val; - writel(reg, base + offset); - - /* ensure that above write is through */ - readl(base + offset); -} - /* Regulator bulk data with load values for specific configurations */ static const struct regulator_bulk_data milos_ufsphy_vreg_l[] = { { .supply = "vdda-phy", .init_load_uA = 140120 }, diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c index b0790bcf0bc8..6a9faa0ce3bb 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c @@ -1441,30 +1441,6 @@ struct qmp_usb { struct clk_fixed_rate pipe_clk_fixed; }; -static inline void qphy_setbits(void __iomem *base, u32 offset, u32 val) -{ - u32 reg; - - reg = readl(base + offset); - reg |= val; - writel(reg, base + offset); - - /* ensure that above write is through */ - readl(base + offset); -} - -static inline void qphy_clrbits(void __iomem *base, u32 offset, u32 val) -{ - u32 reg; - - reg = readl(base + offset); - reg &= ~val; - writel(reg, base + offset); - - /* ensure that above write is through */ - readl(base + offset); -} - /* list of clocks required by phy */ static const char * const qmp_usb_phy_clk_l[] = { "aux", "cfg_ahb", "ref", "com_aux", diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-usbc.c b/drivers/phy/qualcomm/phy-qcom-qmp-usbc.c index e3465ab7c80e..548ec97373ac 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-usbc.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-usbc.c @@ -474,30 +474,6 @@ struct qmp_usbc { enum typec_orientation orientation; }; -static inline void qphy_setbits(void __iomem *base, u32 offset, u32 val) -{ - u32 reg; - - reg = readl(base + offset); - reg |= val; - writel(reg, base + offset); - - /* ensure that above write is through */ - readl(base + offset); -} - -static inline void qphy_clrbits(void __iomem *base, u32 offset, u32 val) -{ - u32 reg; - - reg = readl(base + offset); - reg &= ~val; - writel(reg, base + offset); - - /* ensure that above write is through */ - readl(base + offset); -} - /* list of clocks required by phy */ static const char * const qmp_usbc_phy_clk_l[] = { "aux", "cfg_ahb", "ref", "com_aux", -- 2.34.1