[lkml]   [2015]   [Jan]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 0/3] An alternative to SPI NAND

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
> will be very helpful.
> There are two options. We can put struct nand_bbt pointer in either nand_chip
> or mtd_info structure.

I'm sorry, you lost me here. Do you mean struct nand_bbt_descr ?

> If put nand_bbt in nand_chip, we need to change the

I thought the plan was NOT to base spi-nand on nand, so you can't put
this in nand_chip, can you?

Also: After looking at the nand_bbt.c file, I'm wondering how promising
is to separate it from NAND. It seems the BBT code is quite attached to

Are you planning to do this in just one patch? Maybe it's better to
start simple and prepare small patches that gradually make the
nand_base.c and nand_bbt.c files less dependent.

For instance, you can get rid of the memory release in a first patch:

/* Free bad block table memory */
if (!(chip->options & NAND_OWN_BUFFERS))

/* Free bad block descriptor memory */
if (chip->badblock_pattern && chip->badblock_pattern->options

by moving it to some nand_bbt_release() function.

I might be pushing some patches to do this, as I think it can be useful
in general to clean this code.

 \ /
  Last update: 2015-01-30 13:01    [W:0.081 / U:5.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site