Ira W. Snyder | 9839709 | 2011-11-23 08:25:58 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2009, 2011 Freescale Semiconductor, Inc. |
| 3 | * |
Wolfgang Denk | 1a45966 | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 4 | * SPDX-License-Identifier: GPL-2.0+ |
Ira W. Snyder | 9839709 | 2011-11-23 08:25:58 -0800 | [diff] [blame] | 5 | */ |
| 6 | #include <common.h> |
| 7 | |
York Sun | 5614e71 | 2013-09-30 09:22:09 -0700 | [diff] [blame] | 8 | #include <fsl_ddr_sdram.h> |
| 9 | #include <fsl_ddr_dimm_params.h> |
Ira W. Snyder | 9839709 | 2011-11-23 08:25:58 -0800 | [diff] [blame] | 10 | |
| 11 | void fsl_ddr_board_options(memctl_options_t *popts, |
| 12 | dimm_params_t *pdimm, |
| 13 | unsigned int ctrl_num) |
| 14 | { |
| 15 | if (ctrl_num) { |
| 16 | printf("Wrong parameter for controller number %d", ctrl_num); |
| 17 | return; |
| 18 | } |
| 19 | |
| 20 | if (!pdimm->n_ranks) |
| 21 | return; |
| 22 | |
| 23 | /* |
| 24 | * Set DDR_SDRAM_CLK_CNTL = 0x02800000 |
| 25 | * |
| 26 | * Clock is launched 5/8 applied cycle after address/command |
| 27 | */ |
| 28 | popts->clk_adjust = 5; |
| 29 | } |