ut first, a simpler comment:
>
> On Fri, Sep 25, 2015 at 06:48:05AM +, Peter Pan 潘栋 (peterpandong)
> wrote:
> > 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
ut first, a simpler comment:
>
> On Fri, Sep 25, 2015 at 06:48:05AM +, Peter Pan 潘栋 (peterpandong)
> wrote:
> > 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
command should do the trick:
>
> git send-email /*.patch
>
> Best Regards,
>
> Boris
>
> On Fri, 25 Sep 2015 06:34:34 +
> Peter Pan 潘栋 (peterpandong) wrote:
>
> > Currently nand_bbt.c is tied with struct nand_chip, and it makes other
> > NAND family chips
+
Peter Pan 潘栋 (peterpandong) wrote:
> 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
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 doesn't need nand badblock_pattern any more. So remove
NAND_BBT_DYNAMICSTRUCT from nand_bbt.h
Signed-off-by: Brian Norris
---
include/linux/mtd/nand_bbt.h | 7 ---
1 file changed, 7 deletions(-)
diff --git a/include/linux/mtd/nand_bbt.h b/include/linux/mtd/nand_bbt.h
index
With new nand_bbt.c, nand_chip doesn't need bbt element any more
Signed-off-by: Brian Norris
---
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 fb3f148..bc49f04 100644
--- a/include/linux/mtd/nand.h
+++
remove old BBT APIs
Signed-off-by: Brian Norris
---
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/nand/nand_bbt.c b/drivers/mtd/nand/nand_bbt.c
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
---
drivers/mtd/nand/nand_bbt.c | 393 ++--
1 file
nand_bbt.c doesn't need to call nand_erase_nand() any more.
Signed-off-by: Brian Norris
---
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/nand_base.c b/drivers/mtd/nand/nand_base.c
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 Pan
---
Use new BBT APIs (nand_bbt_*()) in NAND. Keep old APIs (nand_*_bbt())
exist temporarily.
Signed-off-by: Brian Norris
[Peter: 1. use nand_bbt_markbad_factory() in docg4.c and implement
2. nand_create_factory_badblock_pattern(), nand_is_bad_bbm() and
nand_default_bbt() in
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
Add new API definitions for nand_bbt to replace old ones without
any users. These API includes:
int nand_bbt_init(struct nand_bbt *bbt);
void nand_bbt_release(struct nand_bbt *bbt);
int nand_bbt_markbad(struct nand_bbt *bbt, loff_t offs);
int
We put every information nand_bbt.c needed from outside into struct
nand_bbt, include:
@mtd: pointer to MTD device structure
@is_bad_bbm:check if a block is factory bad block
@mark_bad_bbm: imitate a block as factory bad block
@erase: erase block bypassing
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 | 118
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 | 118
Currently nand_bbt.c is tied with struct nand_chip, and it makes other
NAND family chips hard to use nand_bbt.c. Maybe it's the reason why
onenand has own bbt(onenand_bbt.c).
Separate struct nand_chip from BBT code can make current BBT shareable.
We create struct nand_bbt to take place of
We put every information nand_bbt.c needed from outside into struct
nand_bbt, include:
@mtd: pointer to MTD device structure
@is_bad_bbm:check if a block is factory bad block
@mark_bad_bbm: imitate a block as factory bad block
@erase: erase block bypassing
Add new API definitions for nand_bbt to replace old ones without
any users. These API includes:
int nand_bbt_init(struct nand_bbt *bbt);
void nand_bbt_release(struct nand_bbt *bbt);
int nand_bbt_markbad(struct nand_bbt *bbt, loff_t offs);
int
nand_bbt.c doesn't need to call nand_erase_nand() any more.
Signed-off-by: Brian Norris
---
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/nand_base.c
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:
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 +--
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 +--
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 +---
Use new BBT APIs (nand_bbt_*()) in NAND. Keep old APIs (nand_*_bbt())
exist temporarily.
Signed-off-by: Brian Norris
[Peter: 1. use nand_bbt_markbad_factory() in docg4.c and implement
2. nand_create_factory_badblock_pattern(), nand_is_bad_bbm() and
remove old BBT APIs
Signed-off-by: Brian Norris
---
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/nand/nand_bbt.c
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
---
drivers/mtd/nand/nand_bbt.c | 393
nand_bbt doesn't need nand badblock_pattern any more. So remove
NAND_BBT_DYNAMICSTRUCT from nand_bbt.h
Signed-off-by: Brian Norris
---
include/linux/mtd/nand_bbt.h | 7 ---
1 file changed, 7 deletions(-)
diff --git a/include/linux/mtd/nand_bbt.h
With new nand_bbt.c, nand_chip doesn't need bbt element any more
Signed-off-by: Brian Norris
---
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 fb3f148..bc49f04 100644
---
command should do the trick:
>
> git send-email /*.patch
>
> Best Regards,
>
> Boris
>
> On Fri, 25 Sep 2015 06:34:34 +
> Peter Pan 潘栋 (peterpandong) <peterpand...@micron.com> wrote:
>
> > Currently nand_bbt.c is tied with struct nand_chip, and it
+
Peter Pan 潘栋 (peterpandong) <peterpand...@micron.com> wrote:
> 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 P
Currently nand_bbt.c is tied with struct nand_chip, and it makes other
NAND family chips hard to use nand_bbt.c. Maybe it's the reason why
onenand has own bbt(onenand_bbt.c).
Separate struct nand_chip from BBT code can make current BBT shareable.
We create struct nand_bbt to take place of
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
Currently nand_bbt.c is tied with struct nand_chip, and it makes other
NAND family chips hard to use nand_bbt.c. Maybe it's the reason why
onenand has own bbt(onenand_bbt.c).
Parameterize a few relevant device detail information into a new
nand_bbt struct, and set some hooks for chip specified
Currently nand_bbt.c is tied with struct nand_chip, and it makes other
NAND family chips hard to use nand_bbt.c. Maybe it's the reason why
onenand has own bbt(onenand_bbt.c).
Parameterize a few relevant device detail information into a new
nand_bbt struct, and set some hooks for chip specified
ase
> find it below.
>
> Best wishes,
> Kamil Debski
>
> From: linux-mtd [mailto:linux-mtd-boun...@lists.infradead.org] On
> Behalf
> Of Peter Pan ?? (peterpandong)
> Sent: 15 May 2015 08:32
>
> > Currently nand_bbt.c is tied with struct nand_chip, and it ma
: linux-mtd [mailto:linux-mtd-boun...@lists.infradead.org] On
Behalf
Of Peter Pan ?? (peterpandong)
Sent: 15 May 2015 08:32
Currently nand_bbt.c is tied with struct nand_chip, and it makes
other
NAND family chips hard to use nand_bbt.c. Maybe it's the reason why
onenand has own bbt
Ping
>
> Currently nand_bbt.c is tied with struct nand_chip, and it makes other
> NAND family chips hard to use nand_bbt.c. Maybe it's the reason why
> onenand has own bbt(onenand_bbt.c).
>
> Parameterize a few relevant device detail information into a new
> nand_bbt struct, and set some hooks
Ping
Currently nand_bbt.c is tied with struct nand_chip, and it makes other
NAND family chips hard to use nand_bbt.c. Maybe it's the reason why
onenand has own bbt(onenand_bbt.c).
Parameterize a few relevant device detail information into a new
nand_bbt struct, and set some hooks for chip
Currently nand_bbt.c is tied with struct nand_chip, and it makes other
NAND family chips hard to use nand_bbt.c. Maybe it's the reason why
onenand has own bbt(onenand_bbt.c).
Parameterize a few relevant device detail information into a new
nand_bbt struct, and set some hooks for chip specified
Currently nand_bbt.c is tied with struct nand_chip, and it makes other
NAND family chips hard to use nand_bbt.c. Maybe it's the reason why
onenand has own bbt(onenand_bbt.c).
Parameterize a few relevant device detail information into a new
nand_bbt struct, and set some hooks for chip specified
On 23 April 2015 at 15:47, Rafał Miłecki wrote:
> On 22 April 2015 at 19:50, Brian Norris
> wrote:
> > On Thu, Apr 16, 2015 at 02:09:41AM +, Peter Pan 潘栋
> (peterpandong) wrote:
> >>
> >> Signed-off-by: Brian Norris
> >> Signed-off-by: Peter Pan
>
On 23 April 2015 at 15:47, Rafał Miłecki wrote:
On 22 April 2015 at 19:50, Brian Norris computersforpe...@gmail.com
wrote:
On Thu, Apr 16, 2015 at 02:09:41AM +, Peter Pan 潘栋
(peterpandong) wrote:
Signed-off-by: Brian Norris computersforpe...@gmail.com
Signed-off-by: Peter Pan
On Thu, Apr 23, 2015 at 01:51:27PM +, Brian Norris wrote:
>
> On Thu, Apr 16, 2015 at 02:11:24AM +, Peter Pan 潘栋 (peterpandong)
> wrote:
> > The diskonchip driver almost uses the default nand_base hooks as-is,
> > except that it provides custom on-flash BBT descripto
On Thu, Apr 23, 2015 at 01:51:27PM +, Brian Norris wrote:
On Thu, Apr 16, 2015 at 02:11:24AM +, Peter Pan 潘栋 (peterpandong)
wrote:
The diskonchip driver almost uses the default nand_base hooks as-is,
except that it provides custom on-flash BBT descriptors and avoids
using
Continue with Brain Norris's work. Allocate and initialize struct
nand_bbt in nand_default_bbt()(nand_base.c). Remove .bbt from nand_chip.
Complete hook nand_is_bad_bbm(nand_bbt.is_bad_bbm). Allocate and initialize
badblock_pattern in nand_chip if badblock_pattern does not exist.
And clean some
Not complete. Need to actually allocate and initialize struct nand_bbt.
TBD: should struct nand_bbt be embedded in mtd_info? Might help provide
some automatic routine registration.
Signed-off-by: Brian Norris
Signed-off-by: Peter Pan
---
drivers/mtd/nand/docg4.c | 3 +-
Don't leak this->bbt, and return early if check_create() fails. It helps
to have a single error path to avoid these problems.
Signed-off-by: Brian Norris
Signed-off-by: Peter Pan
---
drivers/mtd/nand/nand_bbt.c | 19 ---
1 file changed, 12 insertions(+), 7 deletions(-)
diff
This implementation detail is no longer needed outside of nand_bbt.c.
Signed-off-by: Brian Norris
Signed-off-by: Peter Pan
---
drivers/mtd/nand/nand_bbt.c | 2 +-
include/linux/mtd/nand.h| 1 -
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/mtd/nand/nand_bbt.c
The diskonchip driver almost uses the default nand_base hooks as-is,
except that it provides custom on-flash BBT descriptors and avoids using
factory-marked bad blockers.
So let's refactor the BBT initialization code into a private 'late_init'
hook which handles all the private details. Note the
Signed-off-by: Brian Norris
Signed-off-by: Peter Pan
---
drivers/mtd/nand/nand_bbt.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/mtd/nand/nand_bbt.c b/drivers/mtd/nand/nand_bbt.c
index 9bb8453..307a285 100644
--- a/drivers/mtd/nand/nand_bbt.c
+++ b/drivers/mtd/nand/nand_bbt.c
@@
Not complete. Need to actually allocate and initialize struct nand_bbt.
TBD: should struct nand_bbt be embedded in mtd_info? Might help provide
some automatic routine registration.
Signed-off-by: Brian Norris computersforpe...@gmail.com
Signed-off-by: Peter Pan peterpand...@micron.com
---
This implementation detail is no longer needed outside of nand_bbt.c.
Signed-off-by: Brian Norris computersforpe...@gmail.com
Signed-off-by: Peter Pan peterpand...@micron.com
---
drivers/mtd/nand/nand_bbt.c | 2 +-
include/linux/mtd/nand.h| 1 -
2 files changed, 1 insertion(+), 2
Don't leak this-bbt, and return early if check_create() fails. It helps
to have a single error path to avoid these problems.
Signed-off-by: Brian Norris computersforpe...@gmail.com
Signed-off-by: Peter Pan peterpand...@micron.com
---
drivers/mtd/nand/nand_bbt.c | 19 ---
1 file
The diskonchip driver almost uses the default nand_base hooks as-is,
except that it provides custom on-flash BBT descriptors and avoids using
factory-marked bad blockers.
So let's refactor the BBT initialization code into a private 'late_init'
hook which handles all the private details. Note the
Signed-off-by: Brian Norris computersforpe...@gmail.com
Signed-off-by: Peter Pan peterpand...@micron.com
---
drivers/mtd/nand/nand_bbt.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/mtd/nand/nand_bbt.c b/drivers/mtd/nand/nand_bbt.c
index 9bb8453..307a285 100644
---
Continue with Brain Norris's work. Allocate and initialize struct
nand_bbt in nand_default_bbt()(nand_base.c). Remove .bbt from nand_chip.
Complete hook nand_is_bad_bbm(nand_bbt.is_bad_bbm). Allocate and initialize
badblock_pattern in nand_chip if badblock_pattern does not exist.
And clean some
On Sat, Jan 31, 2015 at 15:02:29AM -0300, Brian Norris wrote:
>
> On Fri, Jan 30, 2015 at 08:47:29AM -0300, Ezequiel Garcia wrote:
> > On 01/29/2015 09:57 PM, Peter Pan 潘栋 (peterpandong) wrote:
> > [..]
> > >
> > > Currently, we are working on sharing the
On Sat, Jan 31, 2015 at 15:02:29AM -0300, Brian Norris wrote:
On Fri, Jan 30, 2015 at 08:47:29AM -0300, Ezequiel Garcia wrote:
On 01/29/2015 09:57 PM, Peter Pan 潘栋 (peterpandong) wrote:
[..]
Currently, we are working on sharing the bbt code. I think your and
Brain's suggestion
wrote:
> >>>>
> >>>> Hi Qi Wang,
> >>>>
> >>>> On 01/07/2015 11:45 PM, Qi Wang 王起 (qiwang) wrote:
> >>>>> Hi Brian,
> >>>>>
> >>>>> On Thu, Jan 08, 2015 at 9:03:24AM +, Brian Nor
Brian,
On Thu, Jan 08, 2015 at 9:03:24AM +, Brian Norris wrote:
On Thu, Jan 08, 2015 at 12:47:24AM +, Peter Pan 潘栋
(peterpandong)
wrote:
Documentation/devicetree/bindings/mtd/spi-nand.txt | 22 +
drivers/mtd/Kconfig|2 +
drivers/mtd
> On Thu, Jan 08, 2015 at 12:47:24AM +, Peter Pan 潘栋 (peterpandong)
> wrote:
> > Documentation/devicetree/bindings/mtd/spi-nand.txt | 22 +
> > drivers/mtd/Kconfig|2 +
> > drivers/mtd/Makefile |1 +
On Thu, Jan 08, 2015 at 12:47:24AM +, Peter Pan 潘栋 (peterpandong)
wrote:
Documentation/devicetree/bindings/mtd/spi-nand.txt | 22 +
drivers/mtd/Kconfig|2 +
drivers/mtd/Makefile |1 +
drivers/mtd/spi-nand/Kconfig
> On 01/08/2015 02:04 AM, Peter Pan 潘栋 (peterpandong) wrote:
> >>> This commit adds the devicetree binding document that specifies the
> >>> spi nand devices support.
> >>>
> >>> Signed-off-by: Peter Pan
> >>> ---
On 01/08/2015 02:04 AM, Peter Pan 潘栋 (peterpandong) wrote:
This commit adds the devicetree binding document that specifies the
spi nand devices support.
Signed-off-by: Peter Pan peterpand...@micron.com
---
Documentation/devicetree/bindings/mtd/spi-nand.txt | 22
> > This commit adds the devicetree binding document that specifies the
> > spi nand devices support.
> >
> > Signed-off-by: Peter Pan
> > ---
> > Documentation/devicetree/bindings/mtd/spi-nand.txt | 22
> ++
> > 1 file changed, 22 insertions(+)
> > create mode 100644
This commit adds the devicetree binding document that specifies the
spi nand devices support.
Signed-off-by: Peter Pan
---
Documentation/devicetree/bindings/mtd/spi-nand.txt | 22 ++
1 file changed, 22 insertions(+)
create mode 100644
This commit is to support Micron MT29F and Gigadevice GD5F spi nand
devices under spi-nand framework.
Signed-off-by: Peter Pan
---
drivers/mtd/spi-nand/Makefile | 1 +
drivers/mtd/spi-nand/spi-nand-device.c | 281 +
2 files changed, 282 insertions(+)
Add framework to support spi nand devices. The code is derived from
parallel nand code.
Signed-off-by: Peter Pan
---
drivers/mtd/Kconfig |2 +
drivers/mtd/Makefile |1 +
drivers/mtd/spi-nand/Kconfig |7 +
drivers/mtd/spi-nand/Makefile
This patchset is an alternative to Ezequiel's series[1].
This patchset separate SPI NAND code and Parallel NAND code, make SPI NAND have
its own spi_nand_scan, read, write, BBM mechanism, so that it would be better
for code maintenance in the future.
TODO -
1. This patchset is
This commit adds the devicetree binding document that specifies the
spi nand devices support.
Signed-off-by: Peter Pan peterpand...@micron.com
---
Documentation/devicetree/bindings/mtd/spi-nand.txt | 22
++
1 file changed, 22 insertions(+)
create mode 100644
This patchset is an alternative to Ezequiel's series[1].
This patchset separate SPI NAND code and Parallel NAND code, make SPI NAND have
its own spi_nand_scan, read, write, BBM mechanism, so that it would be better
for code maintenance in the future.
TODO -
1. This patchset is
Add framework to support spi nand devices. The code is derived from
parallel nand code.
Signed-off-by: Peter Pan peterpand...@micron.com
---
drivers/mtd/Kconfig |2 +
drivers/mtd/Makefile |1 +
drivers/mtd/spi-nand/Kconfig |7 +
This commit is to support Micron MT29F and Gigadevice GD5F spi nand
devices under spi-nand framework.
Signed-off-by: Peter Pan peterpand...@micron.com
---
drivers/mtd/spi-nand/Makefile | 1 +
drivers/mtd/spi-nand/spi-nand-device.c | 281 +
2 files
This commit adds the devicetree binding document that specifies the
spi nand devices support.
Signed-off-by: Peter Pan peterpand...@micron.com
---
Documentation/devicetree/bindings/mtd/spi-nand.txt | 22 ++
1 file changed, 22 insertions(+)
create mode 100644
76 matches
Mail list logo