Hi Boris,
On Thu, Nov 17, 2016 at 3:56 PM, Boris Brezillon
<boris.brezil...@free-electrons.com> wrote:
> Hi Peter,
>
> On Thu, 17 Nov 2016 14:26:37 +0800
> Peter Pan <peterpans...@gmail.com> wrote:
>
>> Hi Boris,
>>
>> On Sun, Oct 16, 2016 at 10:35
Hi Boris,
On Thu, Nov 17, 2016 at 3:56 PM, Boris Brezillon
wrote:
> Hi Peter,
>
> On Thu, 17 Nov 2016 14:26:37 +0800
> Peter Pan wrote:
>
>> Hi Boris,
>>
>> On Sun, Oct 16, 2016 at 10:35 PM, Boris Brezillon
>> wrote:
>> > Hi,
>> >
>
to bad. Both works well.
My test platform is Xilinx Zed board.
I will try to rebase my SPI NAND patch on your patch and send it out.
It will take me some time because I'm quite busy with other company affairs.
Thanks,
Peter Pan
is Xilinx Zed board.
I will try to rebase my SPI NAND patch on your patch and send it out.
It will take me some time because I'm quite busy with other company affairs.
Thanks,
Peter Pan
Hi Boris,
On Sun, Oct 16, 2016 at 10:35 PM, Boris Brezillon
wrote:
> BBT support is currently tightly tied to raw NAND, though this is the kind
> of code we could share across all NAND based devices, no matter what
> physical interface is to communicate with
Hi Boris,
On Sun, Oct 16, 2016 at 10:35 PM, Boris Brezillon
wrote:
> BBT support is currently tightly tied to raw NAND, though this is the kind
> of code we could share across all NAND based devices, no matter what
> physical interface is to communicate with the NAND chip.
>
> Make BBT code
divisor of do_div is 32bit.
It may cause division 0 exception when die size is larger than 4GB.
div64_u64 may be better.
Thanks,
Peter Pan
die(struct nand_device *nand, loff_t offs)
> +{
> + u64 die = offs;
> +
> + do_div(die, nand->memorg.diesize);
> +
> + return die;
Is it proper to use do_div here?. If I'm right, the divisor of do_div is 32bit.
It may cause division 0 exception when die size is larger than 4GB.
div64_u64 may be better.
Thanks,
Peter Pan
atic int write_bbt(struct mtd_info *mtd, uint8_t *buf,
> * get_bbt_block() returns a block number, shift the value to
> * get a page number.
> */
> - page = block << (this->bbt_erase_shift - this->page_shift);
> + nand_eraseblock_to_page(this, block);
Should be page = nand_eraseblock_to_page(this, block);
I will continue to review and test your patch. Hope give you feedback this week.
Thanks,
Peter Pan
turns a block number, shift the value to
> * get a page number.
> */
> - page = block << (this->bbt_erase_shift - this->page_shift);
> + nand_eraseblock_to_page(this, block);
Should be page = nand_eraseblock_to_page(this, block);
I will continue to review and test your patch. Hope give you feedback this week.
Thanks,
Peter Pan
Hi Boris,
On Tue, May 17, 2016 at 9:03 AM, Peter Pan <peterpans...@gmail.com> wrote:
> Hi Boris,
>
> Firstly, sorry for late reply.
>
> On Thu, May 5, 2016 at 4:33 AM, Boris Brezillon
> <boris.brezil...@free-electrons.com> wrote:
>> Hi Peter,
>>
>>
Hi Boris,
On Tue, May 17, 2016 at 9:03 AM, Peter Pan wrote:
> Hi Boris,
>
> Firstly, sorry for late reply.
>
> On Thu, May 5, 2016 at 4:33 AM, Boris Brezillon
> wrote:
>> Hi Peter,
>>
>> On Wed, 4 May 2016 09:36:05 +0800
>> Peter Pan wrote:
>>
&g
Hi Boris,
Firstly, sorry for late reply.
On Thu, May 5, 2016 at 4:33 AM, Boris Brezillon
<boris.brezil...@free-electrons.com> wrote:
> Hi Peter,
>
> On Wed, 4 May 2016 09:36:05 +0800
> Peter Pan <peterpans...@gmail.com> wrote:
>
>> Hi Boris,
>>
>> On
Hi Boris,
Firstly, sorry for late reply.
On Thu, May 5, 2016 at 4:33 AM, Boris Brezillon
wrote:
> Hi Peter,
>
> On Wed, 4 May 2016 09:36:05 +0800
> Peter Pan wrote:
>
>> Hi Boris,
>>
>> On Tue, Apr 19, 2016 at 3:34 PM, Boris Brezillon
>> wrote:
>>
Hi Boris,
On Tue, Apr 19, 2016 at 3:34 PM, Boris Brezillon
<boris.brezil...@free-electrons.com> wrote:
> Hi Peter,
>
> On Tue, 19 Apr 2016 08:40:40 +0800
> Peter Pan <peterpans...@gmail.com> wrote:
>>
>> >
>> >> So it's true, it
>> &g
Hi Boris,
On Tue, Apr 19, 2016 at 3:34 PM, Boris Brezillon
wrote:
> Hi Peter,
>
> On Tue, 19 Apr 2016 08:40:40 +0800
> Peter Pan wrote:
>>
>> >
>> >> So it's true, it
>> >> should still be numchips in nand_bbt.c? I just came out this questi
Hi Boris,
On Mon, Apr 18, 2016 at 3:44 PM, Boris Brezillon
<boris.brezil...@free-electrons.com> wrote:
> Hi Peter,
>
> On Mon, 18 Apr 2016 14:22:09 +0800
> Peter Pan <peterpans...@gmail.com> wrote:
>
>> Hi Boris,
>>
>> On Fri, Mar 25, 2016 at 4:35
Hi Boris,
On Mon, Apr 18, 2016 at 3:44 PM, Boris Brezillon
wrote:
> Hi Peter,
>
> On Mon, 18 Apr 2016 14:22:09 +0800
> Peter Pan wrote:
>
>> Hi Boris,
>>
>> On Fri, Mar 25, 2016 at 4:35 PM, Boris Brezillon
>> wrote:
>> > Hi Peter,
>> &g
Hi Boris,
On Fri, Mar 25, 2016 at 4:35 PM, Boris Brezillon
<boris.brezil...@free-electrons.com> wrote:
> Hi Peter,
>
> On Mon, 14 Mar 2016 02:47:55 +0000
> Peter Pan <peterpans...@gmail.com> wrote:
>
>> From: Brian Norris <computersforpe...@gmail.com
Hi Boris,
On Fri, Mar 25, 2016 at 4:35 PM, Boris Brezillon
wrote:
> Hi Peter,
>
> On Mon, 14 Mar 2016 02:47:55 +0000
> Peter Pan wrote:
>
>> From: Brian Norris
>>
>> Currently nand_bbt.c is tied with struct nand_chip, and it makes other
>> NAND family c
Hi Ezequiel,
Sorry for reply your mail late. And thaks a lot for reviewing it.
On Thu, Mar 24, 2016 at 4:57 AM, Ezequiel Garcia
<ezequ...@vanguardiasur.com.ar> wrote:
> Hello,
>
> On 13 March 2016 at 23:47, Peter Pan <peterpans...@gmail.com> wrote:
>> Sorry for s
Hi Ezequiel,
Sorry for reply your mail late. And thaks a lot for reviewing it.
On Thu, Mar 24, 2016 at 4:57 AM, Ezequiel Garcia
wrote:
> Hello,
>
> On 13 March 2016 at 23:47, Peter Pan wrote:
>> Sorry for send the v3 out late. I went through a busy time in the pa
On Fri, Mar 25, 2016 at 4:51 PM, Boris Brezillon
<boris.brezil...@free-electrons.com> wrote:
> On Mon, 14 Mar 2016 02:47:58 +0000
> Peter Pan <peterpans...@gmail.com> wrote:
>
>> Use new BBT APIs (nand_bbt_*()) in NAND. Keep old APIs (nand_*_bbt())
>> exist tempor
On Fri, Mar 25, 2016 at 4:51 PM, Boris Brezillon
wrote:
> On Mon, 14 Mar 2016 02:47:58 +
> Peter Pan wrote:
>
>> Use new BBT APIs (nand_bbt_*()) in NAND. Keep old APIs (nand_*_bbt())
>> exist temporarily.
>>
>> Signed-off-by: Brian Norris
>> Signed-of
Hi Boris,
Firstly, thanks a lot for taking time to review my patches.
On Fri, Mar 25, 2016 at 4:35 PM, Boris Brezillon
<boris.brezil...@free-electrons.com> wrote:
> Hi Peter,
>
> On Mon, 14 Mar 2016 02:47:55 +0000
> Peter Pan <peterpans...@gmail.com> wrote:
Hi Boris,
Firstly, thanks a lot for taking time to review my patches.
On Fri, Mar 25, 2016 at 4:35 PM, Boris Brezillon
wrote:
> Hi Peter,
>
> On Mon, 14 Mar 2016 02:47:55 +0000
> Peter Pan wrote:
>
>> From: Brian Norris
>>
>> Currently nand_bbt.c is tied wi
On Fri, Mar 25, 2016 at 4:50 PM, Boris Brezillon
<boris.brezil...@free-electrons.com> wrote:
> On Mon, 14 Mar 2016 02:47:53 +0000
> Peter Pan <peterpans...@gmail.com> wrote:
>
>> Sorry for send the v3 out late. I went through a busy time in the past
>> two month.
&
On Fri, Mar 25, 2016 at 4:50 PM, Boris Brezillon
wrote:
> On Mon, 14 Mar 2016 02:47:53 +
> Peter Pan wrote:
>
>> Sorry for send the v3 out late. I went through a busy time in the past
>> two month.
>>
>> Currently nand_bbt.c is tied with struct nand_chip,
On Fri, Mar 25, 2016 at 4:49 PM, Boris Brezillon
<boris.brezil...@free-electrons.com> wrote:
> On Mon, 14 Mar 2016 02:47:56 +0000
> Peter Pan <peterpans...@gmail.com> wrote:
>
>> Add new API definitions for nand_bbt to replace old ones without
>> any users. Th
On Fri, Mar 25, 2016 at 4:49 PM, Boris Brezillon
wrote:
> On Mon, 14 Mar 2016 02:47:56 +
> Peter Pan wrote:
>
>> Add new API definitions for nand_bbt to replace old ones without
>> any users. These API includes:
>> struct nand_bbt_create(struct mtd_info *mtd
Sorry I forgot to add subject prefix. Should I re-send it ?
On Mon, Mar 14, 2016 at 10:47 AM, Peter Pan <peterpans...@gmail.com> wrote:
> Sorry for send the v3 out late. I went through a busy time in the past
> two month.
>
> Currently nand_bbt.c is tied with struct nand_chip,
Sorry I forgot to add subject prefix. Should I re-send it ?
On Mon, Mar 14, 2016 at 10:47 AM, Peter Pan wrote:
> Sorry for send the v3 out late. I went through a busy time in the past
> two month.
>
> Currently nand_bbt.c is tied with struct nand_chip, and it makes other
> NAND fa
From: Brian Norris <computersforpe...@gmail.com>
With new nand_bbt.c, nand_chip doesn't need bbt element any more
Signed-off-by: Brian Norris <computersforpe...@gmail.com>
Signed-off-by: Peter Pan <peterpand...@micron.com>
---
include/linux/mtd/nand.h | 2 --
1 file ch
gmail.com>
[Peter: remove @buf in create_bbt()
introduce struct nand_bbt_ops]
Signed-off-by: Peter Pan <peterpand...@micron.com>
---
drivers/mtd/nand/nand_bbt.c | 140 +---
1 file changed, 14 insertions(+), 126 deletions(-)
diff --git
From: Brian Norris <computersforpe...@gmail.com>
nand_bbt.c doesn't need to call nand_erase_nand() any more.
Signed-off-by: Brian Norris <computersforpe...@gmail.com>
Signed-off-by: Peter Pan <peterpand...@micron.com>
---
drivers/mtd/nand/nand_base.c | 5 -
include/linux/
remove old BBT APIs
Signed-off-by: Peter Pan <peterpand...@micron.com>
---
drivers/mtd/nand/nand_bbt.c | 94 -
include/linux/mtd/nand.h| 3 --
2 files changed, 15 insertions(+), 82 deletions(-)
diff --git a/drivers/mtd/nand/nand_bbt.c b/d
nand_bbt_ops]
Signed-off-by: Peter Pan
---
drivers/mtd/nand/nand_bbt.c | 140 +---
1 file changed, 14 insertions(+), 126 deletions(-)
diff --git a/drivers/mtd/nand/nand_bbt.c b/drivers/mtd/nand/nand_bbt.c
index 2ac90a1..d319822 100644
--- a/drivers/mtd
From: Brian Norris
nand_bbt.c doesn't need to call nand_erase_nand() any more.
Signed-off-by: Brian Norris
Signed-off-by: Peter Pan
---
drivers/mtd/nand/nand_base.c | 5 -
include/linux/mtd/nand.h | 2 --
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/mtd/nand
remove old BBT APIs
Signed-off-by: Peter Pan
---
drivers/mtd/nand/nand_bbt.c | 94 -
include/linux/mtd/nand.h| 3 --
2 files changed, 15 insertions(+), 82 deletions(-)
diff --git a/drivers/mtd/nand/nand_bbt.c b/drivers/mtd/nand/nand_bbt.c
index
From: Brian Norris
With new nand_bbt.c, nand_chip doesn't need bbt element any more
Signed-off-by: Brian Norris
Signed-off-by: Peter Pan
---
include/linux/mtd/nand.h | 2 --
1 file changed, 2 deletions(-)
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h
index d180e86
From: Brian Norris <computersforpe...@gmail.com>
nand_bbt doesn't need nand badblock_pattern any more. So remove
NAND_BBT_DYNAMICSTRUCT from nand_bbt.h
Signed-off-by: Brian Norris <computersforpe...@gmail.com>
Signed-off-by: Peter Pan <peterpand...@micron.com>
---
include/li
Norris <computersforpe...@gmail.com>
[Peter Pan: replacement with struct nand_chip_layout_info]
Signed-off-by: Peter Pan <peterpand...@micron.com>
---
drivers/mtd/nand/nand_bbt.c | 410 +++-
1 file changed, 210 insertions(+), 200 deletions(-)
diff --git
From: Brian Norris
nand_bbt doesn't need nand badblock_pattern any more. So remove
NAND_BBT_DYNAMICSTRUCT from nand_bbt.h
Signed-off-by: Brian Norris
Signed-off-by: Peter Pan
---
include/linux/mtd/nand_bbt.h | 7 ---
1 file changed, 7 deletions(-)
diff --git a/include/linux/mtd
From: Brian Norris
This commit contains most of modification. But the job is quite
simple --- replace struct nand_chip with struct nand_bbt, nand_bbt_ops
and nand_chip_layout_info . There is no algorithm change, just
replacement.
Signed-off-by: Brian Norris
[Peter Pan: replacement with struct
Some nand controller drivers(like docg4.c) mark factory bad block
mark by accessing bbt buffer directly, so create this API to avoid
breaking layer.
Signed-off-by: Peter Pan <peterpand...@micron.com>
---
drivers/mtd/nand/nand_bbt.c | 33 ++---
include/lin
Use new BBT APIs (nand_bbt_*()) in NAND. Keep old APIs (nand_*_bbt())
exist temporarily.
Signed-off-by: Brian Norris <computersforpe...@gmail.com>
Signed-off-by: Peter Pan <peterpand...@micron.com>
---
drivers/mtd/nand/docg4.c | 7 +-
drivers/mtd/nand/nand_
omment style
2. introduce struct nand_bbt_ops and nand_chip_layout_info]
Signed-off-by: Peter Pan <peterpand...@micron.com>
---
include/linux/mtd/nand_bbt.h | 67
1 file changed, 67 insertions(+)
diff --git a/include/linux/mtd/nand_bbt.h b
and nand_chip_layout_info]
Signed-off-by: Peter Pan
---
include/linux/mtd/nand_bbt.h | 67
1 file changed, 67 insertions(+)
diff --git a/include/linux/mtd/nand_bbt.h b/include/linux/mtd/nand_bbt.h
index 5a65230..cfb22c8 100644
--- a/include/linux/mtd/nand_bbt.h
+++ b
Some nand controller drivers(like docg4.c) mark factory bad block
mark by accessing bbt buffer directly, so create this API to avoid
breaking layer.
Signed-off-by: Peter Pan
---
drivers/mtd/nand/nand_bbt.c | 33 ++---
include/linux/mtd/nand_bbt.h | 1 +
2 files
Use new BBT APIs (nand_bbt_*()) in NAND. Keep old APIs (nand_*_bbt())
exist temporarily.
Signed-off-by: Brian Norris
Signed-off-by: Peter Pan
---
drivers/mtd/nand/docg4.c | 7 +-
drivers/mtd/nand/nand_base.c | 151 ---
include/linux/mtd/nand.h
nand_bbt_markbad(struct nand_bbt *bbt, loff_t offs);
int nand_bbt_isreserved(struct nand_bbt *bbt, loff_t offs);
int nand_bbt_isbad(struct nand_bbt *bbt, loff_t offs);
Signed-off-by: Brian Norris <computersforpe...@gmail.com>
Signed-off-by: Peter Pan <peterpand...@micron.com>
From: Brian Norris <computersforpe...@gmail.com>
Migrating existing BBT definitions from bbm.h to nand_bbt.h
Signed-off-by: Brian Norris <computersforpe...@gmail.com>
[Peter: correct misspelling. s/neccecary/necessary/]
Signed-off-by: Peter Pan <peterpand...@micron.com>
---
From: Brian Norris
Migrating existing BBT definitions from bbm.h to nand_bbt.h
Signed-off-by: Brian Norris
[Peter: correct misspelling. s/neccecary/necessary/]
Signed-off-by: Peter Pan
---
include/linux/mtd/bbm.h | 96 +--
include/linux/mtd/nand_bbt.h
nand_bbt_markbad(struct nand_bbt *bbt, loff_t offs);
int nand_bbt_isreserved(struct nand_bbt *bbt, loff_t offs);
int nand_bbt_isbad(struct nand_bbt *bbt, loff_t offs);
Signed-off-by: Brian Norris
Signed-off-by: Peter Pan
---
drivers/mtd/nand/nand_bbt.c | 113
mtd: nand: remove nand_chip.bbt
Peter Pan (4):
mtd: nand_bbt: add new API definitions
mtd: nand_bbt: add nand_bbt_markbad_factory() interface
mtd: nand: use new BBT API instead of old ones
mtd: nand_bbt: remove old API definitions
drivers/mtd/nand/docg4.c | 7 +-
drivers/mtd/nand/na
BBT
mtd: nand_bbt: introduce BBT related data structure
mtd: nand_bbt: use struct nand_bbt_ops in BBT
mtd: nand: make nand_erase_nand() static
mtd: nand_bbt: remove struct nand_chip from nand_bbt.c
mtd: nand_bbt: remove NAND_BBT_DYNAMICSTRUCT macro
mtd: nand: remove nand_chip.bbt
Peter
t; >> > Hi,
>> > >> >
>> > >> > On Mon, 28 Dec 2015 17:42:50 -0300
>> > >> > Ezequiel Garcia wrote:
>> > >> >
>> > >> >> This is looking a lot better, thanks for the good work!
>>
gt;> > On Mon, 28 Dec 2015 17:42:50 -0300
>> > >> > Ezequiel Garcia <ezequ...@vanguardiasur.com.ar> wrote:
>> > >> >
>> > >> >> This is looking a lot better, thanks for the good work!
>> > >> >>
>&
() and
nand_default_bbt() in nand_base.c
3. add NAND_BADBLOCK_PATTERN_ALLOC macro]
Signed-off-by: Peter Pan
---
drivers/mtd/nand/docg4.c | 6 +-
drivers/mtd/nand/nand_base.c | 140 ---
include/linux/mtd/nand.h | 9 ++-
3 files changed, 143 insertions
From: Brian Norris
remove old BBT APIs
Signed-off-by: Brian Norris
Signed-off-by: Peter Pan
---
drivers/mtd/nand/nand_bbt.c | 110 +---
include/linux/mtd/nand.h| 3 --
2 files changed, 22 insertions(+), 91 deletions(-)
diff --git a/drivers/mtd
comment style]
Signed-off-by: Peter Pan
---
include/linux/mtd/nand_bbt.h | 59
1 file changed, 59 insertions(+)
diff --git a/include/linux/mtd/nand_bbt.h b/include/linux/mtd/nand_bbt.h
index 5a65230..e468571 100644
--- a/include/linux/mtd/nand_bbt.h
+++ b
Some nand controller drivers(like docg4.c) mark factory bad block
mark by accessing bbt buffer directly, so create this API to avoid
breaking layer.
Signed-off-by: Peter Pan
---
drivers/mtd/nand/nand_bbt.c | 32 +---
include/linux/mtd/nand_bbt.h | 1 +
2 files
: nand_bbt: remove struct nand_chip from nand_bbt.c
mtd: nand_bbt: remove old API definitions
mtd: nand_bbt: remove NAND_BBT_DYNAMICSTRUCT macro
mtd: nand: remove nand_chip.bbt
Peter Pan (2):
mtd: nand_bbt: add nand_bbt_markbad_factory() interface
mtd: nand-bbt: move nand_bbt.c to mtd folder
From: Brian Norris
nand_bbt.c doesn't need to call nand_erase_nand() any more.
Signed-off-by: Brian Norris
Signed-off-by: Peter Pan
---
drivers/mtd/nand/nand_base.c | 5 -
include/linux/mtd/nand.h | 2 --
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/mtd/nand
From: Brian Norris
With new nand_bbt.c, nand_chip doesn't need bbt element any more
Signed-off-by: Brian Norris
Signed-off-by: Peter Pan
---
include/linux/mtd/nand.h | 2 --
1 file changed, 2 deletions(-)
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h
index ee15f7d
From: Brian Norris
nand_bbt doesn't need nand badblock_pattern any more. So remove
NAND_BBT_DYNAMICSTRUCT from nand_bbt.h
Signed-off-by: Brian Norris
Signed-off-by: Peter Pan
---
include/linux/mtd/nand_bbt.h | 7 ---
1 file changed, 7 deletions(-)
diff --git a/include/linux/mtd
From: Brian Norris
Since NAND already create its nand_bbt struct, we can use erase()
hook instead of call nand_erase_nand() directly. Also, we can use
is_bad_bbm() to avoid passing badblock_pattern to BBT.
Signed-off-by: Brian Norris
[Peter: remove @buf in create_bbt()]
Signed-off-by: Peter
Since struct nand_chip is removed from nand_bbt.c, BBT is now
shareable. Both NAND and SPI NAND can use it. So move nand_bbt.c
from nand/ foler to mtd/ folder and create MTD_NAND_BBT config.
Both NAND and SPI NAND should depend on MTD_NAND_BBT.
Signed-off-by: Peter Pan
---
drivers/mtd/Kconfig
nand_bbt_isreserved(struct nand_bbt *bbt, loff_t offs);
int nand_bbt_isbad(struct nand_bbt *bbt, loff_t offs);
Signed-off-by: Brian Norris
Signed-off-by: Peter Pan
---
drivers/mtd/nand/nand_bbt.c | 71
include/linux/mtd/nand_bbt.h | 6
2
From: Brian Norris
This commit contains most of modification. But the job is quite
simple --- replace struct nand_chip with struct nand_bbt. There
is no algorithm change, just replacement.
Signed-off-by: Brian Norris
Signed-off-by: Peter Pan
---
drivers/mtd/nand/nand_bbt.c | 391
From: Brian Norris
Migrating existing BBT definitions from bbm.h to nand_bbt.h
Signed-off-by: Brian Norris
[Peter: correct misspelling. s/neccecary/necessary/]
Signed-off-by: Peter Pan
---
include/linux/mtd/bbm.h | 96 +--
include/linux/mtd/nand_bbt.h
From: Brian Norris <computersforpe...@gmail.com>
With new nand_bbt.c, nand_chip doesn't need bbt element any more
Signed-off-by: Brian Norris <computersforpe...@gmail.com>
Signed-off-by: Peter Pan <peterpand...@micron.com>
---
include/linux/mtd/nand.h | 2 --
1 file ch
From: Brian Norris <computersforpe...@gmail.com>
nand_bbt.c doesn't need to call nand_erase_nand() any more.
Signed-off-by: Brian Norris <computersforpe...@gmail.com>
Signed-off-by: Peter Pan <peterpand...@micron.com>
---
drivers/mtd/nand/nand_base.c | 5 -
include/linux/
From: Brian Norris <computersforpe...@gmail.com>
nand_bbt doesn't need nand badblock_pattern any more. So remove
NAND_BBT_DYNAMICSTRUCT from nand_bbt.h
Signed-off-by: Brian Norris <computersforpe...@gmail.com>
Signed-off-by: Peter Pan <peterpand...@micron.com>
---
include/li
;
Signed-off-by: Peter Pan <peterpand...@micron.com>
---
drivers/mtd/nand/nand_bbt.c | 391 ++--
1 file changed, 193 insertions(+), 198 deletions(-)
diff --git a/drivers/mtd/nand/nand_bbt.c b/drivers/mtd/nand/nand_bbt.c
index a5c8ab5..b46b4ae 100644
---
gmail.com>
[Peter: remove @buf in create_bbt()]
Signed-off-by: Peter Pan <peterpand...@micron.com>
---
drivers/mtd/nand/nand_bbt.c | 138
1 file changed, 12 insertions(+), 126 deletions(-)
diff --git a/drivers/mtd/nand/nand_bbt.c b/drivers/mtd/nan
Since struct nand_chip is removed from nand_bbt.c, BBT is now
shareable. Both NAND and SPI NAND can use it. So move nand_bbt.c
from nand/ foler to mtd/ folder and create MTD_NAND_BBT config.
Both NAND and SPI NAND should depend on MTD_NAND_BBT.
Signed-off-by: Peter Pan <peterpand...@micron.
t *bbt, loff_t offs);
int nand_bbt_isreserved(struct nand_bbt *bbt, loff_t offs);
int nand_bbt_isbad(struct nand_bbt *bbt, loff_t offs);
Signed-off-by: Brian Norris <computersforpe...@gmail.com>
Signed-off-by: Peter Pan <peterpand...@micron.com>
---
drivers/mtd/nan
From: Brian Norris <computersforpe...@gmail.com>
Migrating existing BBT definitions from bbm.h to nand_bbt.h
Signed-off-by: Brian Norris <computersforpe...@gmail.com>
[Peter: correct misspelling. s/neccecary/necessary/]
Signed-off-by: Peter Pan <peterpand...@micron.com>
---
From: Brian Norris <computersforpe...@gmail.com>
remove old BBT APIs
Signed-off-by: Brian Norris <computersforpe...@gmail.com>
Signed-off-by: Peter Pan <peterpand...@micron.com>
---
drivers/mtd/nand/nand_bbt.c | 110 +---
include/linux/m
nt
2. nand_create_factory_badblock_pattern(), nand_is_bad_bbm() and
nand_default_bbt() in nand_base.c
3. add NAND_BADBLOCK_PATTERN_ALLOC macro]
Signed-off-by: Peter Pan <peterpand...@micron.com>
---
drivers/mtd/nand/docg4.c | 6 +-
drivers/mtd/nand
Brian Norris <computersforpe...@gmail.com>
[Peter: correct comment style]
Signed-off-by: Peter Pan <peterpand...@micron.com>
---
include/linux/mtd/nand_bbt.h | 59
1 file changed, 59 insertions(+)
diff --git a/include/linux/mtd/nand_bbt.h b
Some nand controller drivers(like docg4.c) mark factory bad block
mark by accessing bbt buffer directly, so create this API to avoid
breaking layer.
Signed-off-by: Peter Pan <peterpand...@micron.com>
---
drivers/mtd/nand/nand_bbt.c | 32 +---
include/lin
: make nand_erase_nand() static
mtd: nand_bbt: remove struct nand_chip from nand_bbt.c
mtd: nand_bbt: remove old API definitions
mtd: nand_bbt: remove NAND_BBT_DYNAMICSTRUCT macro
mtd: nand: remove nand_chip.bbt
Peter Pan (2):
mtd: nand_bbt: add nand_bbt_markbad_factory() interface
mtd: na
84 matches
Mail list logo