Lines Matching +full:sync +full:- +full:write
1 // SPDX-License-Identifier: GPL-2.0+
26 __raw_writel(0, &ddr->capture_address); in ecc_clear()
27 __raw_writel(0, &ddr->capture_data_hi); in ecc_clear()
28 __raw_writel(0, &ddr->capture_data_lo); in ecc_clear()
29 __raw_writel(0, &ddr->capture_ecc); in ecc_clear()
30 __raw_writel(0, &ddr->capture_attributes); in ecc_clear()
33 out_be32(&ddr->err_sbe, 1 << ECC_ERROR_MAN_SBET_SHIFT); in ecc_clear()
36 out_be32(&ddr->err_detect, ECC_ERROR_DETECT_MME |\ in ecc_clear()
50 ddr83xx_t *ddr = &((immap_t *)CONFIG_SYS_IMMR)->ddr; in ecc_post_test()
57 /* After injecting error, re-initialize the memory with the value */ in ecc_post_test()
62 if (__raw_readl(&ddr->err_disable) & ECC_ERROR_ENABLE) { in ecc_post_test()
82 setbits_be32(&ddr->ecc_err_inject, ECC_ERR_INJECT_EIEN); in ecc_post_test()
83 sync(); in ecc_post_test()
88 __raw_writel(1 << errbit, &ddr->data_err_inject_lo); in ecc_post_test()
89 __raw_writel(0, &ddr->data_err_inject_hi); in ecc_post_test()
91 __raw_writel(0, &ddr->data_err_inject_lo); in ecc_post_test()
92 __raw_writel(1<<(errbit-32), &ddr->data_err_inject_hi); in ecc_post_test()
94 sync(); in ecc_post_test()
97 /* Write memory location injecting SBE */ in ecc_post_test()
99 sync(); in ecc_post_test()
102 clrbits_be32(&ddr->ecc_err_inject, ECC_ERR_INJECT_EIEN); in ecc_post_test()
103 sync(); in ecc_post_test()
108 sync(); in ecc_post_test()
110 if (!(__raw_readl(&ddr->err_detect) & ECC_ERROR_DETECT_SBE) || in ecc_post_test()
111 (__raw_readl(&ddr->data_err_inject_hi) != in ecc_post_test()
112 (__raw_readl(&ddr->capture_data_hi) ^ pattern[0])) || in ecc_post_test()
113 (__raw_readl(&ddr->data_err_inject_lo) != in ecc_post_test()
114 (__raw_readl(&ddr->capture_data_lo) ^ pattern[1]))) { in ecc_post_test()
117 "SBE injection mask %08x-%08x, wrote " in ecc_post_test()
118 "%08x-%08x, read %08x-%08x\n", addr, in ecc_post_test()
119 ddr->data_err_inject_hi, in ecc_post_test()
120 ddr->data_err_inject_lo, in ecc_post_test()
124 printf("ERR_DETECT Reg: %08x\n", ddr->err_detect); in ecc_post_test()
125 printf("ECC CAPTURE_DATA Reg: %08x-%08x\n", in ecc_post_test()
126 ddr->capture_data_hi, ddr->capture_data_lo); in ecc_post_test()
131 /* Re-initialize the ECC memory */ in ecc_post_test()
133 sync(); in ecc_post_test()