Files
u-boot/include
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
..
2017-07-03 17:35:28 -04:00
2016-12-03 13:21:21 -05:00
2017-02-08 15:56:28 -05:00
2017-06-05 11:02:29 -04:00
2017-09-16 14:57:44 +08:00
2017-10-02 21:52:18 -04:00
2017-10-10 10:01:27 +02:00
2017-09-15 05:27:47 -06:00
2017-10-16 09:42:51 -04:00
2016-10-19 09:01:51 +02:00
2017-05-11 22:21:27 -04:00
2017-07-28 23:34:39 +02:00
2017-04-13 09:41:10 -04:00
2017-08-17 16:59:55 +09:00
2017-05-15 20:32:12 +02:00
2017-09-20 11:00:57 +02:00
2016-11-14 23:24:03 +01:00
2017-08-16 08:30:24 -04:00
2017-10-02 21:52:18 -04:00
2017-11-07 10:26:27 +01:00
2016-12-08 10:36:22 -06:00
2017-09-03 15:30:35 -04:00
2017-07-23 09:24:47 -04:00
2017-06-12 08:37:55 -04:00
2017-04-14 19:38:57 -06:00
2017-07-11 22:41:54 -04:00
2017-07-28 12:02:47 -06:00
2017-09-20 10:20:00 +02:00
2017-06-12 08:37:55 -04:00
2017-07-03 17:35:28 -04:00
2017-07-28 23:34:07 +02:00
2017-04-10 10:02:03 +08:00
2017-08-17 16:59:55 +09:00
2017-08-23 10:41:58 +02:00
2017-08-16 08:22:18 -04:00
2017-06-01 07:03:16 -06:00
2017-04-12 13:28:27 -04:00
2017-10-01 16:32:51 +02:00
2017-08-24 11:00:47 +08:00
2016-10-23 18:33:48 -04:00
2017-10-04 12:00:19 -04:00