aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/extres
diff options
context:
space:
mode:
authorMichal Meloun <mmel@FreeBSD.org>2020-07-12 07:59:15 +0000
committerMichal Meloun <mmel@FreeBSD.org>2020-07-12 07:59:15 +0000
commitc0c5cf7b31ff943dc4f0d473f9b03efb1c6d6fba (patch)
treeafe40657ba59cbb5349f69e1e4908b5e85e8b5e9 /sys/dev/extres
parenta9be5d7515f96cfce750984e21458e11e9d755a7 (diff)
downloadsrc-c0c5cf7b31ff943dc4f0d473f9b03efb1c6d6fba.tar.gz
src-c0c5cf7b31ff943dc4f0d473f9b03efb1c6d6fba.zip
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
Notes
Notes: svn path=/head/; revision=363123
Diffstat (limited to 'sys/dev/extres')
-rw-r--r--sys/dev/extres/clk/clk.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/extres/clk/clk.c b/sys/dev/extres/clk/clk.c
index acb4a2cfecb0..5715315d309b 100644
--- a/sys/dev/extres/clk/clk.c
+++ b/sys/dev/extres/clk/clk.c
@@ -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);