1
0
mirror of https://xff.cz/git/u-boot/ synced 2026-01-04 00:17:10 +01:00
Files
u-boot-megous/include/linux
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
..
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