public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [RFC PATCH v2 00/11] SF: Migrate to Linux SPI NOR framework
@ 2018-12-04 12:26 Vignesh R
  2018-12-04 12:26 ` [U-Boot] [RFC PATCH v2 01/11] spi: spi-mem: Allow use of spi_mem_exec_op for all SPI modes Vignesh R
                   ` (12 more replies)
  0 siblings, 13 replies; 43+ messages in thread
From: Vignesh R @ 2018-12-04 12:26 UTC (permalink / raw)
  To: u-boot

U-Boot SPI NOR support (sf layer) is quite outdated as it does not
support 4 byte addressing opcodes, SFDP table parsing and different types of
quad mode enable sequences. Many newer flashes no longer support BANK
registers used by sf layer to a access >16MB space.
Also, many SPI controllers have special MMIO interfaces which provide
accelerated read/write access but require knowledge of flash parameters
to make use of it. Recent spi-mem layer provides a way to support such
flashes but sf layer isn't using that.
This patch series syncs SPI NOR framework from Linux v4.19. It also adds
spi-mem support on top.
So, we gain 4byte addressing support and SFDP support. This makes
migrating to U-Boot MTD framework easier.

Tested with few Spansion, micron and macronix flashes with TI's dra7xx,
k2g, am43xx EVMs. I dont have access to flashes from other vendors. So,
I would greatly appreciate testing on other platforms. Complete series
with dependencies here[1]

For clean build on some platforms, depends on CONFIG_SPI_FLASH migration
to defconfigs [2]

[1] https://github.com/r-vignesh/u-boot.git  branch: spi-nor-mig-v2
[2] https://patchwork.ozlabs.org/patch/1007485/

Change log:
v2:
Add lightweight SPI flash stack for boards with SPL size constraints
Provide non DM version of spi-mem
Fix build issues on different platforms as reported by travis-ci on v1

v1: https://patchwork.ozlabs.org/cover/1004689/

Vignesh R (11):
  spi: spi-mem: Allow use of spi_mem_exec_op for all SPI modes
  spi-mem: Claim SPI bus before spi mem access
  spi: Add non DM version of SPI_MEM
  sh: bitops: add hweight*() macros
  mtd: spi: Port SPI NOR framework from Linux
  mtd spi: Switch to new SPI NOR framework
  mtd: spi: Remove unused files
  mtd: spi: Add lightweight SPI flash stack for SPL
  sf_mtd: Simply mtd operations
  taurus_defconfig: Enable simple malloc in SPL
  axm_defconfig: Enable simple malloc in SPL

 arch/sh/include/asm/bitops.h    |    4 +
 common/spl/Kconfig              |   16 +
 configs/axm_defconfig           |    1 +
 configs/taurus_defconfig        |    1 +
 drivers/mtd/spi/Kconfig         |    8 +
 drivers/mtd/spi/Makefile        |   10 +-
 drivers/mtd/spi/sandbox.c       |   36 +-
 drivers/mtd/spi/sf_dataflash.c  |   11 +-
 drivers/mtd/spi/sf_internal.h   |  230 +---
 drivers/mtd/spi/sf_mtd.c        |   39 +-
 drivers/mtd/spi/sf_probe.c      |   35 +-
 drivers/mtd/spi/spi-nor-ids.c   |  294 ++++
 drivers/mtd/spi/spi-nor-tiny.c  |  806 +++++++++++
 drivers/mtd/spi/spi-nor.c       | 2300 +++++++++++++++++++++++++++++++
 drivers/mtd/spi/spi_flash.c     | 1337 ------------------
 drivers/mtd/spi/spi_flash_ids.c |  211 ---
 drivers/spi/Kconfig             |    4 +-
 drivers/spi/Makefile            |    1 +
 drivers/spi/spi-mem-nodm.c      |   89 ++
 drivers/spi/spi-mem.c           |   15 +-
 drivers/spi/stm32_qspi.c        |    4 +-
 include/linux/mtd/cfi.h         |   32 +
 include/linux/mtd/spi-nor.h     |  421 ++++++
 include/spi_flash.h             |  105 +-
 24 files changed, 4116 insertions(+), 1894 deletions(-)
 create mode 100644 drivers/mtd/spi/spi-nor-ids.c
 create mode 100644 drivers/mtd/spi/spi-nor-tiny.c
 create mode 100644 drivers/mtd/spi/spi-nor.c
 delete mode 100644 drivers/mtd/spi/spi_flash.c
 delete mode 100644 drivers/mtd/spi/spi_flash_ids.c
 create mode 100644 drivers/spi/spi-mem-nodm.c
 create mode 100644 include/linux/mtd/cfi.h
 create mode 100644 include/linux/mtd/spi-nor.h

