linux_dsm_epyc7002/include/linux/mtd
Abhishek Sahu 181ace9e1b mtd: rawnand: helper function for setting up ECC configuration
commit 2c8f8afa7f ("mtd: nand: add generic helpers to check,
match, maximize ECC settings") provides generic helpers which
drivers can use for setting up ECC parameters.

Since same board can have different ECC strength nand chips so
following is the logic for setting up ECC strength and ECC step
size, which can be used by most of the drivers.

1. If both ECC step size and ECC strength are already set
   (usually by DT) then just check whether this setting
   is supported by NAND controller.
2. If NAND_ECC_MAXIMIZE is set, then select maximum ECC strength
   supported by NAND controller.
3. Otherwise, try to match the ECC step size and ECC strength closest
   to the chip's requirement. If available OOB size can't fit the chip
   requirement then select maximum ECC strength which can be fit with
   available OOB size.

This patch introduces nand_ecc_choose_conf function which calls the
required helper functions for the above logic. The drivers can use
this single function instead of calling the 3 helper functions
individually.

Signed-off-by: Abhishek Sahu <absahu@codeaurora.org>
Reviewed-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
2018-07-18 09:24:05 +02:00
..
bbm.h mtd: nand: Get rid of comments giving the file path inside the file itself 2018-02-16 10:08:27 +01:00
blktrans.h
cfi_endian.h
cfi.h
concat.h
doc2000.h
flashchip.h mtd: cfi: cmdset_0001: Do not allow read/write to suspend erase block. 2018-04-24 17:41:18 +02:00
ftl.h
gen_probe.h
inftl.h
latch-addr-flash.h
lpc32xx_mlc.h
lpc32xx_slc.h
map.h mtd: Fix comparison in map_word_andequal() 2018-05-14 14:46:20 +02:00
mtd.h mtd: Stop updating erase_info->state and calling mtd_erase_callback() 2018-03-21 09:50:56 +01:00
mtdram.h
nand_bch.h
nand_ecc.h mtd: nand: Get rid of comments giving the file path inside the file itself 2018-02-16 10:08:27 +01:00
nand-gpio.h
nand.h mtd: nand: Pass mode information to nand_page_io_req 2018-06-01 14:53:50 +02:00
ndfc.h mtd: nand: Get rid of comments giving the file path inside the file itself 2018-02-16 10:08:27 +01:00
nftl.h
onenand_regs.h
onenand.h
partitions.h mtd: partitions: add of_match_table parser matching for the "ofpart" type 2018-03-27 09:10:48 +02:00
pfow.h
physmap.h
pismo.h
plat-ram.h
qinfo.h
rawnand.h mtd: rawnand: helper function for setting up ECC configuration 2018-07-18 09:24:05 +02:00
sh_flctl.h
sharpsl.h
spear_smi.h
spi-nor.h mtd: spi-nor: clear Winbond Extended Address Reg on switch to 3-byte addressing. 2018-04-21 10:05:23 +02:00
super.h
ubi.h
xip.h