[U-Boot] [PATCH] ARM: tegra: fix COUNTER_FREQUENCY for T210
Stephen Warren
swarren at wwwdotorg.org
Wed Aug 19 23:15:41 CEST 2015
From: Stephen Warren <swarren at nvidia.com>
While T210 boards all have 38.4MHz crystals, per the TRM, the only
supported configuration is to divide the crystal frequency by 2 to
generate clk_m, which is what feeds the ARM generic timers amongst other
things. Fix the value of COUNTER_FREQUENCY to reflect this divide-by-2.
When I queried the 19.2 value in Tom's original T210 patches, I wasn't
aware of this extra divide-by-2, and didn't notice any effect from the
incorrect value, since its only used if U-Boot is booted in EL3, whereas
I'm booting it in EL2.
Reported-by: Thierry Reding <treding at nvidia.com>
Signed-off-by: Stephen Warren <swarren at nvidia.com>
---
include/configs/e2220-1170.h | 3 ++-
include/configs/p2371-0000.h | 3 ++-
include/configs/p2371-2180.h | 3 ++-
include/configs/p2571.h | 3 ++-
4 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/include/configs/e2220-1170.h b/include/configs/e2220-1170.h
index dff3f2a35733..3bc60637edc1 100644
--- a/include/configs/e2220-1170.h
+++ b/include/configs/e2220-1170.h
@@ -60,6 +60,7 @@
#include "tegra-common-usb-gadget.h"
#include "tegra-common-post.h"
-#define COUNTER_FREQUENCY 38400000
+/* Crystal is 38.4MHz. clk_m runs at half that rate */
+#define COUNTER_FREQUENCY 19200000
#endif /* _E2220_1170_H */
diff --git a/include/configs/p2371-0000.h b/include/configs/p2371-0000.h
index 9d7b650d98ca..397a0ef8ae7b 100644
--- a/include/configs/p2371-0000.h
+++ b/include/configs/p2371-0000.h
@@ -60,6 +60,7 @@
#include "tegra-common-usb-gadget.h"
#include "tegra-common-post.h"
-#define COUNTER_FREQUENCY 38400000
+/* Crystal is 38.4MHz. clk_m runs at half that rate */
+#define COUNTER_FREQUENCY 19200000
#endif /* _P2371_0000_H */
diff --git a/include/configs/p2371-2180.h b/include/configs/p2371-2180.h
index 378d5a905e93..f311ae9e7d03 100644
--- a/include/configs/p2371-2180.h
+++ b/include/configs/p2371-2180.h
@@ -60,6 +60,7 @@
#include "tegra-common-usb-gadget.h"
#include "tegra-common-post.h"
-#define COUNTER_FREQUENCY 38400000
+/* Crystal is 38.4MHz. clk_m runs at half that rate */
+#define COUNTER_FREQUENCY 19200000
#endif /* _P2371_2180_H */
diff --git a/include/configs/p2571.h b/include/configs/p2571.h
index 356c941a773f..3bf98884723d 100644
--- a/include/configs/p2571.h
+++ b/include/configs/p2571.h
@@ -61,7 +61,8 @@
#include "tegra-common-usb-gadget.h"
#include "tegra-common-post.h"
-#define COUNTER_FREQUENCY 38400000
+/* Crystal is 38.4MHz. clk_m runs at half that rate */
+#define COUNTER_FREQUENCY 19200000
#define CONFIG_OF_BOARD_SETUP
#endif /* _P2571_H */
--
1.9.1
More information about the U-Boot
mailing list