]> git.sur5r.net Git - u-boot/blobdiff - drivers/ddr/fsl/ddr1_dimm_params.c
SPDX: Convert all of our single license tags to Linux Kernel style
[u-boot] / drivers / ddr / fsl / ddr1_dimm_params.c
index 7f1c3afcc47b66eb9aa310b14eb9e821cc2f1c18..50fd998425a823c73606c3d2697d56c4d26f68db 100644 (file)
@@ -1,9 +1,6 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Copyright 2008 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.
  */
 
 #include <common.h>
@@ -110,22 +107,14 @@ static unsigned int byte40_table_ps[8] = {
 static unsigned int
 compute_trfc_ps_from_spd(unsigned char trctrfc_ext, unsigned char trfc)
 {
-       unsigned int trfc_ps;
-
-       trfc_ps = (((trctrfc_ext & 0x1) * 256) + trfc) * 1000
+       return ((trctrfc_ext & 0x1) * 256 + trfc) * 1000
                + byte40_table_ps[(trctrfc_ext >> 1) & 0x7];
-
-       return trfc_ps;
 }
 
 static unsigned int
 compute_trc_ps_from_spd(unsigned char trctrfc_ext, unsigned char trc)
 {
-       unsigned int trc_ps;
-
-       trc_ps = trc * 1000 + byte40_table_ps[(trctrfc_ext >> 4) & 0x7];
-
-       return trc_ps;
+       return trc * 1000 + byte40_table_ps[(trctrfc_ext >> 4) & 0x7];
 }
 
 /*
@@ -280,7 +269,6 @@ unsigned int ddr_compute_dimm_parameters(const unsigned int ctrl_num,
        pdimm->n_banks_per_sdram_device = spd->nbanks;
        pdimm->edc_config = spd->config;
        pdimm->burst_lengths_bitmask = spd->burstl;
-       pdimm->row_density = spd->bank_dens;
 
        /*
         * Calculate the Maximum Data Rate based on the Minimum Cycle time.