From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
To: Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konrad.dybcio@linaro.org>,
Vinod Koul <vkoul@kernel.org>,
Kishon Vijay Abraham I <kishon@kernel.org>
Cc: linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org,
Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Subject: [PATCH 2/8] phy: qcom: qmp-usb-legacy: drop qmp_usb_legacy_iomap
Date: Tue, 09 Jan 2024 05:04:00 +0200 [thread overview]
Message-ID: <20240109-phy-qmp-merge-common-v1-2-572899a14318@linaro.org> (raw)
In-Reply-To: <20240109-phy-qmp-merge-common-v1-0-572899a14318@linaro.org>
All PHYs supported by qmp-usb-legacy driver don't have issues with the
PCS region. Replace qmp_usb_legacy_iomap() with devm_of_iomap().
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
drivers/phy/qualcomm/phy-qcom-qmp-usb-legacy.c | 18 +-----------------
1 file changed, 1 insertion(+), 17 deletions(-)
diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-usb-legacy.c b/drivers/phy/qualcomm/phy-qcom-qmp-usb-legacy.c
index 2f8891bc3da8..5d7bb4f58af8 100644
--- a/drivers/phy/qualcomm/phy-qcom-qmp-usb-legacy.c
+++ b/drivers/phy/qualcomm/phy-qcom-qmp-usb-legacy.c
@@ -1166,27 +1166,11 @@ static int phy_pipe_clk_register(struct qmp_usb *qmp, struct device_node *np)
return devm_add_action_or_reset(qmp->dev, phy_clk_release_provider, np);
}
-static void __iomem *qmp_usb_legacy_iomap(struct device *dev, struct device_node *np,
- int index, bool exclusive)
-{
- struct resource res;
-
- if (!exclusive) {
- if (of_address_to_resource(np, index, &res))
- return IOMEM_ERR_PTR(-EINVAL);
-
- return devm_ioremap(dev, res.start, resource_size(&res));
- }
-
- return devm_of_iomap(dev, np, index, NULL);
-}
-
static int qmp_usb_legacy_parse_dt_legacy(struct qmp_usb *qmp, struct device_node *np)
{
struct platform_device *pdev = to_platform_device(qmp->dev);
const struct qmp_phy_cfg *cfg = qmp->cfg;
struct device *dev = qmp->dev;
- bool exclusive = true;
qmp->serdes = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(qmp->serdes))
@@ -1210,7 +1194,7 @@ static int qmp_usb_legacy_parse_dt_legacy(struct qmp_usb *qmp, struct device_nod
if (IS_ERR(qmp->rx))
return PTR_ERR(qmp->rx);
- qmp->pcs = qmp_usb_legacy_iomap(dev, np, 2, exclusive);
+ qmp->pcs = devm_of_iomap(dev, np, 2, NULL);
if (IS_ERR(qmp->pcs))
return PTR_ERR(qmp->pcs);
--
2.39.2
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
next prev parent reply other threads:[~2024-01-09 3:04 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-09 3:03 [PATCH 0/8] phy: qcom: merge common register defines in QMP drivers Dmitry Baryshkov
2024-01-09 3:03 ` [PATCH 1/8] phy: qcom: qmp-usb-legacy: drop single-lane support Dmitry Baryshkov
2024-01-09 3:04 ` Dmitry Baryshkov [this message]
2024-01-09 3:04 ` [PATCH 3/8] phy: qcom: qmp: move common functions to common header Dmitry Baryshkov
2024-01-09 3:04 ` [PATCH 4/8] phy: qcom: qmp: split DP PHY registers to separate headers Dmitry Baryshkov
2024-01-09 3:04 ` [PATCH 5/8] phy: qcom: qmp: move common bits definitions to common header Dmitry Baryshkov
2024-01-09 3:04 ` [PATCH 6/8] fixup! phy: qcom: qmp: move common functions " Dmitry Baryshkov
2024-01-09 3:04 ` [PATCH 7/8] phy: qcom: sgmii-eth: use existing register definitions Dmitry Baryshkov
2024-01-09 15:35 ` Bartosz Golaszewski
2024-01-10 15:08 ` Andrew Halaney
2024-01-09 3:04 ` [PATCH 8/8] phy: qcom: sgmii-eth: move PCS registers to separate header Dmitry Baryshkov
2024-01-09 15:54 ` Bartosz Golaszewski
2024-01-10 15:09 ` Andrew Halaney
2024-01-09 3:06 ` [PATCH 0/8] phy: qcom: merge common register defines in QMP drivers Dmitry Baryshkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240109-phy-qmp-merge-common-v1-2-572899a14318@linaro.org \
--to=dmitry.baryshkov@linaro.org \
--cc=andersson@kernel.org \
--cc=kishon@kernel.org \
--cc=konrad.dybcio@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-phy@lists.infradead.org \
--cc=vkoul@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).