blob: 571137443ebd4d12a3b7239f6d044533df451dcc [file] [log] [blame]
Jon Loeliger8b625112008-03-18 11:12:44 -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>
Jon Loeliger8b625112008-03-18 11:12:44 -050010
11#include <asm/fsl_ddr_sdram.h>
Haiying Wangdfb49102008-10-03 12:36:55 -040012#include <asm/fsl_ddr_dimm_params.h>
Jon Loeliger8b625112008-03-18 11:12:44 -050013
Haiying Wangdfb49102008-10-03 12:36:55 -040014void fsl_ddr_board_options(memctl_options_t *popts,
15 dimm_params_t *pdimm,
16 unsigned int ctrl_num)
Jon Loeliger8b625112008-03-18 11:12:44 -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 Liub4983e12008-11-21 16:31:43 +080038 /* 2T timing enable */
39 popts->twoT_en = 1;
40
Jon Loeliger8b625112008-03-18 11:12:44 -050041 /*
42 * Factors to consider for half-strength driver enable:
43 * - number of DIMMs installed
44 */
45 popts->half_strength_driver_enable = 0;
46}