svn commit: r364927 - head/sys/arm/allwinner/clkng

Emmanuel Vadot manu at FreeBSD.org
Fri Aug 28 18:25:46 UTC 2020


Author: manu
Date: Fri Aug 28 18:25:45 2020
New Revision: 364927
URL: https://svnweb.freebsd.org/changeset/base/364927

Log:
  arm: allwinner: clk: Add printfs when we cannot set the correct freq
  
  For some unknown reason this seems to fix this function when we printf
  the best variable. This isn't a delay problem as doing a printf without
  it doesn't solve this problem.
  This is way above my pay grade so add some printf that shouldn't be printed
  in 99% of the case anyway.
  Fix booting on most Allwinner boards as the mmc IP uses a NM clock.
  
  Reported by:	Alexander Mishin <mishin at mh.net.ru>
  MFC after:	3 days
  X-MFC-With:	363887

Modified:
  head/sys/arm/allwinner/clkng/aw_clk_nm.c

Modified: head/sys/arm/allwinner/clkng/aw_clk_nm.c
==============================================================================
--- head/sys/arm/allwinner/clkng/aw_clk_nm.c	Fri Aug 28 17:55:54 2020	(r364926)
+++ head/sys/arm/allwinner/clkng/aw_clk_nm.c	Fri Aug 28 18:25:45 2020	(r364927)
@@ -221,11 +221,15 @@ aw_clk_nm_set_freq(struct clknode *clk, uint64_t fpare
 	if ((best < *fout) &&
 	  ((flags & CLK_SET_ROUND_DOWN) == 0)) {
 		*stop = 1;
+		printf("best freq (%llu) < requested freq(%llu)\n",
+		    best, *fout);
 		return (ERANGE);
 	}
 	if ((best > *fout) &&
 	  ((flags & CLK_SET_ROUND_UP) == 0)) {
 		*stop = 1;
+		printf("best freq (%llu) > requested freq(%llu)\n",
+		    best, *fout);
 		return (ERANGE);
 	}
 


More information about the svn-src-head mailing list