1
0
mirror of https://xff.cz/git/u-boot/ synced 2026-01-06 04:19:17 +01:00
Files
u-boot-megous/include/linux
Masahiro Yamada 470c29d1c2 mtd: nand: add generic helpers to check, match, maximize ECC settings
Driver are responsible for setting up ECC parameters correctly.
Those include:
  - Check if ECC parameters specified (usually by DT) are valid
  - Meet the chip's ECC requirement
  - Maximize ECC strength if NAND_ECC_MAXIMIZE flag is set

The logic can be generalized by factoring out common code.

This commit adds 3 helpers to the NAND framework:
nand_check_ecc_caps - Check if preset step_size and strength are valid
nand_match_ecc_req - Match the chip's requirement
nand_maximize_ecc - Maximize the ECC strength

To use the helpers above, a driver needs to provide:
  - Data array of supported ECC step size and strength
  - A hook that calculates ECC bytes from the combination of
    step_size and strength.

By using those helpers, code duplication among drivers will be
reduced.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>

[Linux commit: 2c8f8afa7f92acb07641bf95b940d384ed1d0294]
2017-11-29 00:28:59 +09:00
..
2016-01-19 08:31:21 -05:00
2016-04-11 20:48:26 -04:00
2016-01-19 08:31:21 -05:00
2017-07-06 16:17:19 -04:00
2016-01-19 08:31:21 -05:00
2016-02-06 12:00:59 +01:00
2017-04-13 09:41:10 -04:00
2017-08-14 12:47:32 -05:00
2017-07-06 16:17:19 -04:00
2017-06-01 07:03:12 -06:00
2017-10-16 09:42:51 -04:00