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,
>> >
>&g
tform 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 the NAND chip.
>
> Make BBT code inter
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
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 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
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
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 q
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
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
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
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
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
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
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 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
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
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 d1
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/linu
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
s 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
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
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
or nand family 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_c
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!
>>
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
rrect 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
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
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: nand-bbt: move
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
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 ee
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/linu
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
42 matches
Mail list logo