]> git.sur5r.net Git - u-boot/commitdiff
Socrates: Fix PCI bus frequency report
authorSergei Poselenov <sposelenov@emcraft.com>
Tue, 27 May 2008 11:47:00 +0000 (13:47 +0200)
committerWolfgang Denk <wd@denx.de>
Tue, 27 May 2008 12:20:55 +0000 (14:20 +0200)
Signed-off-by: Sergei Poselenov <sposelenov@emcraft.com>
board/socrates/socrates.c
include/configs/socrates.h

index cb5899485a57da66b66d56a8c2e6675261031b2c..15c647884b48690884943f4eb512d4bf7aba773f 100644 (file)
@@ -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
index 23ed87f33828bc0d6fd423eb50c9a5059c80cc4a..6dc9effde46175e8839c7a3437ce68f8c9a08528 100644 (file)
  */
 #define CFG_PCI_PHYS           0x80000000      /* 1G PCI TLB */
 
-
+/* PCI is clocked by the external source at 33 MHz */
+#define CONFIG_PCI_CLK_FREQ    33000000
 #define CFG_PCI1_MEM_BASE      0x80000000
 #define CFG_PCI1_MEM_PHYS      CFG_PCI1_MEM_BASE
 #define CFG_PCI1_MEM_SIZE      0x20000000      /* 512M                 */