Skip to content

Commit d3e7e79

Browse files
lumagvinodkoul
authored andcommitted
phy: qcom: qmp-usb-legacy: drop qmp_usb_legacy_iomap
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> Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org> Link: https://lore.kernel.org/r/20240126-phy-qmp-merge-common-v2-2-a463d0b57836@linaro.org Signed-off-by: Vinod Koul <vkoul@kernel.org>
1 parent 982f92d commit d3e7e79

1 file changed

Lines changed: 1 addition & 17 deletions

File tree

drivers/phy/qualcomm/phy-qcom-qmp-usb-legacy.c

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1166,27 +1166,11 @@ static int phy_pipe_clk_register(struct qmp_usb *qmp, struct device_node *np)
11661166
return devm_add_action_or_reset(qmp->dev, phy_clk_release_provider, np);
11671167
}
11681168

1169-
static void __iomem *qmp_usb_legacy_iomap(struct device *dev, struct device_node *np,
1170-
int index, bool exclusive)
1171-
{
1172-
struct resource res;
1173-
1174-
if (!exclusive) {
1175-
if (of_address_to_resource(np, index, &res))
1176-
return IOMEM_ERR_PTR(-EINVAL);
1177-
1178-
return devm_ioremap(dev, res.start, resource_size(&res));
1179-
}
1180-
1181-
return devm_of_iomap(dev, np, index, NULL);
1182-
}
1183-
11841169
static int qmp_usb_legacy_parse_dt_legacy(struct qmp_usb *qmp, struct device_node *np)
11851170
{
11861171
struct platform_device *pdev = to_platform_device(qmp->dev);
11871172
const struct qmp_phy_cfg *cfg = qmp->cfg;
11881173
struct device *dev = qmp->dev;
1189-
bool exclusive = true;
11901174

11911175
qmp->serdes = devm_platform_ioremap_resource(pdev, 0);
11921176
if (IS_ERR(qmp->serdes))
@@ -1210,7 +1194,7 @@ static int qmp_usb_legacy_parse_dt_legacy(struct qmp_usb *qmp, struct device_nod
12101194
if (IS_ERR(qmp->rx))
12111195
return PTR_ERR(qmp->rx);
12121196

1213-
qmp->pcs = qmp_usb_legacy_iomap(dev, np, 2, exclusive);
1197+
qmp->pcs = devm_of_iomap(dev, np, 2, NULL);
12141198
if (IS_ERR(qmp->pcs))
12151199
return PTR_ERR(qmp->pcs);
12161200

0 commit comments

Comments
 (0)