colibri_imx6: fix video stdout in default environment
[oweals/u-boot.git] / drivers / ddr / fsl / ddr3_dimm_params.c
index a4b8c101f53b1cf7970b9a39f3c9fc4a587dd080..8464438c544fed2ff6ebb569238a34c563dc1e37 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright 2008-2012 Freescale Semiconductor, Inc.
  *     Dave Liu <daveliu@freescale.com>
@@ -5,14 +6,11 @@
  * calculate the organization and timing parameter
  * from ddr3 spd, please refer to the spec
  * JEDEC standard No.21-C 4_01_02_11R18.pdf
- *
- * 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.
  */
 
 #include <common.h>
 #include <fsl_ddr_sdram.h>
+#include <log.h>
 
 #include <fsl_ddr.h>
 
@@ -83,10 +81,10 @@ compute_ranksize(const ddr3_spd_eeprom_t *spd)
  * Writes the results to the dimm_params_t structure pointed by pdimm.
  *
  */
-unsigned int
-ddr_compute_dimm_parameters(const ddr3_spd_eeprom_t *spd,
-                            dimm_params_t *pdimm,
-                            unsigned int dimm_number)
+unsigned int ddr_compute_dimm_parameters(const unsigned int ctrl_num,
+                                        const ddr3_spd_eeprom_t *spd,
+                                        dimm_params_t *pdimm,
+                                        unsigned int dimm_number)
 {
        unsigned int retval;
        unsigned int mtb_ps;
@@ -188,7 +186,6 @@ ddr_compute_dimm_parameters(const ddr3_spd_eeprom_t *spd,
         * BL8 -bit3, BC4 -bit2
         */
        pdimm->burst_lengths_bitmask = 0x0c;
-       pdimm->row_density = __ilog2(pdimm->rank_density);
 
        /* MTB - medium timebase
         * The unit in the SPD spec is ns,