Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b199489d authored by Huang Shijie's avatar Huang Shijie Committed by Brian Norris
Browse files

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: default avatarHuang Shijie <b32955@freescale.com>
Acked-by: default avatarMarek Vasut <marex@denx.de>
[Brian: rebased to include additional m25p_ids[] entry]
Signed-off-by: default avatarBrian Norris <computersforpeace@gmail.com>
parent 6e602ef7
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -321,6 +321,8 @@ source "drivers/mtd/onenand/Kconfig"

source "drivers/mtd/lpddr/Kconfig"

source "drivers/mtd/spi-nor/Kconfig"

source "drivers/mtd/ubi/Kconfig"

endif # MTD
+1 −0
Original line number Diff line number Diff line
@@ -32,4 +32,5 @@ inftl-objs := inftlcore.o inftlmount.o

obj-y		+= chips/ lpddr/ maps/ devices/ nand/ onenand/ tests/

obj-$(CONFIG_MTD_SPI_NOR_BASE)	+= spi-nor/
obj-$(CONFIG_MTD_UBI)		+= ubi/
+6 −0
Original line number Diff line number Diff line
config MTD_SPI_NOR_BASE
	bool "the framework for SPI-NOR support"
	depends on MTD
	help
	  This is the framework for the SPI NOR which can be used by the SPI
	  device drivers and the SPI-NOR device driver.
+1 −0
Original line number Diff line number Diff line
obj-$(CONFIG_MTD_SPI_NOR_BASE)	+= spi-nor.o
+1088 −0

File added.

Preview size limit exceeded, changes collapsed.

Loading