u-boot-brain/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
..
byteorder
mtd mtd: nand: add a shorthand to generate nand_ecc_caps structure 2017-11-29 00:28:59 +09:00
unaligned
usb armv8: ls1088ardb: Enable USB command RDB qspi-boot 2017-10-27 08:47:06 -07:00
apm_bios.h
arm-smccc.h ARM: adjust arm-smccc code for use in U-Boot 2017-04-18 10:29:17 -04:00
bch.h Add more SPDX-License-Identifier tags 2016-01-19 08:31:21 -05:00
bitfield.h linux/bitfield.h: import <linux/bitfield.h> from Linux 4.13 2017-10-04 12:00:21 -04:00
bitops.h bitops: collect BIT macros to include/linux/bitops.h 2017-11-29 00:28:57 +09:00
bitrev.h
bug.h bug.h: move runtime BUG/WARN macros into <linux/bug.h> 2017-10-04 12:00:20 -04:00
build_bug.h bug.h: sync BUILD_BUG stuff with Linux 4.13 2017-10-04 12:00:19 -04:00
compat.h dm: define dev_*() log functions in DM header 2017-10-04 12:00:20 -04:00
compiler-clang.h compiler*.h: sync include/linux/compiler*.h with Linux 3.16 2014-09-16 12:23:57 -04:00
compiler-gcc.h compiler*.h: sync include/linux/compiler*.h with Linux 4.5-rc6 2016-02-29 11:43:24 -05:00
compiler-intel.h compiler*.h: sync include/linux/compiler*.h with Linux 4.5-rc6 2016-02-29 11:43:24 -05:00
compiler.h bug.h: sync BUILD_BUG stuff with Linux 4.13 2017-10-04 12:00:19 -04:00
crc7.h
crc8.h lib/crc8: Add crc start value 2016-04-11 20:48:26 -04:00
crc32.h
ctype.h
delay.h delay: collect {m, n, u}delay declarations to include/linux/delay.h 2017-01-14 16:46:28 -05:00
dma-direction.h dma: import linux/dma-direction.h to consolidate enum dma_data_direction 2017-09-12 18:02:23 -04:00
drm_dp_helper.h tegra124: video: Add full link training for eDP 2015-05-13 09:24:12 -07:00
edd.h Add more SPDX-License-Identifier tags 2016-01-19 08:31:21 -05:00
err.h sf: Adopt flash table INFO macro from Linux 2016-11-18 13:04:52 +05:30
errno.h errno.h: sync error macros with linux 4.8-rc7 2016-09-23 22:25:43 -04:00
ethtool.h
fb.h avr32: Retire AVR32 for good 2017-07-06 16:17:19 -04:00
immap_qe.h armv7: ls1021a: Drop macro CONFIG_LS102XA 2017-04-17 09:03:30 -07:00
input.h Add more SPDX-License-Identifier tags 2016-01-19 08:31:21 -05:00
io.h linux/io.h: import generic ioread* / iowrite* accessors from Linux 2017-09-12 18:02:23 -04:00
ioctl.h
iopoll.h iopoll: import include/linux/iopoll.h from Linux 4.9 2017-01-14 16:46:30 -05:00
ioport.h
kbuild.h clang: workaround for generated constants 2014-09-09 13:51:54 +02:00
kconfig.h spl: dm: use CONFIG_IS_ENABLED to test for the DM option 2017-08-13 17:12:20 +02:00
kernel.h linux/kernel.h: import DIV_ROUND_{DOWN, UP}_ULL from Linux 2017-10-05 21:31:04 -04:00
libfdt_env.h lib: libfdt: wrap scripts/dtc/libfdt/* where possible 2017-11-17 07:44:13 -05:00
libfdt.h lib: libfdt: wrap scripts/dtc/libfdt/* where possible 2017-11-17 07:44:13 -05:00
linkage.h Use correct spelling of "U-Boot" 2016-02-06 12:00:59 +01:00
linux_string.h
list_sort.h lib, list_sort: add list_sort from linux 3.14 2014-08-25 17:02:33 -04:00
list.h list: Add list_last_entry() to find the last entry 2016-10-11 11:55:33 +08:00
log2.h include: Add log2 header from the kernel 2015-11-05 10:51:53 -05:00
lzo.h lzo: add a function to check the validity of the header 2017-10-05 21:31:04 -04:00
math64.h lib: div64: sync with Linux 2017-04-13 09:41:10 -04:00
mbus.h arm: mvebu: Add common mbus functions to use on Marvell SoCs 2014-10-23 09:59:20 -04:00
mc146818rtc.h
mdio.h
mii.h net: Add mii_resolve_flowctrl_fdx() 2017-08-14 12:47:32 -05:00
netdevice.h
poison.h
posix_types.h
printk.h printk: collect printk stuff into <linux/printk.h> with loglevel support 2017-10-04 10:31:17 -04:00
psci.h sysreset: psci: support system reset in a generic way with PSCI 2017-04-18 10:29:19 -04:00
rbtree_augmented.h lib, rbtree: resync with Linux-3.14 2014-08-25 17:02:33 -04:00
rbtree.h kbuild: force to define __UBOOT__ in all the C sources 2014-09-16 12:23:56 -04:00
screen_info.h
serial_reg.h arm: debug: replace license blocks with SPDX 2014-10-26 22:22:09 +01:00
sizes.h
stat.h avr32: Retire AVR32 for good 2017-07-06 16:17:19 -04:00
stddef.h
string.h string: Add strcspn() 2017-06-01 07:03:12 -06:00
stringify.h
time.h linux/time.h: Remove dead code 2017-10-16 09:42:51 -04:00
typecheck.h typecheck: import include/linux/typecheck.h from Linux 4.9 2017-01-14 16:46:29 -05:00
types.h linux/types.h: add typedef of uintptr_t 2017-11-17 07:44:13 -05:00