]> git.sur5r.net Git - u-boot/blobdiff - board/sbc8548/sbc8548.c
FSL LAW: Keep track of LAW allocations
[u-boot] / board / sbc8548 / sbc8548.c
index 65052e60c875bf6f6928484b4836e044b7471418..9c8c6733f7a0bae277ab2a3db006f2a8ae57ebe2 100644 (file)
@@ -30,7 +30,7 @@
 #include <asm/processor.h>
 #include <asm/immap_85xx.h>
 #include <asm/immap_fsl_pci.h>
-#include <spd.h>
+#include <spd_sdram.h>
 #include <miiphy.h>
 #include <libfdt.h>
 #include <fdt_support.h>
@@ -41,8 +41,6 @@ extern void ddr_enable_ecc(unsigned int dram_size);
 
 DECLARE_GLOBAL_DATA_PTR;
 
-extern long int spd_sdram(void);
-
 void local_bus_init(void);
 void sdram_init(void);
 long int fixed_sdram (void);
@@ -56,9 +54,10 @@ int checkboard (void)
 {
        volatile ccsr_gur_t *gur = (void *)(CFG_MPC85xx_GUTS_ADDR);
        volatile ccsr_local_ecm_t *ecm = (void *)(CFG_MPC85xx_ECM_ADDR);
+       volatile u_char *rev= (void *)CFG_BD_REV;
 
        printf ("Board: Wind River SBC8548 Rev. 0x%01x\n",
-                       (volatile)(*(u_char *)CFG_BD_REV) >> 4);
+                       (*rev) >> 4);
 
        /*
         * Initialize local bus.
@@ -300,7 +299,7 @@ long int fixed_sdram (void)
        ddr->cs1_config         = 0x80010101;
        ddr->cs2_config         = 0x00000000;
        ddr->cs3_config         = 0x00000000;
-       ddr->ext_refrec         = 0x00000000;
+       ddr->timing_cfg_3               = 0x00000000;
        ddr->timing_cfg_0       = 0x00220802;
        ddr->timing_cfg_1       = 0x38377322;
        ddr->timing_cfg_2       = 0x0fa044C7;
@@ -311,7 +310,7 @@ long int fixed_sdram (void)
        ddr->sdram_interval     = 0x05080100;
        ddr->sdram_md_cntl      = 0x00000000;
        ddr->sdram_data_init    = 0x00000000;
-       ddr->sdram_clk_cntl     = 0x03800000;
+       ddr->sdram_clk_cntl     = 0x03800000;
        asm("sync;isync;msync");
        udelay(500);
 
@@ -533,12 +532,12 @@ void
 ft_pci_setup(void *blob, bd_t *bd)
 {
        int node, tmp[2];
-       const char *path;
 
        node = fdt_path_offset(blob, "/aliases");
        tmp[0] = 0;
        if (node >= 0) {
 #ifdef CONFIG_PCI1
+               const char *path;
                path = fdt_getprop(blob, node, "pci0", NULL);
                if (path) {
                        tmp[1] = pci1_hose.last_busno - pci1_hose.first_busno;
@@ -546,6 +545,7 @@ ft_pci_setup(void *blob, bd_t *bd)
                }
 #endif
 #ifdef CONFIG_PCIE1
+               const char *path;
                path = fdt_getprop(blob, node, "pci1", NULL);
                if (path) {
                        tmp[1] = pcie1_hose.last_busno - pcie1_hose.first_busno;