Skip to content

Commit b199489

Browse files
Huang Shijiecomputersforpeace
authored andcommitted
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>
1 parent 6e602ef commit b199489

6 files changed

Lines changed: 1118 additions & 0 deletions

File tree

‎drivers/mtd/Kconfig‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,8 @@ source "drivers/mtd/onenand/Kconfig"
321321

322322
source "drivers/mtd/lpddr/Kconfig"
323323

324+
source "drivers/mtd/spi-nor/Kconfig"
325+
324326
source "drivers/mtd/ubi/Kconfig"
325327

326328
endif # MTD

‎drivers/mtd/Makefile‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,5 @@ inftl-objs := inftlcore.o inftlmount.o
3232

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

35+
obj-$(CONFIG_MTD_SPI_NOR_BASE) += spi-nor/
3536
obj-$(CONFIG_MTD_UBI) += ubi/

‎drivers/mtd/spi-nor/Kconfig‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
config MTD_SPI_NOR_BASE
2+
bool "the framework for SPI-NOR support"
3+
depends on MTD
4+
help
5+
This is the framework for the SPI NOR which can be used by the SPI
6+
device drivers and the SPI-NOR device driver.

‎drivers/mtd/spi-nor/Makefile‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
obj-$(CONFIG_MTD_SPI_NOR_BASE) += spi-nor.o

0 commit comments

Comments
 (0)