summaryrefslogtreecommitdiffstats
path: root/include/fsl_ddr.h
diff options
context:
space:
mode:
authorYork Sun <yorksun@freescale.com>2015-01-06 13:18:50 -0800
committerYork Sun <yorksun@freescale.com>2015-02-24 13:09:18 -0800
commit03e664d8f4065010ccb6c75648192200a832fd8b (patch)
treef0398fdcdc87e12da79a82cde310b1a11937641a /include/fsl_ddr.h
parentb87e6f88e9218da3de371bb6cc8a34924153178e (diff)
downloadblackbird-obmc-uboot-03e664d8f4065010ccb6c75648192200a832fd8b.tar.gz
blackbird-obmc-uboot-03e664d8f4065010ccb6c75648192200a832fd8b.zip
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>
Diffstat (limited to 'include/fsl_ddr.h')
-rw-r--r--include/fsl_ddr.h15
1 files changed, 9 insertions, 6 deletions
diff --git a/include/fsl_ddr.h b/include/fsl_ddr.h
index 3286c95907..96fde91687 100644
--- a/include/fsl_ddr.h
+++ b/include/fsl_ddr.h
@@ -44,11 +44,12 @@ u32 fsl_ddr_get_version(void);
* to this specific DDR technology.
*/
static __inline__ int
-compute_dimm_parameters(const generic_spd_eeprom_t *spd,
+compute_dimm_parameters(const unsigned int ctrl_num,
+ const generic_spd_eeprom_t *spd,
dimm_params_t *pdimm,
unsigned int dimm_number)
{
- return ddr_compute_dimm_parameters(spd, pdimm, dimm_number);
+ return ddr_compute_dimm_parameters(ctrl_num, spd, pdimm, dimm_number);
}
#endif
@@ -92,13 +93,15 @@ fsl_ddr_compute(fsl_ddr_info_t *pinfo, unsigned int start_step,
unsigned int size_only);
const char *step_to_string(unsigned int step);
-unsigned int compute_fsl_memctl_config_regs(const memctl_options_t *popts,
+unsigned int compute_fsl_memctl_config_regs(const unsigned int ctrl_num,
+ const memctl_options_t *popts,
fsl_ddr_cfg_regs_t *ddr,
const common_timing_params_t *common_dimm,
const dimm_params_t *dimm_parameters,
unsigned int dbw_capacity_adjust,
unsigned int size_only);
unsigned int compute_lowest_common_dimm_parameters(
+ const unsigned int ctrl_num,
const dimm_params_t *dimm_params,
common_timing_params_t *outpdimm,
unsigned int number_of_dimms);
@@ -108,9 +111,9 @@ unsigned int populate_memctl_options(int all_dimms_registered,
unsigned int ctrl_num);
void check_interleaving_options(fsl_ddr_info_t *pinfo);
-unsigned int mclk_to_picos(unsigned int mclk);
-unsigned int get_memory_clk_period_ps(void);
-unsigned int picos_to_mclk(unsigned int picos);
+unsigned int mclk_to_picos(const unsigned int ctrl_num, unsigned int mclk);
+unsigned int get_memory_clk_period_ps(const unsigned int ctrl_num);
+unsigned int picos_to_mclk(const unsigned int ctrl_num, unsigned int picos);
void fsl_ddr_set_lawbar(
const common_timing_params_t *memctl_common_params,
unsigned int memctl_interleaved,
OpenPOWER on IntegriCloud