Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 25 Jul 2020 06:32:24 +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: r363510 - head/sys/dev/extres/clk
Message-ID:  <202007250632.06P6WOjS090816@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mmel
Date: Sat Jul 25 06:32:23 2020
New Revision: 363510
URL: https://svnweb.freebsd.org/changeset/base/363510

Log:
  Revert r363123.
  As Emanuel poited me the Linux processes these clock assignments in forward
  order, not in reversed. I misread the original code.
  Tha problem with wrong order for assigned clocks found in tegra (and some imx)
  DT should be reanalyzed and solved by different way.
  
  MFC with:	r363123
  Reported by;	manu

Modified:
  head/sys/dev/extres/clk/clk.c

Modified: head/sys/dev/extres/clk/clk.c
==============================================================================
--- head/sys/dev/extres/clk/clk.c	Sat Jul 25 04:13:38 2020	(r363509)
+++ head/sys/dev/extres/clk/clk.c	Sat Jul 25 06:32:23 2020	(r363510)
@@ -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 = nclocks - 1; i >= 0; i--) {
+	for (i = 0; i < nclocks; 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?202007250632.06P6WOjS090816>