aboutsummaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorGurjant Kalsi <me@gurjantkalsi.com>2016-07-14 12:37:26 -0700
committerGurjant Kalsi <me@gurjantkalsi.com>2016-08-23 12:28:36 -0700
commit69d35fa55bdd03eb128515670f7553993be58871 (patch)
tree9cc18c3518de04f53f01b4b67b470c0d42ec40ce /platform
parent100133dc38720e8ca00e9012f32c5d9ee2a00d1b (diff)
downloadcommon-69d35fa55bdd03eb128515670f7553993be58871.tar.gz
[rpi3][bcm28xx][timer] Fix BCM2837 timer runing too fast.
RPi3/BCM2837 timer was previously running too fast due to an improper multiplier in arm_generic_timer_init(...). Fixed by setting the multiplier to 0 and allowing the ARM generic timer code to determine the frequency and compute the appropriate multiplier.
Diffstat (limited to 'platform')
-rw-r--r--platform/bcm28xx/platform.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/platform/bcm28xx/platform.c b/platform/bcm28xx/platform.c
index 1b63500c..eb81d085 100644
--- a/platform/bcm28xx/platform.c
+++ b/platform/bcm28xx/platform.c
@@ -128,9 +128,9 @@ void platform_early_init(void)
intc_init();
- arm_generic_timer_init(INTERRUPT_ARM_LOCAL_CNTPNSIRQ, 1000000);
-
#if BCM2837
+ arm_generic_timer_init(INTERRUPT_ARM_LOCAL_CNTPNSIRQ, 0);
+
/* look for a flattened device tree just before the kernel */
const void *fdt = (void *)KERNEL_BASE;
int err = fdt_check_header(fdt);
@@ -173,6 +173,10 @@ void platform_early_init(void)
}
}
+#elif BCM2836
+ arm_generic_timer_init(INTERRUPT_ARM_LOCAL_CNTPNSIRQ, 1000000);
+#else
+#error Unknown BCM28XX Variant
#endif
/* add the main memory arena */