mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] Revert "mtd: nand: make interleaved placement optional"
@ 2024-10-30 11:54 Alexander Shiyan
  2024-10-30 16:22 ` Ahmad Fatoum
  0 siblings, 1 reply; 4+ messages in thread
From: Alexander Shiyan @ 2024-10-30 11:54 UTC (permalink / raw)
  To: barebox; +Cc: Alexander Shiyan

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.

Signed-off-by: Alexander Shiyan <eagle.alexander923@gmail.com>
---
 drivers/mtd/nand/raw/Kconfig     | 4 ----
 drivers/mtd/nand/raw/nand_base.c | 4 ----
 2 files changed, 8 deletions(-)

diff --git a/drivers/mtd/nand/raw/Kconfig b/drivers/mtd/nand/raw/Kconfig
index b6c6e62731..e9d1b83706 100644
--- a/drivers/mtd/nand/raw/Kconfig
+++ b/drivers/mtd/nand/raw/Kconfig
@@ -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
diff --git a/drivers/mtd/nand/raw/nand_base.c b/drivers/mtd/nand/raw/nand_base.c
index b6bef46499..9769725026 100644
--- a/drivers/mtd/nand/raw/nand_base.c
+++ b/drivers/mtd/nand/raw/nand_base.c
@@ -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 ||
-- 
2.38.2




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Revert "mtd: nand: make interleaved placement optional"
  2024-10-30 11:54 [PATCH] Revert "mtd: nand: make interleaved placement optional" Alexander Shiyan
@ 2024-10-30 16:22 ` Ahmad Fatoum
  2024-10-30 17:50   ` Alexander Shiyan
  0 siblings, 1 reply; 4+ messages in thread
From: Ahmad Fatoum @ 2024-10-30 16:22 UTC (permalink / raw)
  To: Alexander Shiyan, barebox

Hello Alexander,

On 30.10.24 12:54, Alexander Shiyan wrote:
> 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.
> 
> Signed-off-by: Alexander Shiyan <eagle.alexander923@gmail.com>
> ---
>  drivers/mtd/nand/raw/Kconfig     | 4 ----
>  drivers/mtd/nand/raw/nand_base.c | 4 ----
>  2 files changed, 8 deletions(-)
> 
> diff --git a/drivers/mtd/nand/raw/Kconfig b/drivers/mtd/nand/raw/Kconfig
> index b6c6e62731..e9d1b83706 100644
> --- a/drivers/mtd/nand/raw/Kconfig
> +++ b/drivers/mtd/nand/raw/Kconfig
> @@ -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
> diff --git a/drivers/mtd/nand/raw/nand_base.c b/drivers/mtd/nand/raw/nand_base.c
> index b6bef46499..9769725026 100644
> --- a/drivers/mtd/nand/raw/nand_base.c
> +++ b/drivers/mtd/nand/raw/nand_base.c
> @@ -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

>  		if ((!ecc->calculate || !ecc->correct || !ecc->hwctl) &&
>  		    (!ecc->read_page ||
>  		     ecc->read_page == nand_read_page_hwecc ||


-- 
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 |



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Revert "mtd: nand: make interleaved placement optional"
  2024-10-30 16:22 ` Ahmad Fatoum
@ 2024-10-30 17:50   ` Alexander Shiyan
  2024-10-31  7:51     ` Ahmad Fatoum
  0 siblings, 1 reply; 4+ messages in thread
From: Alexander Shiyan @ 2024-10-30 17:50 UTC (permalink / raw)
  To: Ahmad Fatoum; +Cc: barebox

Hello.

> > 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.
...
> 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!



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Revert "mtd: nand: make interleaved placement optional"
  2024-10-30 17:50   ` Alexander Shiyan
@ 2024-10-31  7:51     ` Ahmad Fatoum
  0 siblings, 0 replies; 4+ messages in thread
From: Ahmad Fatoum @ 2024-10-31  7:51 UTC (permalink / raw)
  To: Alexander Shiyan; +Cc: barebox

Hi,

On 30.10.24 18:50, Alexander Shiyan wrote:
> Hello.
> 
>>> 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.
> ...
>> 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

> 
> Thanks!
> 


-- 
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 |



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-10-31  7:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-10-30 11:54 [PATCH] Revert "mtd: nand: make interleaved placement optional" Alexander Shiyan
2024-10-30 16:22 ` Ahmad Fatoum
2024-10-30 17:50   ` Alexander Shiyan
2024-10-31  7:51     ` Ahmad Fatoum

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox