ddr.c (52c411805c090999f015df8bdf8016fb684746d0) | ddr.c (088454cde245b4d431ce0181be8b3cbceea059d6) |
---|---|
1/* 2 * (C) Copyright 2013 Keymile AG 3 * Valentin Longchamp <valentin.longchamp@keymile.com> 4 * 5 * Copyright 2009-2011 Freescale Semiconductor, Inc. 6 * 7 * SPDX-License-Identifier: GPL-2.0+ 8 */ 9 10#include <common.h> 11#include <i2c.h> 12#include <hwconfig.h> 13#include <asm/mmu.h> 14#include <fsl_ddr_sdram.h> 15#include <fsl_ddr_dimm_params.h> 16 | 1/* 2 * (C) Copyright 2013 Keymile AG 3 * Valentin Longchamp <valentin.longchamp@keymile.com> 4 * 5 * Copyright 2009-2011 Freescale Semiconductor, Inc. 6 * 7 * SPDX-License-Identifier: GPL-2.0+ 8 */ 9 10#include <common.h> 11#include <i2c.h> 12#include <hwconfig.h> 13#include <asm/mmu.h> 14#include <fsl_ddr_sdram.h> 15#include <fsl_ddr_dimm_params.h> 16 |
17DECLARE_GLOBAL_DATA_PTR; 18 |
|
17void fsl_ddr_board_options(memctl_options_t *popts, 18 dimm_params_t *pdimm, 19 unsigned int ctrl_num) 20{ 21 if (ctrl_num) { 22 printf("Wrong parameter for controller number %d", ctrl_num); 23 return; 24 } --- 18 unchanged lines hidden (view full) --- 43 44 /* Enable ZQ calibration */ 45 popts->zq_en = 1; 46 47 /* DHC_EN =1, ODT = 75 Ohm */ 48 popts->ddr_cdr1 = DDR_CDR1_DHC_EN | DDR_CDR_ODT_75ohm; 49} 50 | 19void fsl_ddr_board_options(memctl_options_t *popts, 20 dimm_params_t *pdimm, 21 unsigned int ctrl_num) 22{ 23 if (ctrl_num) { 24 printf("Wrong parameter for controller number %d", ctrl_num); 25 return; 26 } --- 18 unchanged lines hidden (view full) --- 45 46 /* Enable ZQ calibration */ 47 popts->zq_en = 1; 48 49 /* DHC_EN =1, ODT = 75 Ohm */ 50 popts->ddr_cdr1 = DDR_CDR1_DHC_EN | DDR_CDR_ODT_75ohm; 51} 52 |
51phys_size_t initdram(void) | 53int initdram(void) |
52{ 53 phys_size_t dram_size = 0; 54 55 puts("Initializing with SPD\n"); 56 57 dram_size = fsl_ddr_sdram(); 58 59 dram_size = setup_ddr_tlbs(dram_size / 0x100000); 60 dram_size *= 0x100000; 61 62 debug(" DDR: "); | 54{ 55 phys_size_t dram_size = 0; 56 57 puts("Initializing with SPD\n"); 58 59 dram_size = fsl_ddr_sdram(); 60 61 dram_size = setup_ddr_tlbs(dram_size / 0x100000); 62 dram_size *= 0x100000; 63 64 debug(" DDR: "); |
63 return dram_size; | 65 gd->ram_size = dram_size; 66 67 return 0; |
64} | 68} |