From: Haojian Zhuang <haojian.zhuang@gmail.com>
To: David Woodhouse <david.woodhouse@intel.com>
Cc: linux-mtd@lists.infradead.org, kyungmin.park@samsung.com,
Eric Miao <eric.y.miao@gmail.com>,
linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
Mok Keith <ek9852@gmail.com>
Subject: Re: [PATCH 1/5] pxa3xx_nand: enable PXA3xx bad block management
Date: Wed, 7 Oct 2009 23:12:54 -0400 [thread overview]
Message-ID: <771cded00910072012n51522ce9q32691346e96c4e55@mail.gmail.com> (raw)
In-Reply-To: <771cded00909251900v7ee60bf6uf4c5724075c65826@mail.gmail.com>
On Fri, Sep 25, 2009 at 10:00 PM, Haojian Zhuang
<haojian.zhuang@gmail.com> wrote:
> On Sat, Sep 26, 2009 at 1:04 AM, Mok Keith <ek9852@gmail.com> wrote:
>> Hi,
>>
>> Any reason to limit the max slot to 40 (PXA_MAX_SLOT). It seems the
>> bad block management scheme is not scalable and have a limitation of
>> up to 256M bytes flash size only. (256M, 128kB per block = 2048 blocks
>> = 40 bad blocks)
>
> Each slot is one page. It's used to record the relocation information.
> Each relocation
> information is composed by two items. One is the bad block number, the other one
> is relocated block number. Both of these two items cost 16 bits. For
> the large block
> flash, it can save 511 relocation information at most.
>
> In the head of slot, a 16-bit magic number and 16-bit total number of
> relocation items are
> recorders.
>
> When the slot is used, the next written will be moved to the next
> slot. It's used to protect
> relocation recorders. If one slot is broken, driver could load the previous one.
>
> When all 40 slots are used, driver could erase the whole block and
> write again. This feature
> isn't enabled in the patch.
>>
>> Also for the calibration of the 2% bad block area, according to most
>> NAND specifications (checked Samsung, Hynix, Micron), nand flash
>> vendor guarantee no more than 20 bad block per 1024 blocks and this
>> rule is apply linearly.
>>
>> Would it be better to use the following otherwise when nand size is
>> greater than 256M the no of bad block entries is not matched to
>> specification:
>> instead of:
>>> + entries = (entries * 2) / 100;
>>
>> use:
>> + entries = (entries * 10) / 512;
>
> Yes, this formula is better. I will use this. Maybe I can use this
> formula whatever
> the flash is beyond 256M or not.
>
>>
>> May I know what is the use of PXA_BEGIN_SLOT ?
> I'm sorry that I removed usage of PXA_BEGIN_SLOT. But I didn't clear the macro
> definition.
>>
>> Keith
>>
>
> Now the new patch is in below.
>
> From 57dc033ff95a12ee83f9189c5f72827d755c5432 Mon Sep 17 00:00:00 2001
> From: Haojian Zhuang <haojian.zhuang@marvell.com>
> Date: Fri, 25 Sep 2009 15:00:28 -0400
> Subject: [PATCH] [MTD] [NAND] pxa3xx_nand: enable PXA3xx bad block management
>
> There's a custom bad block management in PXA3xx series.
>
> This BBM needs to allocate a reserved area at the bottom of NAND chip.
> The reserved area should be protected from normal usage. The first block
> of NAND is also reserved in order to storing the relocation information.
>
> The reserved area is also called as relocation area. It occupies 2% of
> the whole NAND space.
>
> When NAND controller finds a bad block, it marks the block as bad and
> allocate a unused block from relocation area in bottom. The new block is
> used to replace the original bad one. From OS view, there's no bad block
> at the time. It's handled by NAND driver. Then driver records the replacement
> information in the first block.
>
> There're 40 pages are reserved in the first block. Each page is a independant
> relocation table. If the current relocation table is broken, driver will fetch
> the previous one. Each relocation information cost a 32-bit word.
>
>
Hi David,
How do you think that this patch series on PXA3xx bad block
management? Is it acceptable or not?
Thanks
Haojian
next prev parent reply other threads:[~2009-10-08 3:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-25 11:57 [PATCH 1/5] pxa3xx_nand: enable PXA3xx bad block management Haojian Zhuang
2009-09-25 17:04 ` Mok Keith
2009-09-26 2:00 ` Haojian Zhuang
2009-10-08 3:12 ` Haojian Zhuang [this message]
2009-10-08 13:39 ` Eric Miao
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=771cded00910072012n51522ce9q32691346e96c4e55@mail.gmail.com \
--to=haojian.zhuang@gmail.com \
--cc=david.woodhouse@intel.com \
--cc=ek9852@gmail.com \
--cc=eric.y.miao@gmail.com \
--cc=kyungmin.park@samsung.com \
--cc=linux-arm-kernel@lists.infradead.org \
--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