Skip to content

Commit 912cee1

Browse files
lumagvinodkoul
authored andcommitted
phy: qcom: qmp-pcie: restore compatibility with existing DTs
Existing device trees specify only a single clock-output-name for the PCIe PHYs. The function phy_aux_clk_register() expects a second entry in that property. When it doesn't find it, it returns an error, thus failing the probe of the PHY and thus breaking support for the corresponding PCIe host. Follow the approach of the combo USB+DT PHY and generate the name for the AUX clocks instead of requiring it in DT. Fixes: 583ca9c ("phy: qcom: qmp-pcie: register second optional PHY AUX clock") Reviewed-by: Neil Armstrong <[email protected]> Signed-off-by: Dmitry Baryshkov <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent 8e97ddd commit 912cee1

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

drivers/phy/qualcomm/phy-qcom-qmp-pcie.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4033,14 +4033,11 @@ static int phy_aux_clk_register(struct qmp_pcie *qmp, struct device_node *np)
40334033
{
40344034
struct clk_fixed_rate *fixed = &qmp->aux_clk_fixed;
40354035
struct clk_init_data init = { };
4036-
int ret;
4036+
char name[64];
40374037

4038-
ret = of_property_read_string_index(np, "clock-output-names", 1, &init.name);
4039-
if (ret) {
4040-
dev_err(qmp->dev, "%pOFn: No clock-output-names index 1\n", np);
4041-
return ret;
4042-
}
4038+
snprintf(name, sizeof(name), "%s::phy_aux_clk", dev_name(qmp->dev));
40434039

4040+
init.name = name;
40444041
init.ops = &clk_fixed_rate_ops;
40454042

40464043
fixed->fixed_rate = qmp->cfg->aux_clock_rate;

0 commit comments

Comments
 (0)