The branch main has been updated by bz:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=57af163c8e7ecdefbac00ab7354122c1225e2c70

commit 57af163c8e7ecdefbac00ab7354122c1225e2c70
Author:     Bjoern A. Zeeb <[email protected]>
AuthorDate: 2021-05-20 16:48:10 +0000
Commit:     Bjoern A. Zeeb <[email protected]>
CommitDate: 2021-06-05 16:16:29 +0000

    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
---
 sys/arm64/rockchip/rk_pcie_phy.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/sys/arm64/rockchip/rk_pcie_phy.c b/sys/arm64/rockchip/rk_pcie_phy.c
index 75bd213bfd23..eaa7619e15c3 100644
--- a/sys/arm64/rockchip/rk_pcie_phy.c
+++ b/sys/arm64/rockchip/rk_pcie_phy.c
@@ -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");
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main
To unsubscribe, send any mail to "[email protected]"

Reply via email to