Lines Matching refs:ddr
27 volatile ddr83xx_t *ddr = &immap->ddr; in board_add_ram_info() local
30 printf(" (DDR%d", ((ddr->sdram_cfg & SDRAM_CFG_SDRAM_TYPE_MASK) in board_add_ram_info()
34 if ((ddr->sdram_cfg & SDRAM_CFG_DBW_MASK) == SDRAM_CFG_DBW_16) in board_add_ram_info()
36 else if ((ddr->sdram_cfg & SDRAM_CFG_DBW_MASK) == SDRAM_CFG_DBW_32) in board_add_ram_info()
41 if (ddr->sdram_cfg & SDRAM_CFG_32_BE) in board_add_ram_info()
47 if (ddr->sdram_cfg & SDRAM_CFG_ECC_EN) in board_add_ram_info()
126 volatile ddr83xx_t *ddr = &immap->ddr; in spd_sdram() local
157 clrsetbits_be32(&ddr->sdram_cfg, SDRAM_CFG_MEM_EN, 0); in spd_sdram()
220 ddr->csbnds[0].csbnds = (banksize(spd.row_dens) >> 24) - 1; in spd_sdram()
221 ddr->cs_config[0] = ( 1 << 31 in spd_sdram()
228 debug("cs0_bnds = 0x%08x\n",ddr->csbnds[0].csbnds); in spd_sdram()
229 debug("cs0_config = 0x%08x\n",ddr->cs_config[0]); in spd_sdram()
232 ddr->csbnds[1].csbnds = ( (banksize(spd.row_dens) >> 8) in spd_sdram()
234 ddr->cs_config[1] = ( 1<<31 in spd_sdram()
240 debug("cs1_bnds = 0x%08x\n",ddr->csbnds[1].csbnds); in spd_sdram()
241 debug("cs1_config = 0x%08x\n",ddr->cs_config[1]); in spd_sdram()
245 ddr->csbnds[2].csbnds = (banksize(spd.row_dens) >> 24) - 1; in spd_sdram()
246 ddr->cs_config[2] = ( 1 << 31 in spd_sdram()
253 debug("cs2_bnds = 0x%08x\n",ddr->csbnds[2].csbnds); in spd_sdram()
254 debug("cs2_config = 0x%08x\n",ddr->cs_config[2]); in spd_sdram()
257 ddr->csbnds[3].csbnds = ( (banksize(spd.row_dens) >> 8) in spd_sdram()
259 ddr->cs_config[3] = ( 1<<31 in spd_sdram()
265 debug("cs3_bnds = 0x%08x\n",ddr->csbnds[3].csbnds); in spd_sdram()
266 debug("cs3_config = 0x%08x\n",ddr->cs_config[3]); in spd_sdram()
432 ddr->debug_reg = 0x201c0000; /* CL=2 */ in spd_sdram()
434 ddr->debug_reg = 0x202c0000; /* CL=2.5 */ in spd_sdram()
436 ddr->debug_reg = 0x202c0000; /* CL=3.0 */ in spd_sdram()
440 debug("Errata DDR6 (debug_reg=0x%08x)\n", ddr->debug_reg); in spd_sdram()
467 ddr->timing_cfg_0 = (0 in spd_sdram()
473 debug("DDR: timing_cfg_0 = 0x%08x\n", ddr->timing_cfg_0); in spd_sdram()
530 ddr->timing_cfg_1 = in spd_sdram()
622 ddr->timing_cfg_2 = (0 in spd_sdram()
632 debug("DDR:timing_cfg_1=0x%08x\n", ddr->timing_cfg_1); in spd_sdram()
633 debug("DDR:timing_cfg_2=0x%08x\n", ddr->timing_cfg_2); in spd_sdram()
659 ddr->sdram_mode = 0x50 | burstlen; /* CL=1.5 */ in spd_sdram()
662 ddr->sdram_mode = 0x20 | burstlen; /* CL=2.0 */ in spd_sdram()
665 ddr->sdram_mode = 0x60 | burstlen; /* CL=2.5 */ in spd_sdram()
668 ddr->sdram_mode = 0x30 | burstlen; /* CL=3.0 */ in spd_sdram()
685 ddr->sdram_mode = in spd_sdram()
698 debug("DDR:sdram_mode=0x%08x\n", ddr->sdram_mode); in spd_sdram()
703 ddr->sdram_mode2 = 0; in spd_sdram()
704 debug("DDR: sdram_mode2 = 0x%08x\n", ddr->sdram_mode2); in spd_sdram()
740 ddr->sdram_interval = ((refresh_clk & 0x3fff) << 16) | 0x100; in spd_sdram()
741 debug("DDR:sdram_interval=0x%08x\n", ddr->sdram_interval); in spd_sdram()
753 ddr->sdram_cfg2 = (0 in spd_sdram()
759 debug("DDR: sdram_cfg2 = 0x%08x\n", ddr->sdram_cfg2); in spd_sdram()
763 ddr->sdram_clk_cntl = CONFIG_SYS_DDR_SDRAM_CLK_CNTL; in spd_sdram()
765 debug("DDR:sdram_clk_cntl=0x%08x\n", ddr->sdram_clk_cntl); in spd_sdram()
816 ddr->err_disable = ~ECC_ERROR_ENABLE; in spd_sdram()
819 ddr->err_sbe = (255 << ECC_ERROR_MAN_SBET_SHIFT) | in spd_sdram()
823 debug("DDR:err_disable=0x%08x\n", ddr->err_disable); in spd_sdram()
824 debug("DDR:err_sbe=0x%08x\n", ddr->err_sbe); in spd_sdram()
835 ddr->sdram_cfg = sdram_cfg; in spd_sdram()
839 debug("DDR:sdram_cfg=0x%08x\n", ddr->sdram_cfg); in spd_sdram()
880 volatile ddr83xx_t *ddr= &immap->ddr; in ddr_enable_ecc() local
909 if ((ddr->err_detect & ECC_ERROR_DETECT_MME) == ECC_ERROR_DETECT_MME) in ddr_enable_ecc()
910 ddr->err_detect |= ECC_ERROR_DETECT_MME; in ddr_enable_ecc()
911 if ((ddr->err_detect & ECC_ERROR_DETECT_MBE) == ECC_ERROR_DETECT_MBE) in ddr_enable_ecc()
912 ddr->err_detect |= ECC_ERROR_DETECT_MBE; in ddr_enable_ecc()
913 if ((ddr->err_detect & ECC_ERROR_DETECT_SBE) == ECC_ERROR_DETECT_SBE) in ddr_enable_ecc()
914 ddr->err_detect |= ECC_ERROR_DETECT_SBE; in ddr_enable_ecc()
915 if ((ddr->err_detect & ECC_ERROR_DETECT_MSE) == ECC_ERROR_DETECT_MSE) in ddr_enable_ecc()
916 ddr->err_detect |= ECC_ERROR_DETECT_MSE; in ddr_enable_ecc()
919 ddr->err_int_en &= ECC_ERR_INT_DISABLE; in ddr_enable_ecc()
922 ddr->err_disable &= ECC_ERROR_ENABLE; in ddr_enable_ecc()