[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <71CF8D7F32C5C24C9CD1D0E02D52498A7714DD2A@NTXXIAMBX02.xacn.micron.com>
Date: Thu, 8 Jan 2015 02:45:01 +0000
From: Qi Wang 王起 (qiwang) <qiwang@...ron.com>
To: Brian Norris <computersforpeace@...il.com>
CC: "dwmw2@...radead.org" <dwmw2@...radead.org>,
Ezequiel Garcia <ezequiel.garcia@...tec.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-mtd@...ts.infradead.org" <linux-mtd@...ts.infradead.org>,
Frank Liu 刘群 (frankliu)
<frankliu@...ron.com>,
Melanie Zhang 张燕 (melaniezhang)
<melaniezhang@...ron.com>,
Peter Pan 潘栋 (peterpandong)
<peterpandong@...ron.com>
Subject: RE: [PATCH 0/3] An alternative to SPI NAND
Hi Brian,
On Thu, Jan 08, 2015 at 9:03:24AM +0000, Brian Norris wrote:
>
>On Thu, Jan 08, 2015 at 12:47:24AM +0000, 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 | 7 +
>> drivers/mtd/spi-nand/Makefile | 3 +
>> drivers/mtd/spi-nand/spi-nand-base.c | 2034
>++++++++++++++++++++
>> drivers/mtd/spi-nand/spi-nand-bbt.c | 1279 ++++++++++++
>
>I can already tell by the diffstat that I don't like this. We probably
>don't need 3000 new lines of code for this, but we especially don't want
>to duplicate nand_bbt.c. It won't take a lot of work to augment
>nand_bbt.c to make it shareable. (I can whip that patch up if needed.)
Yes, I agree with you, Nand_bbt.c do can be shared by Parallel NAND and
SPI NAND. Actually, we are working at this now. Will send patches to you
Once we finished it.
But for the 2000 new lines code in spi-nand-base.c, frankly speaking, I
still no idea how to decrease the code lines.
I separate code of the SPI NAND and Parallel NAND that different with
Ezequiel Garcia patches, because I think this framework could be easier
to maintain it, in the future, SPI NAND may have more specific features
that will be difficult to reuse the code of Nand_base.c but just remap
command to SPI NAND from Parallel NAND.
So we write a new spi-nand-base.c, to implement read/write/erase function,
that will cause many code lines as you see. If you have other suggestion,
please let me know.
>
>I'll still take a look at the rest of the code eventually, but just
>wanted to give my 2 cents up front.
>
>> drivers/mtd/spi-nand/spi-nand-device.c | 281 +++
>> include/linux/mtd/spi-nand.h | 317 +++
>> 9 files changed, 3946 insertions(+)
>> create mode 100644 Documentation/devicetree/bindings/mtd/spi-nand.txt
>> create mode 100644 drivers/mtd/spi-nand/Kconfig
>> create mode 100644 drivers/mtd/spi-nand/Makefile
>> create mode 100644 drivers/mtd/spi-nand/spi-nand-base.c
>> create mode 100644 drivers/mtd/spi-nand/spi-nand-bbt.c
>> create mode 100644 drivers/mtd/spi-nand/spi-nand-device.c
>> create mode 100644 include/linux/mtd/spi-nand.h
>
Qi Wang
Powered by blists - more mailing lists