Files
u-boot/include
Masahiro Yamada a01549ba40 mtd: nand: add a shorthand to generate nand_ecc_caps structure
struct nand_ecc_caps was designed as flexible as possible to support
multiple stepsizes (like sunxi_nand.c).

So, we need to write multiple arrays even for the simplest case.
I guess many controllers support a single stepsize, so here is a
shorthand macro for the case.

It allows to describe like ...

NAND_ECC_CAPS_SINGLE(denali_pci_ecc_caps, denali_calc_ecc_bytes, 512, 8, 15);

... instead of

static const int denali_pci_ecc_strengths[] = {8, 15};
static const struct nand_ecc_step_info denali_pci_ecc_stepinfo = {
        .stepsize = 512,
        .strengths = denali_pci_ecc_strengths,
        .nstrengths = ARRAY_SIZE(denali_pci_ecc_strengths),
};
static const struct nand_ecc_caps denali_pci_ecc_caps = {
        .stepinfos = &denali_pci_ecc_stepinfo,
        .nstepinfos = 1,
        .calc_ecc_bytes = denali_calc_ecc_bytes,
};

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

[Linux commit: a03c60178c181767ecfb26fb311a88742d228118]
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