Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 12 Jul 2020 07:59:16 +0000 (UTC)
From:      Michal Meloun <mmel@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r363123 - head/sys/dev/extres/clk
Message-ID:  <202007120759.06C7xG7k054535@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202007120759.06C7xG7k054535>