From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.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 CE0B23546F4 for ; Mon, 21 Sep 2026 05:37:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789969070; cv=none; b=i2Ys53SYHccPy0Bx0vY6AeVhwy1Y6GX5mGN1+O792phR/F2tLeNodriattOI9jw3jT1TeMVD/JfG5ko+WLrB81nk/BxmG7uWwssYIVwDQSVIuxXq6Po9nJMtyKhB6Qqhs5z4pxaz2SzJ1BAsLz4jx3flhRMR9wMFyCtmSFlzilg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789969070; c=relaxed/simple; bh=JVlVGeKhznT32YmeKi+KOo08Sju82h7c5GfgcSDaseE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=kcBQwzykjMqkJ5XQ531T2JPospDscBRgQ2ThTQ+73q3zPJlriblPCbWi8KqtJYXLXXfqFkzWxYwzi/oR6DwzeiPe84Q5MqueOJP/bfJhGW1jUbE0Xt0czxLBFq37DlPcAdfvOvLKu4l1rZHd971P+GJKloshRtV+I+smhN6q1eU= 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=pvGD0wPr; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=FWMQdSna; arc=none smtp.client-ip=205.220.180.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="pvGD0wPr"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="FWMQdSna" Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 68L3ZTrg635393 for ; Mon, 21 Sep 2026 05:37:47 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= WBcOxYwQ0Dfv588IqbZmpmvVHvpvwD3Y7+aa5k+MiV8=; b=pvGD0wPrdaLOj9DH SfB/evfCqStIV1oiC8xkQllyhwOP1N35oe9TYUtqHP0iwmhl+ZyxfD7oCSIJCs33 bstIMAKvz12L9uf7/+JxWDIvJoSWVV0e8PXDfxM+4JvEGjJXTtMpFHquDR6Ic/UD JzXgqI/7soXAj/IYQgD4uIK+pu2VECVkcydkR/D8zWy5mW1EEnT8E1v1A+cKH3eV 3lg3XVItBoMxwcb8MFCX/2Xbur3WtOsrjgxqfpdQ2PhpKHyx58bbiZKolOhPacpX oEVX50hDNUeYqYQzEnceFhuIkyRpMfbgY9KNX0eg/1SWNFcOcFjhsCJEmIO6Tc+b LYG/RQ== Received: from mail-pj1-f71.google.com (mail-pj1-f71.google.com [209.85.216.71]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4gshyxvw4n-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 21 Sep 2026 05:37:47 +0000 (GMT) Received: by mail-pj1-f71.google.com with SMTP id 98e67ed59e1d1-39e3f521346so3107012a91.0 for ; Sun, 20 Sep 2026 22:37:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1789969066; x=1790573866; 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=WBcOxYwQ0Dfv588IqbZmpmvVHvpvwD3Y7+aa5k+MiV8=; b=FWMQdSnaL0MgFqonXQkoX43prmOhfNX+p9i2d/+2ahP/GHqILaYYVxIB5eCV/yBgM2 y6w8WRDN16Xk6b4mCQiISVQT3JdjltR38Z1zpQhY6HdCgX2XPWJgrvB8Agw7bTOSCJ8S hCdMK9W0+mUFPzLTSg/aItJEtssOlnYQJOQE3NlBBscKEb23keTmClh701hLeY+M9QHz scbaf8bFHxDB0KM95m4Zo+zSS2z0T+AHuQ5TIMYmMhwc4aoHvJGmSsIxt/auOoHNnte+ Pkv9EMZo5tSTPtwKPsjsg+yo4SGFDt3v9p2x9qDf9UiXqUGvbaKCoV/vAJUsjEtUS1kY yoDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1789969066; x=1790573866; 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=WBcOxYwQ0Dfv588IqbZmpmvVHvpvwD3Y7+aa5k+MiV8=; b=0uvMsXCW0ImoKRzGhZafzeuxd/4u0hTnxhTw1J33OoTTS6obh2go5RCulMkmEkySPW Rhksa8tNSgSidVOWT4HglH6xiXj02XmW4fRqwsyIaoQZD0tdnRpzHQIUYQBVvr2Rcdqc 0UG/z3nxgzjnTmkd+BjS/4L7Eir51cWngCSYwhqWFJEgk/GE+oLFFHeZH9mSsIKp88pe Gx8YcHZvCbyJaiqcmka9/kZVogAP23YrQKP2VFgOQ9I8Y7f8GD+M/c651c4JliezSrn2 r1xCeaDrJp37gyMLqG3tyBSTetiFX3aMBa4mCaMdKvp4h+WrMzaM+tpjXa1uVkFvPrIJ Jqng== X-Forwarded-Encrypted: i=1; AKwUvBzTFxF5/WLLnwgnGv0ubamQL+kr4mSBJKg8fWzfjlOYTA/O7OUZibgyH28z53B+tz2+BhgLGrvdaee8@vger.kernel.org X-Gm-Message-State: AFuF++nE7lLOPv6NXmzU/zkJ8Y3C1cTwHyDSYT202a3INxrafP1TyxDP LlwrQXpevHdz/V5KPdTBHpdJZ9g7mKsWDdYfs8J8Iuyyp8PNbWBIiV9ALTjg60RfhCoR628kKkj 1sBteRNDw+ssXI0ba74jnJoIh+dezzl1ud+9k6gMyukMsD27l0YVLCAsnQk6YoXj1 X-Gm-Gg: AYBFou2Nh/AbYcemSxCDfXIHYSzoCw58FcoHATiy2w4IYrdmOAz+QpKO6UXli89rKx9 /nuvsCDbS0hsXg+A5ll0qgpxtQBzL7BT4kwIMvoHjT7X+D190UOA4InOL4yxjXjw4k9CzjuJqj5 HcwxM9vifSSy1qnwWWn8ziBHAWkmVM4ChhLQztV5gkUczqVJgfdSGi4qJwtLb6KndiF88+OpS3n Opmbg8wiOQWCj5OjxPNVJjYRNU/NNusQLwkm8hBTnIkNmzTIiZN2/V3aFPvpySa8OGRg01FBdPN AWNTqKFL8e3lVTlE1g9i6R5Qvf2FxLcI2yo81KXzAjO5Sa1aqG4IhpAuH9qdeF4ALHWJX9Z4peF BhpJZUvfoexlHjFMrnBVIrfi3tYgh8CCOUg== X-Received: by 2002:a17:90b:4e85:b0:39e:21a7:5df5 with SMTP id 98e67ed59e1d1-39e54d5ca4fmr14044685a91.24.1789969066444; Sun, 20 Sep 2026 22:37:46 -0700 (PDT) X-Received: by 2002:a17:90b:4e85:b0:39e:21a7:5df5 with SMTP id 98e67ed59e1d1-39e54d5ca4fmr14044658a91.24.1789969065987; Sun, 20 Sep 2026 22:37:45 -0700 (PDT) Received: from hu-krichai-hyd.qualcomm.com ([202.46.23.25]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-144d55d45a6sm15054568c88.9.2026.09.20.22.37.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 20 Sep 2026 22:37:45 -0700 (PDT) From: Krishna Chaitanya Chundru Date: Mon, 21 Sep 2026 11:07:12 +0530 Subject: [PATCH v4 4/6] 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: <20260921-nord-v4-4-ed05c6e09240@oss.qualcomm.com> References: <20260921-nord-v4-0-ed05c6e09240@oss.qualcomm.com> In-Reply-To: <20260921-nord-v4-0-ed05c6e09240@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 , shengchao.guo@oss.qualcomm.com, 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, Qiang Yu , Manivannan Sadhasivam X-Mailer: b4 0.15.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1789969033; l=8474; i=krishna.chundru@oss.qualcomm.com; s=20230907; h=from:subject:message-id; bh=JVlVGeKhznT32YmeKi+KOo08Sju82h7c5GfgcSDaseE=; b=dCttHvRw3vW02HbuvXqj4foXdaUtiebIdslRGRVKastwD6/pbNoOZEgyYTlLEt5QcZSnnD93z GcnKK1rZBY6Db10O4Eo7CgUsz//r28WM1k3xbPF56JMYT/mmoiCi42S X-Developer-Key: i=krishna.chundru@oss.qualcomm.com; a=ed25519; pk=10CL2pdAKFyzyOHbfSWHCD0X0my7CXxj8gJScmn1FAg= X-Authority-Analysis: v=2.4 cv=PaRqFShd c=1 sm=1 tr=0 ts=6ab0c2ab cx=c_pps a=UNFcQwm+pnOIJct1K4W+Mw==:117 a=ZePRamnt/+rB5gQjfz0u9A==:17 a=IkcTkHD0fZMA:10 a=VdqzKS8jKosA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=3WHJM1ZQz_JShphwDgj5:22 a=EUspDBNiAAAA:8 a=NwoWoW-BFzdagI8Imy4A:9 a=QEXdDO2ut3YA:10 a=uKXjsCUrEbL0IQVhDsJ9:22 X-Proofpoint-Spam-Info: AW1haW4tMjYwOTIxMDA3OCBTYWx0ZWRfX8h9O/9TsM4hB xVGNZKbO1p5mfiuOHUYZj76p/595Z5voX8OZ0Re+XMpHCkPLjWbYGGQSgQwv0hm84eHQfL83iUM KX3iSjYkkWADCtw/mKScYUqg4KfTEwY= X-Proofpoint-GUID: ItaT82WMUNr7G8ewVljnVgmChYBqtA-3 X-Proofpoint-ORIG-GUID: ItaT82WMUNr7G8ewVljnVgmChYBqtA-3 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwOTIxMDA3OCBTYWx0ZWRfX0GO+6EpyDofH eyy2u3YmQS5RWWIG/qK+aa0WafdQa4lPB5ziZ7FBOn30nkPl0Ib3D1d4voEwJF+9YjePLBVM7Zq Vhu7cD+/egI4C6/PXnss0o72aPxVklAy4x3154BcpNy6YixnPBGHxpgWlMoxGfPONE0qv+2VyEl dV6YuGmTExIjHXCpko1tSQh4FNyzcruyc0pNGsTmV9sgV7W/swszg6BnSI7ixgOUux8qom/t8nl 1WeeeD+5DOuTEwNi4Dd2/n1jxNZVOpPhDR/Vqc7UlOkbhBcmZN0g6MI1utPFRuvJelhG/HMUmDA mgam12TlkZ/fUriVDwYenzXBTgnb5XeS1IJrH2wVTpIfzDAl/y0d45NhN9IZ9ItCSuHYfW4Ov+M 4PritEIF3uqOlr9PGCQWyEhnhVuOv4NYpXTMj697acrxo0TLn9m3/cEl5/5Z91GX2da1VPqqZEX T3F2baG3NWZWEHc3M7A== 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-21_02,2026-09-16_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 suspectscore=0 impostorscore=0 clxscore=1015 spamscore=0 bulkscore=0 malwarescore=0 adultscore=0 priorityscore=1501 phishscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2609040000 definitions=main-2609210078 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 Reviewed-by: Manivannan Sadhasivam Reviewed-by: Shawn Guo 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