mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-27 09:31:32 +00:00
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] |
||
---|---|---|
.. | ||
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 |