Discussion:
[PATCH v1 0/2] SPI-NOR add NPCM FIU controller driver
Tomer Maimon
2018-12-03 09:14:54 UTC
Permalink
This patch set adds Flash Interface Unit(FIU) SPI-NOR
support for the Nuvoton NPCM Baseboard Management
Controller (BMC).

The FIU supports single, dual or quad communication interface.

the FIU controller can operate in following modes:
- User Mode Access(UMA): provides flash access by using an
indirect address/data mechanism.
- direct rd/wr mode: maps the flash memory into the core
address space.
- SPI-X mode: used for an expansion bus to an ASIC or CPLD.

The NPCM750/730/715/710 supports up to three FIU devices:
- FIU0 supports two chip select.
- FIU3 supports four chip select.
- FIUX supports two chip select.

The NPCM FIU driver tested on NPCM750 evaluation board.

Tomer Maimon (2):
dt-binding: mtd: add NPCM FIU controller
mtd: spi-nor: add NPCM FIU controller driver

Documentation/devicetree/bindings/mtd/npcm-fiu.txt | 64 ++
drivers/mtd/spi-nor/Kconfig | 8 +
drivers/mtd/spi-nor/Makefile | 1 +
drivers/mtd/spi-nor/npcm-fiu.c | 930 +++++++++++++++++++++
4 files changed, 1003 insertions(+)
create mode 100644 Documentation/devicetree/bindings/mtd/npcm-fiu.txt
create mode 100644 drivers/mtd/spi-nor/npcm-fiu.c
--
2.14.1
Tomer Maimon
2018-12-03 09:14:56 UTC
Permalink
This post might be inappropriate. Click to display it.
kbuild test robot
2018-12-04 00:01:58 UTC
Permalink
Hi Tomer,

I love your patch! Yet something to improve:

[auto build test ERROR on mtd/spi-nor/next]
[also build test ERROR on v4.20-rc5 next-20181203]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url: https://github.com/0day-ci/linux/commits/Tomer-Maimon/dt-binding-mtd-add-NPCM-FIU-controller/20181203-201804
base: git://git.infradead.org/linux-mtd.git spi-nor/next
config: i386-allmodconfig (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
# save the attached .config to linux build tree
make ARCH=i386
drivers/mtd/spi-nor/npcm-fiu.c:25:10: fatal error: asm/sizes.h: No such file or directory
#include <asm/sizes.h>
^~~~~~~~~~~~~
compilation terminated.

vim +25 drivers/mtd/spi-nor/npcm-fiu.c

24
25 #include <asm/sizes.h>
26 #include <mtd/mtd-abi.h>
27

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
Tomer Maimon
2018-12-03 09:14:55 UTC
Permalink
This post might be inappropriate. Click to display it.
Boris Brezillon
2018-12-03 09:22:40 UTC
Permalink
On Mon, 3 Dec 2018 11:14:54 +0200
Post by Tomer Maimon
This patch set adds Flash Interface Unit(FIU) SPI-NOR
support for the Nuvoton NPCM Baseboard Management
Controller (BMC).
The FIU supports single, dual or quad communication interface.
- User Mode Access(UMA): provides flash access by using an
indirect address/data mechanism.
- direct rd/wr mode: maps the flash memory into the core
address space.
- SPI-X mode: used for an expansion bus to an ASIC or CPLD.
- FIU0 supports two chip select.
- FIU3 supports four chip select.
- FIUX supports two chip select.
The NPCM FIU driver tested on NPCM750 evaluation board.
dt-binding: mtd: add NPCM FIU controller
mtd: spi-nor: add NPCM FIU controller driver
Documentation/devicetree/bindings/mtd/npcm-fiu.txt | 64 ++
drivers/mtd/spi-nor/Kconfig | 8 +
drivers/mtd/spi-nor/Makefile | 1 +
drivers/mtd/spi-nor/npcm-fiu.c | 930 +++++++++++++++++++++
We are currently trying to move all SPI NOR controller drivers out of
drivers/mtd/spi-nor. Can you try to implement the spi-mem interface [1]
and place your driver in drivers/spi/.

[1]https://elixir.bootlin.com/linux/v4.20-rc5/source/include/linux/spi/spi-mem.h#L185
Boris Brezillon
2018-12-03 14:30:46 UTC
Permalink
Hi Tomer;

On Mon, 3 Dec 2018 16:09:19 +0200
1. We have been working on this driver for quite a long time to port it
to the latest Linux conventions, polish the code, run tests and reach high
quality.
Our partners and customers are waiting to get this driver upstream so
they can freely use it.
Your patch prefix says "v1", so I'm assuming this is the first public
version. I'm sure you spent a lot of time developing this driver
internally, but no matter how long it took, it's a first version for
us, and since we are moving away from the spi_nor controller interface,
I'm not willing to accept new drivers using this interface.

If you want more background about the spi_nor controller interface
deprecation, you can read [1].
Since this driver is already in final stages and is in very good shape
we will appreciate if you can review this specific driver/interface and
help us to upstream it.
Actually, I'd like to do it the other way around: let you rework the
driver to implement the spi-mem interface and review this version.
Otherwise I'll be reviewing things I don't intend to merge anyway.
2. As for the new interface, we are open for any discussion and for
porting the driver as required.
We are unsure what is this specific interface and weather it really fits
a driver for a Flash Interface Controller module (rather than a SPI flash
device).
Didn't go through the code in details, but at first glance, it looks
like it would fit pretty well.
Is it possible to get a sample driver from another Flash Interface
Controller module that was ported to this new interface ?
We recently converted the atmel QSPI driver [2].

Regards,

Boris

[1]https://bootlin.com/blog/spi-mem-bringing-some-consistency-to-the-spi-memory-ecosystem/
[2]https://patchwork.kernel.org/project/spi-devel-general/list/?series=38347&state=*
Loading...