]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - board/freescale/mpc837xemds/mpc837xemds.c
board_f: Drop return value from initdram()
[people/ms/u-boot.git] / board / freescale / mpc837xemds / mpc837xemds.c
index 572913c7ac521ce1f55758079bf49ea6a2ec031f..a3af246854899f4f8996e55aaa0f06984155aeaf 100644 (file)
@@ -20,6 +20,8 @@
 #include "pci.h"
 #include "../common/pq-mds-pib.h"
 
+DECLARE_GLOBAL_DATA_PTR;
+
 int board_early_init_f(void)
 {
        u8 *bcsr = (u8 *)CONFIG_SYS_BCSR;
@@ -216,13 +218,13 @@ extern void ddr_enable_ecc(unsigned int dram_size);
 #endif
 int fixed_sdram(void);
 
-phys_size_t initdram(int board_type)
+int initdram(void)
 {
        volatile immap_t *im = (immap_t *) CONFIG_SYS_IMMR;
        u32 msize = 0;
 
        if ((im->sysconf.immrbar & IMMRBAR_BASE_ADDR) != (u32) im)
-               return -1;
+               return -ENXIO;
 
 #if defined(CONFIG_SPD_EEPROM)
        msize = spd_sdram();
@@ -236,7 +238,9 @@ phys_size_t initdram(int board_type)
 #endif
 
        /* return total bus DDR size(bytes) */
-       return (msize * 1024 * 1024);
+       gd->ram_size = msize * 1024 * 1024;
+
+       return 0;
 }
 
 #if !defined(CONFIG_SPD_EEPROM)
@@ -332,7 +336,7 @@ int ft_board_setup(void *blob, bd_t *bd)
 {
        ft_cpu_setup(blob, bd);
        ft_tsec_fixup(blob, bd);
-       fdt_fixup_dr_usb(blob, bd);
+       fsl_fdt_fixup_dr_usb(blob, bd);
        fdt_fixup_esdhc(blob, bd);
 #ifdef CONFIG_PCI
        ft_pci_setup(blob, bd);