-- 
2.19.2

^ permalink raw reply	[flat|nested] 43+ messages in thread

end of thread, other threads:[~2018-12-10 18:04 UTC | newest]

Thread overview: 43+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-04 12:26 [U-Boot] [RFC PATCH v2 00/11] SF: Migrate to Linux SPI NOR framework Vignesh R
2018-12-04 12:26 ` [U-Boot] [RFC PATCH v2 01/11] spi: spi-mem: Allow use of spi_mem_exec_op for all SPI modes Vignesh R
2018-12-04 12:26 ` [U-Boot] [RFC PATCH v2 02/11] spi-mem: Claim SPI bus before spi mem access Vignesh R
2018-12-04 12:26 ` [U-Boot] [RFC PATCH v2 03/11] spi: Add non DM version of SPI_MEM Vignesh R
2018-12-04 12:26 ` [U-Boot] [RFC PATCH v2 04/11] sh: bitops: add hweight*() macros Vignesh R
2018-12-04 12:26 ` [U-Boot] [RFC PATCH v2 05/11] mtd: spi: Port SPI NOR framework from Linux Vignesh R
2018-12-05 20:13   ` Simon Goldschmidt
2018-12-04 12:26 ` [U-Boot] [RFC PATCH v2 06/11] mtd spi: Switch to new SPI NOR framework Vignesh R
2018-12-05  7:04   ` Simon Goldschmidt
2018-12-05 11:12     ` Vignesh R
2018-12-04 12:26 ` [U-Boot] [RFC PATCH v2 07/11] mtd: spi: Remove unused files Vignesh R
2018-12-04 12:26 ` [U-Boot] [RFC PATCH v2 08/11] mtd: spi: Add lightweight SPI flash stack for SPL Vignesh R
2018-12-05  7:01   ` Simon Goldschmidt
2018-12-05 11:09     ` Vignesh R
2018-12-04 12:26 ` [U-Boot] [RFC PATCH v2 09/11] sf_mtd: Simply mtd operations Vignesh R
2018-12-04 12:49   ` Boris Brezillon
2018-12-05  8:00     ` Vignesh R
2018-12-05  8:27       ` Miquel Raynal
2018-12-04 12:26 ` [U-Boot] [RFC PATCH v2 10/11] taurus_defconfig: Enable simple malloc in SPL Vignesh R
2018-12-04 12:26 ` [U-Boot] [RFC PATCH v2 11/11] axm_defconfig: " Vignesh R
2018-12-04 12:55 ` [U-Boot] [RFC PATCH v2 00/11] SF: Migrate to Linux SPI NOR framework Boris Brezillon
2018-12-04 20:11   ` Simon Goldschmidt
2018-12-05  6:51     ` Vignesh R
2018-12-05  6:55       ` Simon Goldschmidt
2018-12-05 20:45         ` Simon Goldschmidt
2018-12-06 13:46           ` Vignesh R
2018-12-06 13:54             ` Simon Goldschmidt
2018-12-06 16:36               ` Simon Goldschmidt
2018-12-06 17:39                 ` Vignesh R
2018-12-06 19:17                   ` Simon Goldschmidt
2018-12-07  5:58                     ` Vignesh R
2018-12-07 18:43                       ` Simon Goldschmidt
2018-12-06 17:14 ` Jagan Teki
2018-12-06 18:18   ` Tom Rini
2018-12-06 18:25   ` Vignesh R
2018-12-06 19:22     ` Simon Goldschmidt
2018-12-07  9:51     ` Boris Brezillon
2018-12-09  8:54       ` Vignesh R
2018-12-10 13:02     ` Jagan Teki
2018-12-10 13:15       ` Boris Brezillon
2018-12-10 14:33         ` Tom Rini
2018-12-10 17:38       ` Vignesh R
2018-12-10 18:04         ` Miquel Raynal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox