ddr.c 559 B

1234567891011121314151617181920212223242526272829
  1. /*
  2. * Copyright 2009, 2011 Freescale Semiconductor, Inc.
  3. *
  4. * SPDX-License-Identifier: GPL-2.0+
  5. */
  6. #include <common.h>
  7. #include <fsl_ddr_sdram.h>
  8. #include <fsl_ddr_dimm_params.h>
  9. void fsl_ddr_board_options(memctl_options_t *popts,
  10. dimm_params_t *pdimm,
  11. unsigned int ctrl_num)
  12. {
  13. if (ctrl_num) {
  14. printf("Wrong parameter for controller number %d", ctrl_num);
  15. return;
  16. }
  17. if (!pdimm->n_ranks)
  18. return;
  19. /*
  20. * Set DDR_SDRAM_CLK_CNTL = 0x02800000
  21. *
  22. * Clock is launched 5/8 applied cycle after address/command
  23. */
  24. popts->clk_adjust = 5;
  25. }