]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - board/freescale/mpc8544ds/mpc8544ds.c
Change initdram() return type to phys_size_t
[people/ms/u-boot.git] / board / freescale / mpc8544ds / mpc8544ds.c
index 66cb536a4beb88416e8a39f0658d4c0ce5e6b5bb..f615b2384a967360a09796aaf647119dabc2c413 100644 (file)
@@ -27,7 +27,7 @@
 #include <asm/immap_85xx.h>
 #include <asm/immap_fsl_pci.h>
 #include <asm/io.h>
-#include <spd.h>
+#include <spd_sdram.h>
 #include <miiphy.h>
 #include <libfdt.h>
 #include <fdt_support.h>
 extern void ddr_enable_ecc(unsigned int dram_size);
 #endif
 
-extern long int spd_sdram(void);
-
 void sdram_init(void);
 
-int board_early_init_f (void)
-{
-       return 0;
-}
-
 int checkboard (void)
 {
        volatile ccsr_gur_t *gur = (void *)(CFG_MPC85xx_GUTS_ADDR);
@@ -66,7 +59,7 @@ int checkboard (void)
        return 0;
 }
 
-long int
+phys_size_t
 initdram(int board_type)
 {
        long dram_size = 0;
@@ -85,45 +78,6 @@ initdram(int board_type)
        return dram_size;
 }
 
-#if defined(CFG_DRAM_TEST)
-int
-testdram(void)
-{
-       uint *pstart = (uint *) CFG_MEMTEST_START;
-       uint *pend = (uint *) CFG_MEMTEST_END;
-       uint *p;
-
-       printf("Testing DRAM from 0x%08x to 0x%08x\n",
-              CFG_MEMTEST_START,
-              CFG_MEMTEST_END);
-
-       printf("DRAM test phase 1:\n");
-       for (p = pstart; p < pend; p++)
-               *p = 0xaaaaaaaa;
-
-       for (p = pstart; p < pend; p++) {
-               if (*p != 0xaaaaaaaa) {
-                       printf ("DRAM test fails at: %08x\n", (uint) p);
-                       return 1;
-               }
-       }
-
-       printf("DRAM test phase 2:\n");
-       for (p = pstart; p < pend; p++)
-               *p = 0x55555555;
-
-       for (p = pstart; p < pend; p++) {
-               if (*p != 0x55555555) {
-                       printf ("DRAM test fails at: %08x\n", (uint) p);
-                       return 1;
-               }
-       }
-
-       printf("DRAM test passed.\n");
-       return 0;
-}
-#endif
-
 #ifdef CONFIG_PCI1
 static struct pci_controller pci1_hose;
 #endif
@@ -165,7 +119,7 @@ pci_init_board(void)
        volatile ccsr_fsl_pci_t *pci = (ccsr_fsl_pci_t *) CFG_PCIE3_ADDR;
        extern void fsl_pci_init(struct pci_controller *hose);
        struct pci_controller *hose = &pcie3_hose;
-       int pcie_ep = (host_agent == 3);
+       int pcie_ep = (host_agent == 1);
        int pcie_configured  = io_sel >= 1;
 
        if (pcie_configured && !(devdisr & MPC85xx_DEVDISR_PCIE)){