* [PATCH] dt-bindings: mtd: gpmc: Fix the ECC bytes vs. OOB bytes equation
@ 2021-06-10 14:39 ` Miquel Raynal
0 siblings, 0 replies; 6+ messages in thread
From: Miquel Raynal @ 2021-06-10 14:39 UTC (permalink / raw)
To: Rob Herring, devicetree
Cc: Richard Weinberger, Vignesh Raghavendra, Tudor Ambarus,
linux-mtd, Miquel Raynal, Ryan J . Barnett
"PAGESIZE / 512" is the number of ECC chunks.
"ECC_BYTES" is the number of bytes needed to store a single ECC code.
"2" is the space reserved by the bad block marker.
"2 + (PAGESIZE / 512) * ECC_BYTES" should of course be lower or equal
than the total number of OOB bytes, otherwise it won't fit.
Fix the equation by substituting s/>=/<=/.
Suggested-by: Ryan J. Barnett <ryan.barnett@collins.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
---
Documentation/devicetree/bindings/mtd/gpmc-nand.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/mtd/gpmc-nand.txt b/Documentation/devicetree/bindings/mtd/gpmc-nand.txt
index 44919d48d241..c459f169a904 100644
--- a/Documentation/devicetree/bindings/mtd/gpmc-nand.txt
+++ b/Documentation/devicetree/bindings/mtd/gpmc-nand.txt
@@ -122,7 +122,7 @@ on various other factors also like;
so the device should have enough free bytes available its OOB/Spare
area to accommodate ECC for entire page. In general following expression
helps in determining if given device can accommodate ECC syndrome:
- "2 + (PAGESIZE / 512) * ECC_BYTES" >= OOBSIZE"
+ "2 + (PAGESIZE / 512) * ECC_BYTES" <= OOBSIZE"
where
OOBSIZE number of bytes in OOB/spare area
PAGESIZE number of bytes in main-area of device page
--
2.27.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH] dt-bindings: mtd: gpmc: Fix the ECC bytes vs. OOB bytes equation
@ 2021-06-10 14:39 ` Miquel Raynal
0 siblings, 0 replies; 6+ messages in thread
From: Miquel Raynal @ 2021-06-10 14:39 UTC (permalink / raw)
To: Rob Herring, devicetree
Cc: Richard Weinberger, Vignesh Raghavendra, Tudor Ambarus,
linux-mtd, Miquel Raynal, Ryan J . Barnett
"PAGESIZE / 512" is the number of ECC chunks.
"ECC_BYTES" is the number of bytes needed to store a single ECC code.
"2" is the space reserved by the bad block marker.
"2 + (PAGESIZE / 512) * ECC_BYTES" should of course be lower or equal
than the total number of OOB bytes, otherwise it won't fit.
Fix the equation by substituting s/>=/<=/.
Suggested-by: Ryan J. Barnett <ryan.barnett@collins.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
---
Documentation/devicetree/bindings/mtd/gpmc-nand.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/mtd/gpmc-nand.txt b/Documentation/devicetree/bindings/mtd/gpmc-nand.txt
index 44919d48d241..c459f169a904 100644
--- a/Documentation/devicetree/bindings/mtd/gpmc-nand.txt
+++ b/Documentation/devicetree/bindings/mtd/gpmc-nand.txt
@@ -122,7 +122,7 @@ on various other factors also like;
so the device should have enough free bytes available its OOB/Spare
area to accommodate ECC for entire page. In general following expression
helps in determining if given device can accommodate ECC syndrome:
- "2 + (PAGESIZE / 512) * ECC_BYTES" >= OOBSIZE"
+ "2 + (PAGESIZE / 512) * ECC_BYTES" <= OOBSIZE"
where
OOBSIZE number of bytes in OOB/spare area
PAGESIZE number of bytes in main-area of device page
--
2.27.0
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] dt-bindings: mtd: gpmc: Fix the ECC bytes vs. OOB bytes equation
2021-06-10 14:39 ` Miquel Raynal
@ 2021-06-18 21:19 ` Rob Herring
-1 siblings, 0 replies; 6+ messages in thread
From: Rob Herring @ 2021-06-18 21:19 UTC (permalink / raw)
To: Miquel Raynal
Cc: linux-mtd, Rob Herring, Ryan J . Barnett, Tudor Ambarus,
devicetree, Vignesh Raghavendra, Richard Weinberger
On Thu, 10 Jun 2021 16:39:45 +0200, Miquel Raynal wrote:
> "PAGESIZE / 512" is the number of ECC chunks.
> "ECC_BYTES" is the number of bytes needed to store a single ECC code.
> "2" is the space reserved by the bad block marker.
>
> "2 + (PAGESIZE / 512) * ECC_BYTES" should of course be lower or equal
> than the total number of OOB bytes, otherwise it won't fit.
>
> Fix the equation by substituting s/>=/<=/.
>
> Suggested-by: Ryan J. Barnett <ryan.barnett@collins.com>
> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
> ---
> Documentation/devicetree/bindings/mtd/gpmc-nand.txt | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
Acked-by: Rob Herring <robh@kernel.org>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] dt-bindings: mtd: gpmc: Fix the ECC bytes vs. OOB bytes equation
@ 2021-06-18 21:19 ` Rob Herring
0 siblings, 0 replies; 6+ messages in thread
From: Rob Herring @ 2021-06-18 21:19 UTC (permalink / raw)
To: Miquel Raynal
Cc: linux-mtd, Rob Herring, Ryan J . Barnett, Tudor Ambarus,
devicetree, Vignesh Raghavendra, Richard Weinberger
On Thu, 10 Jun 2021 16:39:45 +0200, Miquel Raynal wrote:
> "PAGESIZE / 512" is the number of ECC chunks.
> "ECC_BYTES" is the number of bytes needed to store a single ECC code.
> "2" is the space reserved by the bad block marker.
>
> "2 + (PAGESIZE / 512) * ECC_BYTES" should of course be lower or equal
> than the total number of OOB bytes, otherwise it won't fit.
>
> Fix the equation by substituting s/>=/<=/.
>
> Suggested-by: Ryan J. Barnett <ryan.barnett@collins.com>
> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
> ---
> Documentation/devicetree/bindings/mtd/gpmc-nand.txt | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
Acked-by: Rob Herring <robh@kernel.org>
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] dt-bindings: mtd: gpmc: Fix the ECC bytes vs. OOB bytes equation
2021-06-10 14:39 ` Miquel Raynal
@ 2021-07-15 23:08 ` Miquel Raynal
-1 siblings, 0 replies; 6+ messages in thread
From: Miquel Raynal @ 2021-07-15 23:08 UTC (permalink / raw)
To: Miquel Raynal, Rob Herring, devicetree
Cc: Richard Weinberger, Vignesh Raghavendra, Tudor Ambarus,
linux-mtd, Ryan J . Barnett
On Thu, 2021-06-10 at 14:39:45 UTC, Miquel Raynal wrote:
> "PAGESIZE / 512" is the number of ECC chunks.
> "ECC_BYTES" is the number of bytes needed to store a single ECC code.
> "2" is the space reserved by the bad block marker.
>
> "2 + (PAGESIZE / 512) * ECC_BYTES" should of course be lower or equal
> than the total number of OOB bytes, otherwise it won't fit.
>
> Fix the equation by substituting s/>=/<=/.
>
> Suggested-by: Ryan J. Barnett <ryan.barnett@collins.com>
> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
> Acked-by: Rob Herring <robh@kernel.org>
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next.
Miquel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] dt-bindings: mtd: gpmc: Fix the ECC bytes vs. OOB bytes equation
@ 2021-07-15 23:08 ` Miquel Raynal
0 siblings, 0 replies; 6+ messages in thread
From: Miquel Raynal @ 2021-07-15 23:08 UTC (permalink / raw)
To: Miquel Raynal, Rob Herring, devicetree
Cc: Richard Weinberger, Vignesh Raghavendra, Tudor Ambarus,
linux-mtd, Ryan J . Barnett
On Thu, 2021-06-10 at 14:39:45 UTC, Miquel Raynal wrote:
> "PAGESIZE / 512" is the number of ECC chunks.
> "ECC_BYTES" is the number of bytes needed to store a single ECC code.
> "2" is the space reserved by the bad block marker.
>
> "2 + (PAGESIZE / 512) * ECC_BYTES" should of course be lower or equal
> than the total number of OOB bytes, otherwise it won't fit.
>
> Fix the equation by substituting s/>=/<=/.
>
> Suggested-by: Ryan J. Barnett <ryan.barnett@collins.com>
> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
> Acked-by: Rob Herring <robh@kernel.org>
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next.
Miquel
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-07-15 23:09 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-10 14:39 [PATCH] dt-bindings: mtd: gpmc: Fix the ECC bytes vs. OOB bytes equation Miquel Raynal
2021-06-10 14:39 ` Miquel Raynal
2021-06-18 21:19 ` Rob Herring
2021-06-18 21:19 ` Rob Herring
2021-07-15 23:08 ` Miquel Raynal
2021-07-15 23:08 ` Miquel Raynal
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.