Module Name: src
Committed By: bouyer
Date: Sat Oct 17 15:02:55 UTC 2015
Modified Files:
src/sys/arch/arm/allwinner: awin_board.c
Log Message:
The A20 manual says that the pll6 output is (AWIN_REF_FREQ * n * k) / 2,
not (AWIN_REF_FREQ * n * k) / m (m is only used for the SATA clock).
On the boards I tested, m happens to be 2 so the correct value was returned
anyway.
To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/sys/arch/arm/allwinner/awin_board.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/arm/allwinner/awin_board.c
diff -u src/sys/arch/arm/allwinner/awin_board.c:1.37 src/sys/arch/arm/allwinner/awin_board.c:1.38
--- src/sys/arch/arm/allwinner/awin_board.c:1.37 Sat Oct 17 15:00:45 2015
+++ src/sys/arch/arm/allwinner/awin_board.c Sat Oct 17 15:02:55 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: awin_board.c,v 1.37 2015/10/17 15:00:45 bouyer Exp $ */
+/* $NetBSD: awin_board.c,v 1.38 2015/10/17 15:02:55 bouyer Exp $ */
/*-
* Copyright (c) 2012 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -36,7 +36,7 @@
#include <sys/cdefs.h>
-__KERNEL_RCSID(1, "$NetBSD: awin_board.c,v 1.37 2015/10/17 15:00:45 bouyer Exp $");
+__KERNEL_RCSID(1, "$NetBSD: awin_board.c,v 1.38 2015/10/17 15:02:55 bouyer Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -570,7 +570,7 @@ awin_pll6_get_rate(void)
} else {
n = __SHIFTOUT(cfg, AWIN_PLL_CFG_FACTOR_N);
k = __SHIFTOUT(cfg, AWIN_PLL_CFG_FACTOR_K) + 1;
- m = __SHIFTOUT(cfg, AWIN_PLL_CFG_FACTOR_M) + 1;
+ m = 2;
}
return (AWIN_REF_FREQ * n * k) / m;