Date: Sat, 5 Jun 2021 16:34:01 GMT From: "Bjoern A. Zeeb" <bz@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 57af163c8e7e - main - arm64/rk_pcie_phy: handle assigned-clock* Message-ID: <202106051634.155GY1is008777@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=57af163c8e7ecdefbac00ab7354122c1225e2c70 commit 57af163c8e7ecdefbac00ab7354122c1225e2c70 Author: Bjoern A. Zeeb <bz@FreeBSD.org> AuthorDate: 2021-05-20 16:48:10 +0000 Commit: Bjoern A. Zeeb <bz@FreeBSD.org> 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");
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202106051634.155GY1is008777>