]> git.sur5r.net Git - u-boot/commitdiff
ARM: tegra: fix COUNTER_FREQUENCY for T210
authorStephen Warren <swarren@nvidia.com>
Wed, 19 Aug 2015 21:15:41 +0000 (15:15 -0600)
committerTom Warren <twarren@nvidia.com>
Wed, 16 Sep 2015 23:10:22 +0000 (16:10 -0700)
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@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
include/configs/e2220-1170.h
include/configs/p2371-0000.h
include/configs/p2371-2180.h
include/configs/p2571.h

index dff3f2a357335d7f8330c62346285301d0efde42..3bc60637edc1d471df8926d78e134906f17c4c38 100644 (file)
@@ -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 */
index 9d7b650d98ca6e1160e506acdd3155e2591b6a53..397a0ef8ae7b224ada98eff7a927fb2359dc1ec5 100644 (file)
@@ -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 */
index 378d5a905e939155c7e43d5e2eccdd2e073b97d3..f311ae9e7d0307c2f48c3c7914bfab2f9ad1d425 100644 (file)
@@ -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 */
index 356c941a773f44a8031b68819350a29eaea2c3b6..3bf98884723d585a494c369ea642664f6638883b 100644 (file)
@@ -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 */