Module Name: src
Committed By: hsuenaga
Date: Wed Apr 15 10:30:42 UTC 2015
Modified Files:
src/sys/arch/evbarm/armadaxp: armadaxp_machdep.c
Log Message:
lookup clock frequencies of ARMADA 370 correctly.
To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/evbarm/armadaxp/armadaxp_machdep.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/evbarm/armadaxp/armadaxp_machdep.c
diff -u src/sys/arch/evbarm/armadaxp/armadaxp_machdep.c:1.9 src/sys/arch/evbarm/armadaxp/armadaxp_machdep.c:1.10
--- src/sys/arch/evbarm/armadaxp/armadaxp_machdep.c:1.9 Wed Apr 15 10:15:40 2015
+++ src/sys/arch/evbarm/armadaxp/armadaxp_machdep.c Wed Apr 15 10:30:42 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: armadaxp_machdep.c,v 1.9 2015/04/15 10:15:40 hsuenaga Exp $ */
+/* $NetBSD: armadaxp_machdep.c,v 1.10 2015/04/15 10:30:42 hsuenaga Exp $ */
/*******************************************************************************
Copyright (C) Marvell International Ltd. and its affiliates
@@ -37,7 +37,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBI
*******************************************************************************/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: armadaxp_machdep.c,v 1.9 2015/04/15 10:15:40 hsuenaga Exp $");
+__KERNEL_RCSID(0, "$NetBSD: armadaxp_machdep.c,v 1.10 2015/04/15 10:30:42 hsuenaga Exp $");
#include "opt_machdep.h"
#include "opt_mvsoc.h"
@@ -92,6 +92,7 @@ __KERNEL_RCSID(0, "$NetBSD: armadaxp_mac
#include <evbarm/marvell/marvellreg.h>
#include <evbarm/marvell/marvellvar.h>
+#include <dev/marvell/marvellreg.h>
#include "mvpex.h"
#include "com.h"
@@ -344,7 +345,21 @@ initarm(void *arg)
/* Get CPU, system and timebase frequencies */
extern vaddr_t misc_base;
misc_base = MARVELL_INTERREGS_VBASE + ARMADAXP_MISC_BASE;
- armadaxp_getclks();
+ switch (mvsoc_model()) {
+ case MARVELL_ARMADA370_MV6707:
+ case MARVELL_ARMADA370_MV6710:
+ case MARVELL_ARMADA370_MV6W11:
+ armada370_getclks();
+ break;
+ case MARVELL_ARMADAXP_MV78130:
+ case MARVELL_ARMADAXP_MV78160:
+ case MARVELL_ARMADAXP_MV78230:
+ case MARVELL_ARMADAXP_MV78260:
+ case MARVELL_ARMADAXP_MV78460:
+ default:
+ armadaxp_getclks();
+ break;
+ }
mvsoc_clkgating = armadaxp_clkgating;
/* Preconfigure interrupts */