]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
ppc4xx: Detect if the sysclk on Sequoia is 33 or 33.333 MHz
authorJeffrey Mann <mannj@embeddedplanet.com>
Sat, 5 May 2007 06:32:14 +0000 (08:32 +0200)
committerStefan Roese <sr@denx.de>
Sat, 5 May 2007 06:32:14 +0000 (08:32 +0200)
The AMCC Secquoia board has been changed in a new revision from using a
33.000 MHz clock to a 33.333 MHz system clock. A bit in the CPLD
indicates the difference. This patch reads that bit and uses the correct
clock speed for the board. This code is backward compatable will all
prior boards. All prior boards will be read as 33.000.

Signed-off-by: Jeffrey Mann <mannj@embeddedplanet.com>
Signed-off-by: Stefan Roese <sr@denx.de>
include/configs/sequoia.h

index 1f19621f444d687413e03c6710d1954696fcf8a9..b7f79c26eb9e6974e9c39fcab19ce0804a03a1c8 100644 (file)
@@ -38,7 +38,9 @@
 #define CONFIG_440GRX          1               /* Specific PPC440GRx   */
 #endif
 #define CONFIG_4xx             1               /* ... PPC4xx family    */
-#define CONFIG_SYS_CLK_FREQ    33000000        /* external freq to pll */
+/* Detect Sequoia PLL input clock automatically via CPLD bit           */
+#define CONFIG_SYS_CLK_FREQ    ((in8(CFG_BCSR_BASE + 3) & 0x80) ? \
+                               3333333 : 33000000)
 
 #define CONFIG_BOARD_EARLY_INIT_F 1            /* Call board_early_init_f */
 #define CONFIG_MISC_INIT_R     1               /* Call misc_init_r     */