linux_dsm_epyc7002/drivers/mtd/nand
Brian Norris 9146cbd52b mtd: jz4780_nand: replace if/else blocks with switch/case
Using switch/case helps make this logic more clear and more robust. With
this structure:

 * it's clear that this driver only support ECC_{HW,SOFT,SOFT_BCH}; and

 * we can sanely handle new ECC unsupported modes (right now, this code
   makes incorrect assumptions about the possible values in the
   nand_ecc_modes_t enum; e.g., what happens with NAND_ECC_HW_OOB_FIRST?)

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Cc: Alex Smith <alex@alex-smith.me.uk>
Reviewed-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Tested-by: Harvey Hunt <harvey.hunt@imgtec.com>
Acked-by: Harvey Hunt <harvey.hunt@imgtec.com>
2016-01-08 09:49:03 -08:00
..
bcm47xxnflash mtd: nand: make use of nand_set/get_controller_data() helpers 2016-01-07 10:23:41 -08:00
brcmnand mtd: nand: make use of nand_set/get_controller_data() helpers 2016-01-07 10:23:41 -08:00
gpmi-nand mtd: nand: make use of nand_set/get_controller_data() helpers 2016-01-07 10:23:41 -08:00
ams-delta.c mtd: nand: make use of nand_set/get_controller_data() helpers 2016-01-07 10:23:41 -08:00
atmel_nand_ecc.h
atmel_nand_nfc.h
atmel_nand.c mtd: nand: make use of nand_set/get_controller_data() helpers 2016-01-07 10:23:41 -08:00
au1550nd.c mtd: nand: remove useless mtd->priv = chip assignments 2015-12-18 13:21:40 -08:00
bf5xx_nand.c mtd: nand: make use of nand_set/get_controller_data() helpers 2016-01-07 10:23:41 -08:00
cafe_nand.c mtd: nand: make use of nand_set/get_controller_data() helpers 2016-01-07 10:23:41 -08:00
cmx270_nand.c mtd: nand: remove useless mtd->priv = chip assignments 2015-12-18 13:21:40 -08:00
cs553x_nand.c mtd: nand: remove useless mtd->priv = chip assignments 2015-12-18 13:21:40 -08:00
davinci_nand.c mtd: nand: davinci: remove custom 'erased check' implementation 2016-01-06 18:53:46 -08:00
denali_dt.c
denali_pci.c mtd: denali_pci: switch to dev_err() 2015-08-18 17:21:37 -07:00
denali.c mtd: nand: remove useless mtd->priv = chip assignments 2015-12-18 13:21:40 -08:00
denali.h mtd: nand: denali: use the mtd instance embedded in struct nand_chip 2015-12-18 13:13:50 -08:00
diskonchip.c mtd: nand: make use of nand_set/get_controller_data() helpers 2016-01-07 10:23:41 -08:00
docg4.c mtd: nand: make use of nand_set/get_controller_data() helpers 2016-01-07 10:23:41 -08:00
fsl_elbc_nand.c mtd: nand: make use of nand_set/get_controller_data() helpers 2016-01-07 10:23:41 -08:00
fsl_ifc_nand.c mtd: nand: make use of nand_set/get_controller_data() helpers 2016-01-07 10:23:41 -08:00
fsl_upm.c mtd: nand: remove useless mtd->priv = chip assignments 2015-12-18 13:21:40 -08:00
fsmc_nand.c mtd: nand: make use of nand_set/get_controller_data() helpers 2016-01-07 10:23:41 -08:00
gpio.c mtd: nand: remove useless mtd->priv = chip assignments 2015-12-18 13:21:40 -08:00
hisi504_nand.c mtd: nand: make use of nand_set/get_controller_data() helpers 2016-01-07 10:23:41 -08:00
jz4740_nand.c mtd: nand: jz4740: remove custom 'erased check' implementation 2016-01-06 18:54:08 -08:00
jz4780_bch.c mtd: nand: jz4780: Update ecc correction error codes 2016-01-08 09:44:30 -08:00
jz4780_bch.h mtd: nand: jz4780: driver for NAND devices on JZ4780 SoCs 2016-01-07 09:35:11 -08:00
jz4780_nand.c mtd: jz4780_nand: replace if/else blocks with switch/case 2016-01-08 09:49:03 -08:00
Kconfig mtd: nand: jz4780: driver for NAND devices on JZ4780 SoCs 2016-01-07 09:35:11 -08:00
lpc32xx_mlc.c mtd: nand: make use of nand_set/get_controller_data() helpers 2016-01-07 10:23:41 -08:00
lpc32xx_slc.c mtd: nand: make use of nand_set/get_controller_data() helpers 2016-01-07 10:23:41 -08:00
Makefile mtd: nand: jz4780: driver for NAND devices on JZ4780 SoCs 2016-01-07 09:35:11 -08:00
mpc5121_nfc.c mtd: nand: make use of nand_set/get_controller_data() helpers 2016-01-07 10:23:41 -08:00
mxc_nand.c mtd: nand: make use of nand_set/get_controller_data() helpers 2016-01-07 10:23:41 -08:00
nand_base.c mtd: nand: use nand_check_erased_ecc_chunk in default ECC read functions 2016-01-06 18:48:20 -08:00
nand_bbt.c mtd: nand: make use of mtd_to_nand() in NAND core code 2015-12-08 10:46:14 -08:00
nand_bch.c mtd: nand: return consistent error codes in ecc.correct() implementations 2016-01-06 18:45:46 -08:00
nand_ecc.c mtd: nand: return consistent error codes in ecc.correct() implementations 2016-01-06 18:45:46 -08:00
nand_ids.c mtd: nand: add Toshiba TC58NVG0S3E to nand_ids table 2015-08-25 12:24:02 -07:00
nand_timings.c
nandsim.c mtd: nandsim: use nand_get_controller_data() 2016-01-07 12:25:58 -08:00
ndfc.c mtd: nand: make use of nand_set/get_controller_data() helpers 2016-01-07 10:23:41 -08:00
nuc900_nand.c mtd: nand: remove useless mtd->priv = chip assignments 2015-12-18 13:21:40 -08:00
omap2.c mtd: nand: return consistent error codes in ecc.correct() implementations 2016-01-06 18:45:46 -08:00
omap_elm.c mtd: omap_elm: print interrupt resource using %pr 2015-12-18 10:16:17 -08:00
orion_nand.c mtd: nand: make use of nand_set/get_controller_data() helpers 2016-01-07 10:23:41 -08:00
pasemi_nand.c mtd: nand: remove useless mtd->priv = chip assignments 2015-12-18 13:21:40 -08:00
plat_nand.c mtd: nand: remove unused and buggy get_platform_nandchip() helper function 2015-12-18 14:24:36 -08:00
pxa3xx_nand.c mtd: nand: make use of nand_set/get_controller_data() helpers 2016-01-07 10:23:41 -08:00
r852.c mtd: nand: make use of nand_set/get_controller_data() helpers 2016-01-07 10:23:41 -08:00
r852.h mtd: nand: r852: use the mtd instance embedded in struct nand_chip 2015-12-18 10:54:41 -08:00
s3c2410.c mtd: nand: make use of nand_set/get_controller_data() helpers 2016-01-07 10:23:41 -08:00
sh_flctl.c mtd: sh_flctl: pass FIFO as physical address 2015-12-18 18:27:13 -08:00
sharpsl.c mtd: nand: remove useless mtd->priv = chip assignments 2015-12-18 13:21:40 -08:00
sm_common.c mtd: nand: make use of mtd_to_nand() in NAND drivers 2015-12-08 12:24:36 -08:00
sm_common.h
socrates_nand.c mtd: nand: make use of nand_set/get_controller_data() helpers 2016-01-07 10:23:41 -08:00
sunxi_nand.c mtd: nand: remove useless mtd->priv = chip assignments 2015-12-18 13:21:40 -08:00
tmio_nand.c mtd: nand: remove useless mtd->priv = chip assignments 2015-12-18 13:21:40 -08:00
txx9ndfmc.c mtd: nand: make use of nand_set/get_controller_data() helpers 2016-01-07 10:23:41 -08:00
vf610_nfc.c mtd: nand: remove useless mtd->priv = chip assignments 2015-12-18 13:21:40 -08:00
xway_nand.c mtd: nand: make use of mtd_to_nand() in NAND drivers 2015-12-08 12:24:36 -08:00