Add "starfive,jh7110-syscrg" used for setting clk_reg_base. clkgen
uses syscrg reg base. If clkgen does not find a compatible string, it
searches for the syscrg compatible string and get the syscrg reg base.
Change-Id: I9eadbf349eab0c14c27b9db97981820e4a940b70
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
}
noff = fdt_node_offset_by_compatible(fdt, -1, "starfive,jh7110-clkgen");
+ /*
+ * clkgen uses syscrg reg base with index 0.
+ * If clkgen does not find a compatible string, it searches for
+ * the syscrg compatible string and get the syscrg reg base.
+ */
+ if (noff == -FDT_ERR_NOTFOUND)
+ noff = fdt_node_offset_by_compatible(fdt, -1, "starfive,jh7110-syscrg");
if (-1 < noff) {
rc = fdt_get_node_addr_size(fdt, noff, 0, &addr, NULL);
if (rc)