]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - board/freescale/corenet_ds/ddr.c
board_f: Drop return value from initdram()
[people/ms/u-boot.git] / board / freescale / corenet_ds / ddr.c
index 18e2ff617b4481b2146fc0fcfd731468d9aa0f5f..ad93abf9f413dddd3693b5250daac2e323447f66 100644 (file)
@@ -1,17 +1,15 @@
 /*
  * Copyright 2009-2011 Freescale Semiconductor, Inc.
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * Version 2 as published by the Free Software Foundation.
+ * SPDX-License-Identifier:    GPL-2.0
  */
 
 #include <common.h>
 #include <i2c.h>
 #include <hwconfig.h>
 #include <asm/mmu.h>
-#include <asm/fsl_ddr_sdram.h>
-#include <asm/fsl_ddr_dimm_params.h>
+#include <fsl_ddr_sdram.h>
+#include <fsl_ddr_dimm_params.h>
 #include <asm/fsl_law.h>
 
 DECLARE_GLOBAL_DATA_PTR;
@@ -21,7 +19,7 @@ DECLARE_GLOBAL_DATA_PTR;
  * Fixed sdram init -- doesn't use serial presence detect.
  */
 extern fixed_ddr_parm_t fixed_ddr_parm_0[];
-#if (CONFIG_NUM_DDR_CONTROLLERS == 2)
+#if (CONFIG_SYS_NUM_DDR_CTLRS == 2)
 extern fixed_ddr_parm_t fixed_ddr_parm_1[];
 #endif
 
@@ -58,7 +56,7 @@ phys_size_t fixed_sdram(void)
        ddr_cfg_regs.ddr_cdr1 = DDR_CDR1_DHC_EN;
        fsl_ddr_set_memctl_regs(&ddr_cfg_regs, 0, 0);
 
-#if (CONFIG_NUM_DDR_CONTROLLERS == 2)
+#if (CONFIG_SYS_NUM_DDR_CTLRS == 2)
        memcpy(&ddr_cfg_regs,
                fixed_ddr_parm_1[i].ddr_settings,
                sizeof(ddr_cfg_regs));
@@ -78,7 +76,7 @@ phys_size_t fixed_sdram(void)
                        return 0;
                }
        } else {
-#if (CONFIG_NUM_DDR_CONTROLLERS == 2)
+#if (CONFIG_SYS_NUM_DDR_CTLRS == 2)
                /* We require both controllers have identical DIMMs */
                lawbar1_target_id = LAW_TRGT_IF_DDR_1;
                if (set_ddr_laws(CONFIG_SYS_DDR_SDRAM_BASE,
@@ -262,7 +260,7 @@ found:
        popts->ddr_cdr1 = DDR_CDR1_DHC_EN;
 }
 
-phys_size_t initdram(int board_type)
+int initdram(void)
 {
        phys_size_t dram_size;
 
@@ -280,5 +278,7 @@ phys_size_t initdram(int board_type)
        dram_size *= 0x100000;
 
        debug("    DDR: ");
-       return dram_size;
+       gd->ram_size = dram_size;
+
+       return 0;
 }