Jon Loeliger | 99d5071 | 2008-03-18 11:12:44 -0500 | [diff] [blame] | 1 | /* |
| 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 Loeliger | 99d5071 | 2008-03-18 11:12:44 -0500 | [diff] [blame] | 10 | |
York Sun | f062659 | 2013-09-30 09:22:09 -0700 | [diff] [blame] | 11 | #include <fsl_ddr_sdram.h> |
| 12 | #include <fsl_ddr_dimm_params.h> |
Jon Loeliger | 99d5071 | 2008-03-18 11:12:44 -0500 | [diff] [blame] | 13 | |
Haiying Wang | fa44036 | 2008-10-03 12:36:55 -0400 | [diff] [blame] | 14 | void fsl_ddr_board_options(memctl_options_t *popts, |
| 15 | dimm_params_t *pdimm, |
| 16 | unsigned int ctrl_num) |
Jon Loeliger | 99d5071 | 2008-03-18 11:12:44 -0500 | [diff] [blame] | 17 | { |
| 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 Liu | a06d74c | 2008-11-21 16:31:43 +0800 | [diff] [blame] | 38 | /* 2T timing enable */ |
Priyanka Jain | 4a71741 | 2013-09-25 10:41:19 +0530 | [diff] [blame] | 39 | popts->twot_en = 1; |
Dave Liu | a06d74c | 2008-11-21 16:31:43 +0800 | [diff] [blame] | 40 | |
Jon Loeliger | 99d5071 | 2008-03-18 11:12:44 -0500 | [diff] [blame] | 41 | /* |
| 42 | * Factors to consider for half-strength driver enable: |
| 43 | * - number of DIMMs installed |
| 44 | */ |
| 45 | popts->half_strength_driver_enable = 0; |
| 46 | } |