Kyle Moffett | a895019 | 2011-12-07 16:39:16 -0500 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2009-2010 eXMeritus, A Boeing Company |
| 3 | * Copyright 2008-2009 Freescale Semiconductor, Inc. |
| 4 | * |
| 5 | * This program is free software; you can redistribute it and/or |
| 6 | * modify it under the terms of the GNU General Public License |
| 7 | * Version 2 as published by the Free Software Foundation. |
| 8 | */ |
| 9 | |
| 10 | #include <common.h> |
| 11 | |
York Sun | f062659 | 2013-09-30 09:22:09 -0700 | [diff] [blame] | 12 | #include <fsl_ddr_sdram.h> |
| 13 | #include <fsl_ddr_dimm_params.h> |
Kyle Moffett | a895019 | 2011-12-07 16:39:16 -0500 | [diff] [blame] | 14 | |
| 15 | void fsl_ddr_board_options(memctl_options_t *popts, |
| 16 | dimm_params_t *pdimm, |
| 17 | unsigned int ctrl_num) |
| 18 | { |
| 19 | /* |
| 20 | * We only support one DIMM, so according to the P2020 docs we should |
| 21 | * set the options as follows: |
| 22 | */ |
| 23 | popts->cs_local_opts[0].odt_rd_cfg = 0; |
| 24 | popts->cs_local_opts[0].odt_wr_cfg = 4; |
| 25 | popts->cs_local_opts[1].odt_rd_cfg = 0; |
| 26 | popts->cs_local_opts[1].odt_wr_cfg = 0; |
| 27 | popts->half_strength_driver_enable = 0; |
| 28 | |
| 29 | /* Manually configured for our static clock rate */ |
| 30 | popts->clk_adjust = 4; |
| 31 | popts->cpo_override = 4; |
| 32 | popts->write_data_delay = 2; |
Priyanka Jain | 4a71741 | 2013-09-25 10:41:19 +0530 | [diff] [blame] | 33 | popts->twot_en = 0; |
Kyle Moffett | a895019 | 2011-12-07 16:39:16 -0500 | [diff] [blame] | 34 | } |