mirror of
https://git.codelinaro.org/clo/qsdk/oss/boot/u-boot-2016.git
synced 2026-03-14 21:10:27 +01:00
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]
|
||
|---|---|---|
| .. | ||
| byteorder | ||
| mtd | ||
| unaligned | ||
| usb | ||
| apm_bios.h | ||
| arm-smccc.h | ||
| bch.h | ||
| bitfield.h | ||
| bitops.h | ||
| bitrev.h | ||
| bug.h | ||
| build_bug.h | ||
| compat.h | ||
| compiler-clang.h | ||
| compiler-gcc.h | ||
| compiler-intel.h | ||
| compiler.h | ||
| crc7.h | ||
| crc8.h | ||
| crc32.h | ||
| ctype.h | ||
| delay.h | ||
| dma-direction.h | ||
| drm_dp_helper.h | ||
| edd.h | ||
| err.h | ||
| errno.h | ||
| ethtool.h | ||
| fb.h | ||
| immap_qe.h | ||
| input.h | ||
| io.h | ||
| ioctl.h | ||
| iopoll.h | ||
| ioport.h | ||
| kbuild.h | ||
| kconfig.h | ||
| kernel.h | ||
| libfdt.h | ||
| libfdt_env.h | ||
| linkage.h | ||
| linux_string.h | ||
| list.h | ||
| list_sort.h | ||
| log2.h | ||
| lzo.h | ||
| math64.h | ||
| mbus.h | ||
| mc146818rtc.h | ||
| mdio.h | ||
| mii.h | ||
| netdevice.h | ||
| poison.h | ||
| posix_types.h | ||
| printk.h | ||
| psci.h | ||
| rbtree.h | ||
| rbtree_augmented.h | ||
| screen_info.h | ||
| serial_reg.h | ||
| sizes.h | ||
| stat.h | ||
| stddef.h | ||
| string.h | ||
| stringify.h | ||
| time.h | ||
| typecheck.h | ||
| types.h | ||