summaryrefslogtreecommitdiff
path: root/board/socrates
diff options
context:
space:
mode:
authorSergei Poselenov <sposelenov@emcraft.com>2008-05-27 13:47:00 +0200
committerWolfgang Denk <wd@denx.de>2008-05-27 14:20:55 +0200
commit5e1882df6a3efc7de5524d28cea4ecde7d163d54 (patch)
tree34371e9e474b7d3fc50009d718eff6927aa6bad5 /board/socrates
parent1f1554841a4c8e069d331176f0c3059fb2bb8280 (diff)
downloadu-boot-imx-5e1882df6a3efc7de5524d28cea4ecde7d163d54.zip
u-boot-imx-5e1882df6a3efc7de5524d28cea4ecde7d163d54.tar.gz
u-boot-imx-5e1882df6a3efc7de5524d28cea4ecde7d163d54.tar.bz2
Socrates: Fix PCI bus frequency report
Signed-off-by: Sergei Poselenov <sposelenov@emcraft.com>
Diffstat (limited to 'board/socrates')
-rw-r--r--board/socrates/socrates.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/board/socrates/socrates.c b/board/socrates/socrates.c
index cb58994..15c6478 100644
--- a/board/socrates/socrates.c
+++ b/board/socrates/socrates.c
@@ -45,6 +45,9 @@ ulong flash_get_size (ulong base, int banknum);
int checkboard (void)
{
+ volatile ccsr_gur_t *gur = (void *)(CFG_MPC85xx_GUTS_ADDR);
+ char *src;
+ int f;
char *s = getenv("serial#");
puts("Board: Socrates");
@@ -55,8 +58,14 @@ int checkboard (void)
putc('\n');
#ifdef CONFIG_PCI
- printf ("PCI1: 32 bit, %d MHz (compiled)\n",
- CONFIG_SYS_CLK_FREQ / 1000000);
+ if (gur->porpllsr & (1<<15)) {
+ src = "SYSCLK";
+ f = CONFIG_SYS_CLK_FREQ;
+ } else {
+ src = "PCI_CLK";
+ f = CONFIG_PCI_CLK_FREQ;
+ }
+ printf ("PCI1: 32 bit, %d MHz (%s)\n", f/1000000, src);
#else
printf ("PCI1: disabled\n");
#endif