Author: mmel Date: Sun Jul 12 07:59:15 2020 New Revision: 363123 URL: https://svnweb.freebsd.org/changeset/base/363123
Log: Reverse the processing order of assigned clocks property. Linux processes these clocks in reverse order and some DT relies on this fact. For example, the frequency setting for a given PLL is the last in the list, preceded by the frequency setting of its following divider or so... MFC after: 1 week Modified: head/sys/dev/extres/clk/clk.c Modified: head/sys/dev/extres/clk/clk.c ============================================================================== --- head/sys/dev/extres/clk/clk.c Sun Jul 12 07:42:21 2020 (r363122) +++ head/sys/dev/extres/clk/clk.c Sun Jul 12 07:59:15 2020 (r363123) @@ -1407,7 +1407,7 @@ clk_set_assigned(device_t dev, phandle_t node) if (ofw_bus_parse_xref_list_get_length(node, "assigned-clock-parents", "#clock-cells", &nparents) != 0) nparents = -1; - for (i = 0; i < nclocks; i++) { + for (i = nclocks - 1; i >= 0; i--) { /* First get the clock we are supposed to modify */ rv = clk_get_by_ofw_index_prop(dev, 0, "assigned-clocks", i, &clk); _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"