Revert "mtd: nand: make interleaved placement optional"
Subsystems (2)
PATCH 1/1 Revert "mtd: nand: make interleaved placement optional"
This reverts commit d1fe68f1b010b83ddd3559ffbfcb70dca68b2563 and ec3b8c646bdc8c2ea0a78923ccb745012eabc097 (as a fixup).
The message "CONFIG_NAND_NEED_ECC_PLACEMENT_INTERLEAVED is disabled" is always issued, regardless of the MTD ECC layout used, since it is executed through "fallthrough" from the previous case statement.
Additionally, if !IS_ENABLED(CONFIG_NAND_NEED_ECC_PLACEMENT_INTERLEAVED) is triggered, the patch calls break, which disables the additional checks.
--- drivers/mtd/nand/raw/Kconfig | 4 ---- drivers/mtd/nand/raw/nand_base.c | 4 ---- 2 files changed, 8 deletions(-)
drivers/mtd/nand/raw/Kconfig +0 -4
@@ -35,9 +35,6 @@ config NAND_ALLOW_ERASE_BAD config NAND_NEED_EXEC_OP bool -config NAND_NEED_ECC_PLACEMENT_INTERLEAVED - bool - comment "Raw/parallel NAND flash controllers" config NAND_IMX
@@ -159,7 +156,6 @@ config MTD_NAND_DENALI tristate "Support Denali NAND controller" depends on HAS_DMA select NAND_NEED_EXEC_OP - select NAND_NEED_ECC_PLACEMENT_INTERLEAVED help Enable support for the Denali NAND controller. This should be combined with either the PCI or platform drivers to provide device
drivers/mtd/nand/raw/nand_base.c +0 -4
@@ -5671,10 +5671,6 @@ static int nand_set_ecc_on_host_ops(struct nand_chip *chip)fallthrough ;case NAND_ECC_PLACEMENT_INTERLEAVED : -if (!IS_ENABLED (CONFIG_NAND_NEED_ECC_PLACEMENT_INTERLEAVED )) { -WARN (1 ,"CONFIG_NAND_NEED_ECC_PLACEMENT_INTERLEAVED is disabled\n" ); -break ; - } if ((!ecc->calculate || !ecc->correct || !ecc->hwctl) && (!ecc->read_page || ecc->read_page == nand_read_page_hwecc ||
Signature · 1 line
2.38.2
Hello Alexander,
Quoted 43 lines · Alexander Shiyan
This reverts commit
d1fe68f1b010b83ddd3559ffbfcb70dca68b2563andec3b8c646bdc8c2ea0a78923ccb745012eabc097(as a fixup).The message "
CONFIG_NAND_NEED_ECC_PLACEMENT_INTERLEAVEDis disabled" is always issued, regardless of the MTD ECC layout used, since it is executed through "fallthrough" from the previous case statement.Additionally, if !IS_ENABLED(CONFIG_NAND_NEED_ECC_PLACEMENT_INTERLEAVED) is triggered, the patch calls break, which disables the additional checks.
Signed-off-by Alexander Shiyan <[email protected]>--- drivers/mtd/nand/raw/Kconfig | 4 ---- drivers/mtd/nand/raw/nand_base.c | 4 ---- 2 files changed, 8 deletions(-)drivers/mtd/nand/raw/Kconfig +0
-4@@ -35,9 +35,6 @@ config NAND_ALLOW_ERASE_BAD config NAND_NEED_EXEC_OP bool -config NAND_NEED_ECC_PLACEMENT_INTERLEAVED - bool - comment "Raw/parallel NAND flash controllers" config NAND_IMX@@ -159,7 +156,6 @@ config MTD_NAND_DENALI tristate "Support Denali NAND controller" depends on HAS_DMA select NAND_NEED_EXEC_OP - select NAND_NEED_ECC_PLACEMENT_INTERLEAVED help Enable support for the Denali NAND controller. This should be combined with either the PCI or platform drivers to provide devicedrivers/mtd/nand/raw/nand_base.c +0
-0
drivers/mtd/nand/raw/nand_base.c static int nand_set_ecc_on_host_ops(struct nand_chip *chip) · line 5677
Quoted 7 lines
drivers/mtd/nand/raw/nand_base.c +0
-4@@ -5671,10 +5671,6 @@ static int nand_set_ecc_on_host_ops(struct nand_chip *chip) fallthrough;case NAND_ECC_PLACEMENT_INTERLEAVED : -if (!IS_ENABLED (CONFIG_NAND_NEED_ECC_PLACEMENT_INTERLEAVED )) { -WARN (1 ,"CONFIG_NAND_NEED_ECC_PLACEMENT_INTERLEAVED is disabled\n" ); -break ; - }
These config options were added to control barebox size. We need something here, so size conscious users can opt out.
Cheers,
Ahmad
Quoted 3 lines
drivers/mtd/nand/raw/nand_base.c +0
-0if ((!ecc->calculate || !ecc->correct || !ecc->hwctl) && (!ecc->read_page || ecc->read_page == nand_read_page_hwecc ||
Signature · 4 lines
Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
Hello.
Quoted 9 lines
Quoted 9 lines
This reverts commit
d1fe68f1b010b83ddd3559ffbfcb70dca68b2563andec3b8c646bdc8c2ea0a78923ccb745012eabc097(as a fixup).The message "
CONFIG_NAND_NEED_ECC_PLACEMENT_INTERLEAVEDis disabled" is always issued, regardless of the MTD ECC layout used, since it is executed through "fallthrough" from the previous case statement.Additionally, if !IS_ENABLED(CONFIG_NAND_NEED_ECC_PLACEMENT_INTERLEAVED) is triggered, the patch calls break, which disables the additional checks.
...
Quoted 2 lines
These config options were added to control barebox size. We need something here, so size conscious users can opt out.
Well, I hope you understood from the description that it was not done entirely correctly.
Thanks!
Hi,
Quoted 9 lines · Alexander Shiyan
Hello.
Quoted 7 lines
Quoted 7 lines
This reverts commit
d1fe68f1b010b83ddd3559ffbfcb70dca68b2563andec3b8c646bdc8c2ea0a78923ccb745012eabc097(as a fixup).The message "
CONFIG_NAND_NEED_ECC_PLACEMENT_INTERLEAVEDis disabled" is always issued, regardless of the MTD ECC layout used, since it is executed through "fallthrough" from the previous case statement.
Quoted 8 lines
Quoted 2 lines
Quoted 2 lines
Additionally, if !IS_ENABLED(CONFIG_NAND_NEED_ECC_PLACEMENT_INTERLEAVED) is triggered, the patch calls break, which disables the additional checks.
...
Quoted 2 lines
These config options were added to control barebox size. We need something here, so size conscious users can opt out.
Well, I hope you understood from the description that it was not done entirely correctly.
Yes, but I think there should be a better way than doing a revert.
Cheers,
Ahmad
Quoted 3 lines
Thanks!
Signature · 4 lines
Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |