public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Ezequiel Garcia <ezequiel.garcia@imgtec.com>
To: "\"Peter Pan 潘栋 (peterpandong)\"" <peterpandong@micron.com>,
	"\"Qi Wang 王起 (qiwang)\"" <qiwang@micron.com>,
	"Brian Norris" <computersforpeace@gmail.com>
Cc: "Andrew Bresticker" <abrestic@chromium.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>,
	"\"Frank Liu 刘群 (frankliu)\"" <frankliu@micron.com>,
	"\"Melanie Zhang 张燕 (melaniezhang)\"" <melaniezhang@micron.com>,
	"dwmw2@infradead.org" <dwmw2@infradead.org>,
	"James Hartley" <james.hartley@imgtec.com>
Subject: Re: [PATCH 0/3] An alternative to SPI NAND
Date: Fri, 30 Jan 2015 08:47:29 -0300	[thread overview]
Message-ID: <54CB6F51.2070403@imgtec.com> (raw)
In-Reply-To: <87F60714EC601C4C83DFF1D2E3D390A04AE751@NTXXIAMBX02.xacn.micron.com>



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
NAND!

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 */
        kfree(chip->bbt);
        if (!(chip->options & NAND_OWN_BUFFERS))
                kfree(chip->buffers);

        /* Free bad block descriptor memory */
        if (chip->badblock_pattern && chip->badblock_pattern->options
                        & NAND_BBT_DYNAMICSTRUCT)
                kfree(chip->badblock_pattern);

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.
-- 
Ezequiel

  reply	other threads:[~2015-01-30 11:50 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-08  0:47 [PATCH 0/3] An alternative to SPI NAND Peter Pan 潘栋 (peterpandong)
2015-01-08  1:03 ` Brian Norris
2015-01-08  2:45   ` Qi Wang 王起 (qiwang)
2015-01-08  3:27     ` Ezequiel Garcia
2015-01-12 15:10       ` Qi Wang 王起 (qiwang)
2015-01-20 10:35         ` Ezequiel Garcia
2015-01-21  2:11           ` Qi Wang 王起 (qiwang)
2015-01-29 18:03             ` Ezequiel Garcia
2015-01-30  0:57               ` Peter Pan 潘栋 (peterpandong)
2015-01-30 11:47                 ` Ezequiel Garcia [this message]
2015-01-31  7:02                   ` Brian Norris
2015-02-02  1:53                     ` Peter Pan 潘栋 (peterpandong)
2015-02-23 15:32                     ` Ezequiel Garcia
2015-02-24  3:54                       ` Brian Norris
2015-02-26 18:39                         ` Ezequiel Garcia
2015-01-20  6:15   ` Peter Pan 潘栋 (peterpandong)

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=54CB6F51.2070403@imgtec.com \
    --to=ezequiel.garcia@imgtec.com \
    --cc=abrestic@chromium.org \
    --cc=computersforpeace@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=frankliu@micron.com \
    --cc=james.hartley@imgtec.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=melaniezhang@micron.com \
    --cc=peterpandong@micron.com \
    --cc=qiwang@micron.com \
    /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