Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm/omap Make frequency changing work on the beagle...
details: https://anonhg.NetBSD.org/src/rev/9023c6223cd7
branches: trunk
changeset: 788969:9023c6223cd7
user: matt <matt%NetBSD.org@localhost>
date: Thu Aug 01 00:24:43 2013 +0000
description:
Make frequency changing work on the beaglebone.
diffstat:
sys/arch/arm/omap/am335x_prcm.c | 13 ++++++++-----
1 files changed, 8 insertions(+), 5 deletions(-)
diffs (53 lines):
diff -r 369cc086cf23 -r 9023c6223cd7 sys/arch/arm/omap/am335x_prcm.c
--- a/sys/arch/arm/omap/am335x_prcm.c Wed Jul 31 22:37:55 2013 +0000
+++ b/sys/arch/arm/omap/am335x_prcm.c Thu Aug 01 00:24:43 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: am335x_prcm.c,v 1.4 2013/06/29 20:43:33 matt Exp $ */
+/* $NetBSD: am335x_prcm.c,v 1.5 2013/08/01 00:24:43 matt Exp $ */
/*
* TI OMAP Power, Reset, and Clock Management on the AM335x
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: am335x_prcm.c,v 1.4 2013/06/29 20:43:33 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: am335x_prcm.c,v 1.5 2013/08/01 00:24:43 matt Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -146,7 +146,9 @@
int freq = mpu_frequency;
int old_freq = freq;
- KASSERT(curcpu()->ci_data.cpu_cc_freq == mpu_frequency * 1000);
+ KASSERTMSG(curcpu()->ci_data.cpu_cc_freq == mpu_frequency * 1000000,
+ "cc_freq %"PRIu64" mpu_freq %u000000",
+ curcpu()->ci_data.cpu_cc_freq, mpu_frequency);
node.sysctl_data = &freq;
@@ -187,12 +189,13 @@
static char mpu_available_frequencies[__arraycount(mpu_frequencies)*6];
- KASSERT(__arraycount(mpu_frequencies) == 8);
+ __CTASSERT(__arraycount(mpu_frequencies) == 8);
snprintf(mpu_available_frequencies, sizeof(mpu_available_frequencies),
"%u %u %u %u %u %u %u %u",
mpu_frequencies[0], mpu_frequencies[1], mpu_frequencies[2],
mpu_frequencies[3], mpu_frequencies[4], mpu_frequencies[5],
mpu_frequencies[6], mpu_frequencies[7]);
+ mpu_frequency = curcpu()->ci_data.cpu_cc_freq / 1000000;
sysctl_createv(clog, 0, NULL, &node,
CTLFLAG_PERMANENT,
@@ -215,7 +218,7 @@
sysctl_createv(clog, 0, &freqnode, NULL,
CTLFLAG_PERMANENT|CTLFLAG_READWRITE,
CTLTYPE_INT, "current", NULL,
- mpu_current_frequency_sysctl_helper, 0, NULL, 0
+ mpu_current_frequency_sysctl_helper, 0, NULL, 0,
CTL_CREATE, CTL_EOL);
}
Home |
Main Index |
Thread Index |
Old Index