All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mtd: fsl_elbc_nand: remove unnecessary badblock_pattern
@ 2012-09-26 23:15 Brian Norris
  2012-10-10 14:38 ` Artem Bityutskiy
  0 siblings, 1 reply; 2+ messages in thread
From: Brian Norris @ 2012-09-26 23:15 UTC (permalink / raw)
  To: linux-mtd; +Cc: Scott Wood, Brian Norris, David Woodhouse, Artem Bityutskiy

Since the introduction of nand_create_default_bbt_descr() (now known as
nand_create_badblock_pattern()) in

  commit 58373ff0afff4cc8ac40608872995f4d87eb72ec

nand_chip.badblock_pattern will be dynamically calculated to the same
1-byte-length pattern that is required by fsl_elbc_nand. This custom
badblock_pattern is no longer needed, then, and its removal may help
facilitate further nand_bbt.c/nand_base.c cleanup in the future (one
down, many to go?)

Anyway, with nand_bbt.c fixed, this effectively reverts:

  commit 452db2724351ff3d9416a183a7955e00ab4e6ab4
  [MTD] [NAND] fsl_elbc_nand: fix OOB workability for large page NAND chips

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Cc: Scott Wood <scottwood@freescale.com>
---

Not even compile-tested...

 drivers/mtd/nand/fsl_elbc_nand.c | 15 ---------------
 1 file changed, 15 deletions(-)

diff --git a/drivers/mtd/nand/fsl_elbc_nand.c b/drivers/mtd/nand/fsl_elbc_nand.c
index cc1480a..4c4d3e5 100644
--- a/drivers/mtd/nand/fsl_elbc_nand.c
+++ b/drivers/mtd/nand/fsl_elbc_nand.c
@@ -109,20 +109,6 @@ static struct nand_ecclayout fsl_elbc_oob_lp_eccm1 = {
 };
 
 /*
- * fsl_elbc_oob_lp_eccm* specify that LP NAND's OOB free area starts at offset
- * 1, so we have to adjust bad block pattern. This pattern should be used for
- * x8 chips only. So far hardware does not support x16 chips anyway.
- */
-static u8 scan_ff_pattern[] = { 0xff, };
-
-static struct nand_bbt_descr largepage_memorybased = {
-	.options = 0,
-	.offs = 0,
-	.len = 1,
-	.pattern = scan_ff_pattern,
-};
-
-/*
  * ELBC may use HW ECC, so that OOB offsets, that NAND core uses for bbt,
  * interfere with ECC positions, that's why we implement our own descriptors.
  * OOB {11, 5}, works for both SP and LP chips, with ECCM = 1 and ECCM = 0.
@@ -699,7 +685,6 @@ static int fsl_elbc_chip_init_tail(struct mtd_info *mtd)
 			chip->ecc.layout = (priv->fmr & FMR_ECCM) ?
 			                   &fsl_elbc_oob_lp_eccm1 :
 			                   &fsl_elbc_oob_lp_eccm0;
-			chip->badblock_pattern = &largepage_memorybased;
 		}
 	} else {
 		dev_err(priv->dev,
-- 
1.7.11.3

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

* Re: [PATCH] mtd: fsl_elbc_nand: remove unnecessary badblock_pattern
  2012-09-26 23:15 [PATCH] mtd: fsl_elbc_nand: remove unnecessary badblock_pattern Brian Norris
@ 2012-10-10 14:38 ` Artem Bityutskiy
  0 siblings, 0 replies; 2+ messages in thread
From: Artem Bityutskiy @ 2012-10-10 14:38 UTC (permalink / raw)
  To: Brian Norris; +Cc: Scott Wood, David Woodhouse, linux-mtd

[-- Attachment #1: Type: text/plain, Size: 983 bytes --]

On Wed, 2012-09-26 at 16:15 -0700, Brian Norris wrote:
> Since the introduction of nand_create_default_bbt_descr() (now known as
> nand_create_badblock_pattern()) in
> 
>   commit 58373ff0afff4cc8ac40608872995f4d87eb72ec
> 
> nand_chip.badblock_pattern will be dynamically calculated to the same
> 1-byte-length pattern that is required by fsl_elbc_nand. This custom
> badblock_pattern is no longer needed, then, and its removal may help
> facilitate further nand_bbt.c/nand_base.c cleanup in the future (one
> down, many to go?)
> 
> Anyway, with nand_bbt.c fixed, this effectively reverts:
> 
>   commit 452db2724351ff3d9416a183a7955e00ab4e6ab4
>   [MTD] [NAND] fsl_elbc_nand: fix OOB workability for large page NAND chips
> 
> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
> Cc: Scott Wood <scottwood@freescale.com>
> ---
> 
> Not even compile-tested...

Compile-tested and pushed to l2-mtd.git, thanks!

-- 
Best Regards,
Artem Bityutskiy

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

end of thread, other threads:[~2012-10-10 14:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-26 23:15 [PATCH] mtd: fsl_elbc_nand: remove unnecessary badblock_pattern Brian Norris
2012-10-10 14:38 ` Artem Bityutskiy

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.