diff options
author | Emmanuel Vadot <manu@FreeBSD.org> | 2020-08-28 18:25:45 +0000 |
---|---|---|
committer | Emmanuel Vadot <manu@FreeBSD.org> | 2020-08-28 18:25:45 +0000 |
commit | 341ccc993cf6da5ccdb1bc3f457d3c6eb2cb4d49 (patch) | |
tree | 94f8a5d3f44bba9308230b02c122d49bc7b9f3db /sys/arm | |
parent | 62693fe830799113802738c4ffb85fe8b82bd236 (diff) | |
download | src-341ccc993cf6da5ccdb1bc3f457d3c6eb2cb4d49.tar.gz src-341ccc993cf6da5ccdb1bc3f457d3c6eb2cb4d49.zip |
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@mh.net.ru>
MFC after: 3 days
X-MFC-With: 363887
Notes
Notes:
svn path=/head/; revision=364927
Diffstat (limited to 'sys/arm')
-rw-r--r-- | sys/arm/allwinner/clkng/aw_clk_nm.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/arm/allwinner/clkng/aw_clk_nm.c b/sys/arm/allwinner/clkng/aw_clk_nm.c index 27caf3374266..f530acf65a7a 100644 --- a/sys/arm/allwinner/clkng/aw_clk_nm.c +++ b/sys/arm/allwinner/clkng/aw_clk_nm.c @@ -221,11 +221,15 @@ aw_clk_nm_set_freq(struct clknode *clk, uint64_t fparent, uint64_t *fout, 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); } |