Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm/rockchip Fix rate calculation of fractional mod...
details: https://anonhg.NetBSD.org/src/rev/31540e69ea7b
branches: trunk
changeset: 319945:31540e69ea7b
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Sat Jun 16 13:24:04 2018 +0000
description:
Fix rate calculation of fractional mode PLLs
diffstat:
sys/arch/arm/rockchip/rk_cru_pll.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r 1d64c188e1a9 -r 31540e69ea7b sys/arch/arm/rockchip/rk_cru_pll.c
--- a/sys/arch/arm/rockchip/rk_cru_pll.c Sat Jun 16 13:09:41 2018 +0000
+++ b/sys/arch/arm/rockchip/rk_cru_pll.c Sat Jun 16 13:24:04 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rk_cru_pll.c,v 1.1 2018/06/16 00:19:04 jmcneill Exp $ */
+/* $NetBSD: rk_cru_pll.c,v 1.2 2018/06/16 13:24:04 jmcneill Exp $ */
/*-
* Copyright (c) 2018 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rk_cru_pll.c,v 1.1 2018/06/16 00:19:04 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rk_cru_pll.c,v 1.2 2018/06/16 13:24:04 jmcneill Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -96,7 +96,7 @@
foutvco = fref / refdiv * fbdiv;
} else {
/* fractional mode */
- foutvco = fref / refdiv * (fbdiv + fracdiv / 224);
+ foutvco = fref / refdiv * fbdiv + ((fref * fracdiv) >> 24);
}
foutpostdiv = foutvco / postdiv1 / postdiv2;
Home |
Main Index |
Thread Index |
Old Index