Commit bfac08472371d4d6d4fa56972b0e1166f780633a

Authored by Stephen Warren
Committed by Tom Warren
1 parent a6b2daffde

ARM: tegra: fix COUNTER_FREQUENCY for T210

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>

Showing 4 changed files with 8 additions and 4 deletions Side-by-side Diff

include/configs/e2220-1170.h
... ... @@ -60,7 +60,8 @@
60 60 #include "tegra-common-usb-gadget.h"
61 61 #include "tegra-common-post.h"
62 62  
63   -#define COUNTER_FREQUENCY 38400000
  63 +/* Crystal is 38.4MHz. clk_m runs at half that rate */
  64 +#define COUNTER_FREQUENCY 19200000
64 65  
65 66 #endif /* _E2220_1170_H */
include/configs/p2371-0000.h
... ... @@ -60,7 +60,8 @@
60 60 #include "tegra-common-usb-gadget.h"
61 61 #include "tegra-common-post.h"
62 62  
63   -#define COUNTER_FREQUENCY 38400000
  63 +/* Crystal is 38.4MHz. clk_m runs at half that rate */
  64 +#define COUNTER_FREQUENCY 19200000
64 65  
65 66 #endif /* _P2371_0000_H */
include/configs/p2371-2180.h
... ... @@ -60,7 +60,8 @@
60 60 #include "tegra-common-usb-gadget.h"
61 61 #include "tegra-common-post.h"
62 62  
63   -#define COUNTER_FREQUENCY 38400000
  63 +/* Crystal is 38.4MHz. clk_m runs at half that rate */
  64 +#define COUNTER_FREQUENCY 19200000
64 65  
65 66 #endif /* _P2371_2180_H */
include/configs/p2571.h
... ... @@ -61,7 +61,8 @@
61 61 #include "tegra-common-usb-gadget.h"
62 62 #include "tegra-common-post.h"
63 63  
64   -#define COUNTER_FREQUENCY 38400000
  64 +/* Crystal is 38.4MHz. clk_m runs at half that rate */
  65 +#define COUNTER_FREQUENCY 19200000
65 66 #define CONFIG_OF_BOARD_SETUP
66 67  
67 68 #endif /* _P2571_H */