public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Nishanth Menon <menon.nishanth@gmail.com>
To: Reuben Dowle <Reuben.Dowle@navico.com>, linux-mtd@lists.infradead.org
Subject: Re: [PATCH] MTD: NAND Add support for MLC nand with alternate BB marker	locations
Date: Fri, 06 Feb 2009 04:34:45 -0600	[thread overview]
Message-ID: <498C1245.3040802@gmail.com> (raw)
In-Reply-To: <70F6AAAFDC054F41B9994A9BCD3DF64E08611EC4@exch01-aklnz.MARINE.NET.INT>

Reuben Dowle said the following on 02/03/2009 09:20 PM:
> This patch adds support for some MLC NAND flashes that place the BB
> marker in the LAST page of the bad block rather than the FIRST page used
> for SLC NAND and other types of MLC nand.
>
> Lifted from Samsung datasheet for K9LG8G08U0A (1Gbyte MLC NAND):
> "
>
>   
link to the datasheet might be quick ;)..
> Signed-off-by: Reuben Dowle <reuben.dowle at navico.com>
> ---
>  drivers/mtd/nand/nand_base.c |   12 ++++++++++++
>  drivers/mtd/nand/nand_bbt.c  |    3 +++
>  include/linux/mtd/nand.h     |    3 ++-
>  3 files changed, 17 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
> old mode 100644
> new mode 100755
> index 0c3afcc..a76ff7b
> --- a/drivers/mtd/nand/nand_base.c
> +++ b/drivers/mtd/nand/nand_base.c
> @@ -306,6 +306,9 @@ static int nand_block_bad(struct mtd_info *mtd,
> loff_t ofs, int getchip)
>  
>  	page = (int)(ofs >> chip->page_shift) & chip->pagemask;
>  
> +	if( chip->options & NAND_BB_LAST_PAGE )
>   
formatting... if( chip Vs if (chip.. did you run checkpatch.pl to verify
the patch?
> +		ofs += (mtd->erasesize - mtd->writesize);
>   
Would we consider extending bbt_desc as a generic handling technique for
all current and future NAND and kill the need ofchip->options for
BB_LAST_PAGE, ALL_PAGES etc? The argument being: what if a different
manufacturer uses last 2 pages of nand or 2 pages at a different page
offset - in all cases ALL_PAGES would not be efficient enough)..

Regards,
Nishanth Menon
Regards,
Nishanth Menon

      reply	other threads:[~2009-02-06 10:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-04  3:20 [PATCH] MTD: NAND Add support for MLC nand with alternate BB marker locations Reuben Dowle
2009-02-06 10:34 ` Nishanth Menon [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=498C1245.3040802@gmail.com \
    --to=menon.nishanth@gmail.com \
    --cc=Reuben.Dowle@navico.com \
    --cc=linux-mtd@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox