socrates: Fix PCI clk fix patch
authorAndy Fleming <afleming@freescale.com>
Tue, 10 Jun 2008 23:49:34 +0000 (18:49 -0500)
committerAndrew Fleming-AFLEMING <afleming@freescale.com>
Tue, 10 Jun 2008 23:49:34 +0000 (18:49 -0500)
The submitted patch seems to have been more up-to-date, but an older patch was
already in the repository.  This patch encompasses the differences

Taken entirely from Sergei Poselenov <sposelenov@emcraft.com>

Signed-off-by: Andy Fleming <afleming@freescale.com>
board/socrates/socrates.c

index 15c647884b48690884943f4eb512d4bf7aba773f..3c1e826152a0ab60244eea8ec7b430c1756ac660 100644 (file)
@@ -35,6 +35,7 @@
 #include <flash.h>
 #include <libfdt.h>
 #include <fdt_support.h>
+#include <asm/io.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -58,7 +59,8 @@ int checkboard (void)
        putc('\n');
 
 #ifdef CONFIG_PCI
-       if (gur->porpllsr & (1<<15)) {
+       /* Check the PCI_clk sel bit */
+       if (in_be32(&gur->porpllsr) & (1<<15)) {
                src = "SYSCLK";
                f = CONFIG_SYS_CLK_FREQ;
        } else {