Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 Nov 2018 19:11:35 +0000 (UTC)
From:      Emmanuel Vadot <manu@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r341255 - head/sys/arm64/rockchip/clk
Message-ID:  <201811291911.wATJBZte012874@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: manu
Date: Thu Nov 29 19:11:35 2018
New Revision: 341255
URL: https://svnweb.freebsd.org/changeset/base/341255

Log:
  arm64: rockchip: armclk: Do not change parent freq if CLK_SET_DRYRUN is set
  
  MFC after:	3 days

Modified:
  head/sys/arm64/rockchip/clk/rk_clk_armclk.c

Modified: head/sys/arm64/rockchip/clk/rk_clk_armclk.c
==============================================================================
--- head/sys/arm64/rockchip/clk/rk_clk_armclk.c	Thu Nov 29 19:06:05 2018	(r341254)
+++ head/sys/arm64/rockchip/clk/rk_clk_armclk.c	Thu Nov 29 19:11:35 2018	(r341255)
@@ -163,17 +163,17 @@ rk_clk_armclk_set_freq(struct clknode *clk, uint64_t f
 	if (rate == sc->nrates)
 		return (0);
 
-	err = clknode_set_freq(p_main, best_p, 0, 1);
-	if (err != 0)
-		printf("Cannot set %s to %lu\n",
-		    clknode_get_name(p_main),
-		    best_p);
-
 	if ((flags & CLK_SET_DRYRUN) != 0) {
 		*fout = best;
 		*stop = 1;
 		return (0);
 	}
+
+	err = clknode_set_freq(p_main, best_p, 0, 1);
+	if (err != 0)
+		printf("Cannot set %s to %lu\n",
+		    clknode_get_name(p_main),
+		    best_p);
 
 	DEVICE_LOCK(clk);
 	READ4(clk, sc->muxdiv_offset, &val);



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