Lines Matching +full:im +full:-
2 * sbc8349.c -- WindRiver SBC8349 board support.
3 * Copyright (c) 2006-2007 Wind River Systems, Inc.
8 * SPDX-License-Identifier: GPL-2.0+
42 volatile immap_t *im = (immap_t *)CONFIG_SYS_IMMR; in dram_init() local
45 if ((im->sysconf.immrbar & IMMRBAR_BASE_ADDR) != (u32)im) in dram_init()
46 return -1; in dram_init()
48 /* DDR SDRAM - Main SODIMM */ in dram_init()
49 im->sysconf.ddrlaw[0].bar = CONFIG_SYS_DDR_BASE & LAWBAR_BAR; in dram_init()
66 /* set total bus SDRAM size(bytes) -- DDR */ in dram_init()
67 gd->ram_size = msize * 1024 * 1024; in dram_init()
74 * fixed sdram init -- doesn't use serial presence detect.
78 volatile immap_t *im = (immap_t *)CONFIG_SYS_IMMR; in fixed_sdram() local
83 im->sysconf.ddrlaw[0].bar = CONFIG_SYS_DDR_SDRAM_BASE & 0xfffff000; in fixed_sdram()
84 im->sysconf.ddrlaw[0].ar = LAWAR_EN | ((ddr_size_log2 - 1) & LAWAR_SIZE); in fixed_sdram()
93 im->ddr.csbnds[2].csbnds = in fixed_sdram()
95 (((CONFIG_SYS_DDR_SDRAM_BASE + ddr_size - 1) >> in fixed_sdram()
97 im->ddr.cs_config[2] = CONFIG_SYS_DDR_CS2_CONFIG; in fixed_sdram()
100 im->ddr.cs_config[0] = 0; in fixed_sdram()
101 im->ddr.cs_config[1] = 0; in fixed_sdram()
102 im->ddr.cs_config[3] = 0; in fixed_sdram()
104 im->ddr.timing_cfg_1 = CONFIG_SYS_DDR_TIMING_1; in fixed_sdram()
105 im->ddr.timing_cfg_2 = CONFIG_SYS_DDR_TIMING_2; in fixed_sdram()
107 im->ddr.sdram_cfg = in fixed_sdram()
114 /* for 32-bit mode burst length is 8 */ in fixed_sdram()
115 im->ddr.sdram_cfg |= (SDRAM_CFG_32_BE | SDRAM_CFG_8_BE); in fixed_sdram()
117 im->ddr.sdram_mode = CONFIG_SYS_DDR_MODE; in fixed_sdram()
119 im->ddr.sdram_interval = CONFIG_SYS_DDR_INTERVAL; in fixed_sdram()
123 im->ddr.sdram_cfg |= SDRAM_CFG_MEM_EN; in fixed_sdram()
149 volatile fsl_lbc_t *lbc = &immap->im_lbc; in sdram_init()
160 lbc->lbcr = CONFIG_SYS_LBC_LBCR; in sdram_init()
161 lbc->mrtpr = CONFIG_SYS_LBC_MRTPR; in sdram_init()
162 lbc->lsrt = CONFIG_SYS_LBC_LSRT; in sdram_init()
168 lbc->lsdmr = CONFIG_SYS_LBC_LSDMR_5; /* 0x40636733; normal operation */ in sdram_init()
170 lbc->lsdmr = CONFIG_SYS_LBC_LSDMR_1; /* 0x68636733; precharge all the banks */ in sdram_init()
175 lbc->lsdmr = CONFIG_SYS_LBC_LSDMR_2; /* 0x48636733; auto refresh */ in sdram_init()
203 lbc->lsdmr = CONFIG_SYS_LBC_LSDMR_4; in sdram_init()
208 lbc->lsdmr = CONFIG_SYS_LBC_LSDMR_5; /* 0x40636733; normal operation */ in sdram_init()