Introduce AT91_CPU_CLOCK and use it for displaying the CPU
speed in the LCD driver.

Also make AT91_MAIN_CLOCK and AT91_MASTER_CLOCK reflect the
corresponding board clocks.

Signed-off-by: Stelian Pop <[EMAIL PROTECTED]>
---
 common/lcd.c                    |    2 +-
 include/configs/at91cap9adk.h   |    5 +++--
 include/configs/at91sam9260ek.h |    6 ++++--
 include/configs/at91sam9261ek.h |    5 +++--
 include/configs/at91sam9263ek.h |    5 +++--
 include/configs/at91sam9rlek.h  |    5 +++--
 6 files changed, 17 insertions(+), 11 deletions(-)

diff --git a/common/lcd.c b/common/lcd.c
index 25f8664..c6ced91 100644
--- a/common/lcd.c
+++ b/common/lcd.c
@@ -837,7 +837,7 @@ static void *lcd_logo (void)
 
        sprintf (info, "%s CPU at %s MHz",
                AT91_CPU_NAME,
-               strmhz(temp, AT91_MAIN_CLOCK));
+               strmhz(temp, AT91_CPU_CLOCK));
        lcd_drawchars (LCD_INFO_X, LCD_INFO_Y + VIDEO_FONT_HEIGHT * 3,
                                        (uchar *)info, strlen(info));
 
diff --git a/include/configs/at91cap9adk.h b/include/configs/at91cap9adk.h
index fd06245..1dbd3a4 100644
--- a/include/configs/at91cap9adk.h
+++ b/include/configs/at91cap9adk.h
@@ -29,8 +29,9 @@
 
 /* ARM asynchronous clock */
 #define AT91_CPU_NAME          "AT91CAP9"
-#define AT91_MAIN_CLOCK                200000000       /* from 12 MHz crystal 
*/
-#define AT91_MASTER_CLOCK      100000000       /* peripheral = main / 2 */
+#define AT91_MAIN_CLOCK                12000000        /* 12 MHz crystal */
+#define AT91_MASTER_CLOCK      100000000       /* peripheral */
+#define AT91_CPU_CLOCK         200000000       /* cpu */
 #define CFG_HZ                 1000000         /* 1us resolution */
 
 #define AT91_SLOW_CLOCK                32768   /* slow clock */
diff --git a/include/configs/at91sam9260ek.h b/include/configs/at91sam9260ek.h
index 41d1da3..cb8857a 100644
--- a/include/configs/at91sam9260ek.h
+++ b/include/configs/at91sam9260ek.h
@@ -28,8 +28,10 @@
 #define __CONFIG_H
 
 /* ARM asynchronous clock */
-#define AT91_MAIN_CLOCK                198656000       /* from 18.432 MHz 
crystal */
-#define AT91_MASTER_CLOCK      99328000        /* peripheral = main / 2 */
+#define AT91_CPU_NAME          "AT91SAM9260"
+#define AT91_MAIN_CLOCK                18432000        /* 18.432 MHz crystal */
+#define AT91_MASTER_CLOCK      100000000       /* peripheral */
+#define AT91_CPU_CLOCK         200000000       /* cpu */
 #define CFG_HZ                 1000000         /* 1us resolution */
 
 #define AT91_SLOW_CLOCK                32768   /* slow clock */
diff --git a/include/configs/at91sam9261ek.h b/include/configs/at91sam9261ek.h
index 80c3b03..92e134d 100644
--- a/include/configs/at91sam9261ek.h
+++ b/include/configs/at91sam9261ek.h
@@ -29,8 +29,9 @@
 
 /* ARM asynchronous clock */
 #define AT91_CPU_NAME          "AT91SAM9261"
-#define AT91_MAIN_CLOCK                198656000       /* from 18.432 MHz 
crystal */
-#define AT91_MASTER_CLOCK      99328000        /* peripheral = main / 2 */
+#define AT91_MAIN_CLOCK                18432000        /* 18.432 MHz crystal */
+#define AT91_MASTER_CLOCK      100000000       /* peripheral */
+#define AT91_CPU_CLOCK         200000000       /* cpu */
 #define CFG_HZ                 1000000         /* 1us resolution */
 
 #define AT91_SLOW_CLOCK                32768   /* slow clock */
diff --git a/include/configs/at91sam9263ek.h b/include/configs/at91sam9263ek.h
index b4368ef..c914571 100644
--- a/include/configs/at91sam9263ek.h
+++ b/include/configs/at91sam9263ek.h
@@ -29,8 +29,9 @@
 
 /* ARM asynchronous clock */
 #define AT91_CPU_NAME          "AT91SAM9263"
-#define AT91_MAIN_CLOCK                199919000       /* from 16.367 MHz 
crystal */
-#define AT91_MASTER_CLOCK      99959500        /* peripheral = main / 2 */
+#define AT91_MAIN_CLOCK                16367660        /* 16.367 MHz crystal */
+#define AT91_MASTER_CLOCK      100000000       /* peripheral */
+#define AT91_CPU_CLOCK         200000000       /* cpu */
 #define CFG_HZ                 1000000         /* 1us resolution */
 
 #define AT91_SLOW_CLOCK                32768   /* slow clock */
diff --git a/include/configs/at91sam9rlek.h b/include/configs/at91sam9rlek.h
index 32168dc..9bcd2db 100644
--- a/include/configs/at91sam9rlek.h
+++ b/include/configs/at91sam9rlek.h
@@ -29,8 +29,9 @@
 
 /* ARM asynchronous clock */
 #define AT91_CPU_NAME          "AT91SAM9RL"
-#define AT91_MAIN_CLOCK                200000000       /* from 12.000 MHz 
crystal */
-#define AT91_MASTER_CLOCK      100000000       /* peripheral = main / 2 */
+#define AT91_MAIN_CLOCK                12000000        /* 12 MHz crystal */
+#define AT91_MASTER_CLOCK      100000000       /* peripheral */
+#define AT91_CPU_CLOCK         200000000       /* cpu */
 #define CFG_HZ                 1000000         /* 1us resolution */
 
 #define AT91_SLOW_CLOCK                32768   /* slow clock */
-- 
1.5.4.3

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to