Lines Matching full:ecc

3  * Support for Realtek hardware ECC engine in RTL93xx SoCs
14 * The Realtek ECC engine has two operation modes.
16 * - BCH6 : Generate 10 ECC bytes from 512 data bytes plus 6 free bytes
17 * - BCH12 : Generate 20 ECC bytes from 512 data bytes plus 6 free bytes
20 * are only two known devices in the wild that have NAND flash and make use of this ECC engine
25 * This driver aligns with kernel ECC naming conventions. Neverthless a short notice on the
28 * - BBI : Bad block indicator. The first two bytes of OOB. Protected by ECC!
29 * - tag : 6 User/free bytes. First tag "contains" 2 bytes BBI. Protected by ECC!
30 * - syndrome : ECC/parity bytes
37 * | data | data | data | data | BBI | free | free | free | free | ECC | ECC | ECC | ECC |
101 return nand->ecc.ctx.priv; in nand_to_ctx()
106 struct nand_ecc_engine *eng = nand->ecc.engine; in nand_to_rtlc()
145 .ecc = rtl_ecc_ooblayout_ecc,
168 * The ECC engine needs 6-8 us to encode/decode a BCH6 syndrome for 512 bytes of data in rtl_ecc_wait_for_engine()
250 dev_dbg(rtlc->dev, "ECC calculation failed\n"); in rtl_ecc_prepare_io_req()
280 /* ECC totally fails for bitflips in erased blocks */ in rtl_ecc_finish_io_req()
301 dev_dbg(rtlc->dev, "ECC correction failed\n"); in rtl_ecc_finish_io_req()
311 struct device *dev = nand->ecc.engine->dev; in rtl_ecc_check_support()
320 if (nand->ecc.user_conf.algo != NAND_ECC_ALGO_BCH || in rtl_ecc_check_support()
321 nand->ecc.user_conf.strength != RTL_ECC_ALLOWED_STRENGTH || in rtl_ecc_check_support()
322 nand->ecc.user_conf.placement != NAND_ECC_PLACEMENT_OOB || in rtl_ecc_check_support()
323 nand->ecc.user_conf.step_size != RTL_ECC_BLOCK_SIZE) { in rtl_ecc_check_support()
334 struct nand_ecc_props *conf = &nand->ecc.ctx.conf; in rtl_ecc_init_ctx()
337 int strength = nand->ecc.user_conf.strength; in rtl_ecc_init_ctx()
338 struct device *dev = nand->ecc.engine->dev; in rtl_ecc_init_ctx()
350 nand->ecc.ctx.priv = ctx; in rtl_ecc_init_ctx()
447 .compatible = "realtek,rtl9301-ecc",
454 .name = "rtl-nand-ecc-engine",
464 MODULE_DESCRIPTION("Realtek NAND hardware ECC controller");