mtd: spi-nor: add the framework for SPI NOR
authorHuang Shijie <b32955@freescale.com>
Mon, 24 Feb 2014 10:37:37 +0000 (18:37 +0800)
committerBrian Norris <computersforpeace@gmail.com>
Mon, 14 Apr 2014 18:22:58 +0000 (11:22 -0700)
commitb199489d37b21c5e294f95bf265acc5dde3fc3a2
treea498f39ae5035cdb9091eb96d95662db3fc54a82
parent6e602ef73334550bbbb8be1041a3ce6eecbd42f1
mtd: spi-nor: add the framework for SPI NOR

This patch cloned most of the m25p80.c. In theory, it adds a new spi-nor layer.

Before this patch, the layer is like:

                   MTD
         ------------------------
                  m25p80
         ------------------------
       spi bus driver
         ------------------------
        SPI NOR chip

After this patch, the layer is like:
                   MTD
         ------------------------
                  spi-nor
         ------------------------
                  m25p80
         ------------------------
       spi bus driver
         ------------------------
       SPI NOR chip

With the spi-nor controller driver(Freescale Quadspi), it looks like:
                   MTD
         ------------------------
                  spi-nor
         ------------------------
                fsl-quadspi
         ------------------------
       SPI NOR chip

New APIs:
   spi_nor_scan: used to scan a spi-nor flash.

Signed-off-by: Huang Shijie <b32955@freescale.com>
Acked-by: Marek Vasut <marex@denx.de>
[Brian: rebased to include additional m25p_ids[] entry]
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
drivers/mtd/Kconfig
drivers/mtd/Makefile
drivers/mtd/spi-nor/Kconfig [new file with mode: 0644]
drivers/mtd/spi-nor/Makefile [new file with mode: 0644]
drivers/mtd/spi-nor/spi-nor.c [new file with mode: 0644]
include/linux/mtd/spi-nor.h