blob: 41d4cfe7381402d22b18f62b4afd8ad3a84798b7 [file] [log] [blame]
Kumar Gala5b4ae732008-08-27 01:03:42 -05001/*
2 * Copyright 2008 Freescale Semiconductor, Inc.
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * Version 2 as published by the Free Software Foundation.
7 */
8
9#include <common.h>
Kumar Gala5b4ae732008-08-27 01:03:42 -050010
York Sunf0626592013-09-30 09:22:09 -070011#include <fsl_ddr_sdram.h>
12#include <fsl_ddr_dimm_params.h>
Kumar Gala5b4ae732008-08-27 01:03:42 -050013
Haiying Wangfa440362008-10-03 12:36:55 -040014void fsl_ddr_board_options(memctl_options_t *popts,
15 dimm_params_t *pdimm,
16 unsigned int ctrl_num)
Kumar Gala5b4ae732008-08-27 01:03:42 -050017{
18 /*
19 * Factors to consider for CPO:
20 * - frequency
21 * - ddr1 vs. ddr2
22 */
23 popts->cpo_override = 0;
24
25 /*
26 * Factors to consider for write data delay:
27 * - number of DIMMs
28 *
29 * 1 = 1/4 clock delay
30 * 2 = 1/2 clock delay
31 * 3 = 3/4 clock delay
32 * 4 = 1 clock delay
33 * 5 = 5/4 clock delay
34 * 6 = 3/2 clock delay
35 */
36 popts->write_data_delay = 3;
37
Dave Liua06d74c2008-11-21 16:31:43 +080038 /* 2T timing enable */
Priyanka Jain4a717412013-09-25 10:41:19 +053039 popts->twot_en = 1;
Dave Liua06d74c2008-11-21 16:31:43 +080040
Kumar Gala5b4ae732008-08-27 01:03:42 -050041 /*
42 * Factors to consider for half-strength driver enable:
43 * - number of DIMMs installed
44 */
45 popts->half_strength_driver_enable = 0;
46}