mirror of
https://xff.cz/git/u-boot/
synced 2025-09-03 17:52:07 +02:00
driver/ddr/fsl: Add support for multiple DDR clocks
Controller number is passed for function calls to support individual DDR clock, depending on SoC implementation. It is backward compatible with exising platforms. Multiple clocks have been verifyed on LS2085A emulator. Signed-off-by: York Sun <yorksun@freescale.com>
This commit is contained in:
@@ -211,10 +211,10 @@ compute_derated_DDR2_CAS_latency(unsigned int mclk_ps)
|
||||
*
|
||||
* FIXME: use #define for the retvals
|
||||
*/
|
||||
unsigned int
|
||||
ddr_compute_dimm_parameters(const ddr2_spd_eeprom_t *spd,
|
||||
dimm_params_t *pdimm,
|
||||
unsigned int dimm_number)
|
||||
unsigned int ddr_compute_dimm_parameters(const unsigned int ctrl_num,
|
||||
const ddr2_spd_eeprom_t *spd,
|
||||
dimm_params_t *pdimm,
|
||||
unsigned int dimm_number)
|
||||
{
|
||||
unsigned int retval;
|
||||
|
||||
@@ -310,8 +310,8 @@ ddr_compute_dimm_parameters(const ddr2_spd_eeprom_t *spd,
|
||||
& ~(1 << pdimm->caslat_x_minus_1));
|
||||
|
||||
/* Compute CAS latencies below that defined by SPD */
|
||||
pdimm->caslat_lowest_derated
|
||||
= compute_derated_DDR2_CAS_latency(get_memory_clk_period_ps());
|
||||
pdimm->caslat_lowest_derated = compute_derated_DDR2_CAS_latency(
|
||||
get_memory_clk_period_ps(ctrl_num));
|
||||
|
||||
/* Compute timing parameters */
|
||||
pdimm->trcd_ps = spd->trcd * 250;
|
||||
|
Reference in New Issue
Block a user