arm64/rk_pcie_phy: handle assigned-clock*

Nanopi4 based SoCs (NanoPC-T4, NanoPi M4*, and NanoPi Neo4) have
assigned-clock* in the pcie_phy node.  Handle them but only fail
in case clk_set_assigned() returns an error other than
"no assigned-clock*" (as it would for all other SoCs).

Reviewed by:	manu
MFC After:	2 weeks
Differential Revision: https://reviews.freebsd.org/D30363
This commit is contained in:
Bjoern A. Zeeb 2021-05-20 16:48:10 +00:00
parent 65a226b41d
commit 57af163c8e

View File

@ -297,6 +297,13 @@ static int
goto fail;
}
rv = clk_set_assigned(dev, ofw_bus_get_node(dev));
if (rv != 0 && rv != ENOENT) {
device_printf(dev, "clk_set_assigned failed: %d\n", rv);
rv = ENXIO;
goto fail;
}
rv = clk_get_by_ofw_name(sc->dev, 0, "refclk", &sc->clk_ref);
if (rv != 0) {
device_printf(sc->dev, "Cannot get 'refclk' clock\n");