Skip to content
Snippets Groups Projects
Commit ad229a44 authored by Stelian Pop's avatar Stelian Pop Committed by Jean-Christophe PLAGNIOL-VILLARD
Browse files

AT91: Use AT91_CPU_CLOCK in displays


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: default avatarStelian Pop <stelian@popies.net>
parent 9b827cf1
No related branches found
No related tags found
No related merge requests found
...@@ -342,7 +342,7 @@ void lcd_show_board_info(void) ...@@ -342,7 +342,7 @@ void lcd_show_board_info(void)
lcd_printf ("at91support@atmel.com\n"); lcd_printf ("at91support@atmel.com\n");
lcd_printf ("%s CPU at %s MHz\n", lcd_printf ("%s CPU at %s MHz\n",
AT91_CPU_NAME, AT91_CPU_NAME,
strmhz(temp, AT91_MAIN_CLOCK)); strmhz(temp, AT91_CPU_CLOCK));
dram_size = 0; dram_size = 0;
for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++) for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++)
......
...@@ -225,7 +225,7 @@ void lcd_show_board_info(void) ...@@ -225,7 +225,7 @@ void lcd_show_board_info(void)
lcd_printf ("at91support@atmel.com\n"); lcd_printf ("at91support@atmel.com\n");
lcd_printf ("%s CPU at %s MHz\n", lcd_printf ("%s CPU at %s MHz\n",
AT91_CPU_NAME, AT91_CPU_NAME,
strmhz(temp, AT91_MAIN_CLOCK)); strmhz(temp, AT91_CPU_CLOCK));
dram_size = 0; dram_size = 0;
for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++) for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++)
......
...@@ -276,7 +276,7 @@ void lcd_show_board_info(void) ...@@ -276,7 +276,7 @@ void lcd_show_board_info(void)
lcd_printf ("at91support@atmel.com\n"); lcd_printf ("at91support@atmel.com\n");
lcd_printf ("%s CPU at %s MHz\n", lcd_printf ("%s CPU at %s MHz\n",
AT91_CPU_NAME, AT91_CPU_NAME,
strmhz(temp, AT91_MAIN_CLOCK)); strmhz(temp, AT91_CPU_CLOCK));
dram_size = 0; dram_size = 0;
for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++) for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++)
......
...@@ -197,7 +197,7 @@ void lcd_show_board_info(void) ...@@ -197,7 +197,7 @@ void lcd_show_board_info(void)
lcd_printf ("at91support@atmel.com\n"); lcd_printf ("at91support@atmel.com\n");
lcd_printf ("%s CPU at %s MHz\n", lcd_printf ("%s CPU at %s MHz\n",
AT91_CPU_NAME, AT91_CPU_NAME,
strmhz(temp, AT91_MAIN_CLOCK)); strmhz(temp, AT91_CPU_CLOCK));
dram_size = 0; dram_size = 0;
for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++) for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++)
......
...@@ -29,9 +29,10 @@ ...@@ -29,9 +29,10 @@
/* ARM asynchronous clock */ /* ARM asynchronous clock */
#define AT91_CPU_NAME "AT91CAP9" #define AT91_CPU_NAME "AT91CAP9"
#define AT91_MAIN_CLOCK 200000000 /* from 12 MHz crystal */ #define AT91_MAIN_CLOCK 12000000 /* 12 MHz crystal */
#define AT91_MASTER_CLOCK 100000000 /* peripheral = main / 2 */ #define AT91_MASTER_CLOCK 100000000 /* peripheral */
#define CONFIG_SYS_HZ 1000000 /* 1us resolution */ #define AT91_CPU_CLOCK 200000000 /* cpu */
#define CONFIG_SYS_HZ 1000000 /* 1us resolution */
#define AT91_SLOW_CLOCK 32768 /* slow clock */ #define AT91_SLOW_CLOCK 32768 /* slow clock */
......
...@@ -28,9 +28,11 @@ ...@@ -28,9 +28,11 @@
#define __CONFIG_H #define __CONFIG_H
/* ARM asynchronous clock */ /* ARM asynchronous clock */
#define AT91_MAIN_CLOCK 198656000 /* from 18.432 MHz crystal */ #define AT91_CPU_NAME "AT91SAM9260"
#define AT91_MASTER_CLOCK 99328000 /* peripheral = main / 2 */ #define AT91_MAIN_CLOCK 18432000 /* 18.432 MHz crystal */
#define CONFIG_SYS_HZ 1000000 /* 1us resolution */ #define AT91_MASTER_CLOCK 100000000 /* peripheral */
#define AT91_CPU_CLOCK 200000000 /* cpu */
#define CONFIG_SYS_HZ 1000000 /* 1us resolution */
#define AT91_SLOW_CLOCK 32768 /* slow clock */ #define AT91_SLOW_CLOCK 32768 /* slow clock */
......
...@@ -29,9 +29,10 @@ ...@@ -29,9 +29,10 @@
/* ARM asynchronous clock */ /* ARM asynchronous clock */
#define AT91_CPU_NAME "AT91SAM9261" #define AT91_CPU_NAME "AT91SAM9261"
#define AT91_MAIN_CLOCK 198656000 /* from 18.432 MHz crystal */ #define AT91_MAIN_CLOCK 18432000 /* 18.432 MHz crystal */
#define AT91_MASTER_CLOCK 99328000 /* peripheral = main / 2 */ #define AT91_MASTER_CLOCK 100000000 /* peripheral */
#define CONFIG_SYS_HZ 1000000 /* 1us resolution */ #define AT91_CPU_CLOCK 200000000 /* cpu */
#define CONFIG_SYS_HZ 1000000 /* 1us resolution */
#define AT91_SLOW_CLOCK 32768 /* slow clock */ #define AT91_SLOW_CLOCK 32768 /* slow clock */
......
...@@ -29,9 +29,10 @@ ...@@ -29,9 +29,10 @@
/* ARM asynchronous clock */ /* ARM asynchronous clock */
#define AT91_CPU_NAME "AT91SAM9263" #define AT91_CPU_NAME "AT91SAM9263"
#define AT91_MAIN_CLOCK 199919000 /* from 16.367 MHz crystal */ #define AT91_MAIN_CLOCK 16367660 /* 16.367 MHz crystal */
#define AT91_MASTER_CLOCK 99959500 /* peripheral = main / 2 */ #define AT91_MASTER_CLOCK 100000000 /* peripheral */
#define CONFIG_SYS_HZ 1000000 /* 1us resolution */ #define AT91_CPU_CLOCK 200000000 /* cpu */
#define CONFIG_SYS_HZ 1000000 /* 1us resolution */
#define AT91_SLOW_CLOCK 32768 /* slow clock */ #define AT91_SLOW_CLOCK 32768 /* slow clock */
......
...@@ -29,9 +29,10 @@ ...@@ -29,9 +29,10 @@
/* ARM asynchronous clock */ /* ARM asynchronous clock */
#define AT91_CPU_NAME "AT91SAM9RL" #define AT91_CPU_NAME "AT91SAM9RL"
#define AT91_MAIN_CLOCK 200000000 /* from 12.000 MHz crystal */ #define AT91_MAIN_CLOCK 12000000 /* 12 MHz crystal */
#define AT91_MASTER_CLOCK 100000000 /* peripheral = main / 2 */ #define AT91_MASTER_CLOCK 100000000 /* peripheral */
#define CONFIG_SYS_HZ 1000000 /* 1us resolution */ #define AT91_CPU_CLOCK 200000000 /* cpu */
#define CONFIG_SYS_HZ 1000000 /* 1us resolution */
#define AT91_SLOW_CLOCK 32768 /* slow clock */ #define AT91_SLOW_CLOCK 32768 /* slow clock */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment