]> git.sur5r.net Git - u-boot/blobdiff - arch/powerpc/cpu/mpc8xxx/ddr/ddr1_dimm_params.c
Merge branch 'master' of git://git.denx.de/u-boot-nand-flash
[u-boot] / arch / powerpc / cpu / mpc8xxx / ddr / ddr1_dimm_params.c
index 91847644180dfa861c3d08b1a351e01d852d96f1..f137fcee34d67735a72d3cd0894dd8f3413d5121 100644 (file)
@@ -41,7 +41,7 @@ compute_ranksize(unsigned int mem_type, unsigned char row_dens)
        /* Bottom 2 bits up to the top. */
        bsize = ((row_dens >> 2) | ((row_dens & 3) << 6));
        bsize <<= 24ULL;
-       debug("DDR: DDR I rank density = 0x%08x\n", bsize);
+       debug("DDR: DDR I rank density = 0x%16llx\n", bsize);
 
        return bsize;
 }
@@ -287,57 +287,57 @@ ddr_compute_dimm_parameters(const ddr1_spd_eeprom_t *spd,
         * The SPD clk_cycle field (tCKmin) is measured in tenths of
         * nanoseconds and represented as BCD.
         */
-       pdimm->tCKmin_X_ps
+       pdimm->tckmin_x_ps
                = convert_bcd_tenths_to_cycle_time_ps(spd->clk_cycle);
-       pdimm->tCKmin_X_minus_1_ps
+       pdimm->tckmin_x_minus_1_ps
                = convert_bcd_tenths_to_cycle_time_ps(spd->clk_cycle2);
-       pdimm->tCKmin_X_minus_2_ps
+       pdimm->tckmin_x_minus_2_ps
                = convert_bcd_tenths_to_cycle_time_ps(spd->clk_cycle3);
 
-       pdimm->tCKmax_ps = compute_tckmax_from_spd_ps(spd->tckmax);
+       pdimm->tckmax_ps = compute_tckmax_from_spd_ps(spd->tckmax);
 
        /*
         * Compute CAS latencies defined by SPD
-        * The SPD caslat_X should have at least 1 and at most 3 bits set.
+        * The SPD caslat_x should have at least 1 and at most 3 bits set.
         *
         * If cas_lat after masking is 0, the __ilog2 function returns
         * 255 into the variable.   This behavior is abused once.
         */
-       pdimm->caslat_X  = __ilog2(spd->cas_lat);
-       pdimm->caslat_X_minus_1 = __ilog2(spd->cas_lat
-                                         & ~(1 << pdimm->caslat_X));
-       pdimm->caslat_X_minus_2 = __ilog2(spd->cas_lat
-                                         & ~(1 << pdimm->caslat_X)
-                                         & ~(1 << pdimm->caslat_X_minus_1));
+       pdimm->caslat_x  = __ilog2(spd->cas_lat);
+       pdimm->caslat_x_minus_1 = __ilog2(spd->cas_lat
+                                         & ~(1 << pdimm->caslat_x));
+       pdimm->caslat_x_minus_2 = __ilog2(spd->cas_lat
+                                         & ~(1 << pdimm->caslat_x)
+                                         & ~(1 << pdimm->caslat_x_minus_1));
 
        /* Compute CAS latencies below that defined by SPD */
        pdimm->caslat_lowest_derated
                = compute_derated_DDR1_CAS_latency(get_memory_clk_period_ps());
 
        /* Compute timing parameters */
-       pdimm->tRCD_ps = spd->trcd * 250;
-       pdimm->tRP_ps = spd->trp * 250;
-       pdimm->tRAS_ps = spd->tras * 1000;
+       pdimm->trcd_ps = spd->trcd * 250;
+       pdimm->trp_ps = spd->trp * 250;
+       pdimm->tras_ps = spd->tras * 1000;
 
-       pdimm->tWR_ps = mclk_to_picos(3);
-       pdimm->tWTR_ps = mclk_to_picos(1);
-       pdimm->tRFC_ps = compute_trfc_ps_from_spd(0, spd->trfc);
+       pdimm->twr_ps = mclk_to_picos(3);
+       pdimm->twtr_ps = mclk_to_picos(1);
+       pdimm->trfc_ps = compute_trfc_ps_from_spd(0, spd->trfc);
 
-       pdimm->tRRD_ps = spd->trrd * 250;
-       pdimm->tRC_ps = compute_trc_ps_from_spd(0, spd->trc);
+       pdimm->trrd_ps = spd->trrd * 250;
+       pdimm->trc_ps = compute_trc_ps_from_spd(0, spd->trc);
 
        pdimm->refresh_rate_ps = determine_refresh_rate_ps(spd->refresh);
 
-       pdimm->tIS_ps = convert_bcd_hundredths_to_cycle_time_ps(spd->ca_setup);
-       pdimm->tIH_ps = convert_bcd_hundredths_to_cycle_time_ps(spd->ca_hold);
-       pdimm->tDS_ps
+       pdimm->tis_ps = convert_bcd_hundredths_to_cycle_time_ps(spd->ca_setup);
+       pdimm->tih_ps = convert_bcd_hundredths_to_cycle_time_ps(spd->ca_hold);
+       pdimm->tds_ps
                = convert_bcd_hundredths_to_cycle_time_ps(spd->data_setup);
-       pdimm->tDH_ps
+       pdimm->tdh_ps
                = convert_bcd_hundredths_to_cycle_time_ps(spd->data_hold);
 
-       pdimm->tRTP_ps = mclk_to_picos(2);      /* By the book. */
-       pdimm->tDQSQ_max_ps = spd->tdqsq * 10;
-       pdimm->tQHS_ps = spd->tqhs * 10;
+       pdimm->trtp_ps = mclk_to_picos(2);      /* By the book. */
+       pdimm->tdqsq_max_ps = spd->tdqsq * 10;
+       pdimm->tqhs_ps = spd->tqhs * 10;
 
        return 0;
 }