All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vignesh R <vigneshr@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [RFC PATCH 0/6] SF: Migrate to Linux SPI NOR framework
Date: Wed, 28 Nov 2018 22:56:01 +0530	[thread overview]
Message-ID: <20181128172607.10179-1-vigneshr@ti.com> (raw)

U-Boot SPI NOR support (sf layer) is quite outdated as it does not
support 4 byte addressing opcodes, SFDP table and different types of
quad mode enable sequences. Many newer flashes no longer support BANK
registers use 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 isnt 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 very easy.

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.

This is a RFC, if this approach if fine with the community and get an
early feedback. Based on the response, I plan to post
official series with better splitting of patches, removing all dead code
and fixing up any checkpatch errors.

[1] https://github.com/r-vignesh/u-boot.git  branch: spi-nor-mig

Vignesh R (6):
  mtd: spi: Port SPI NOR framework from Linux
  mtd spi: Switch to new SPI NOR framework
  spi: spi-mem: Enable all SPI modes
  porter_defconfig: Enable tiny printf
  da8250_am18xxevm_defconfig: Enable TINY PRINTF
  mtd: spi: Remove unused files

 arch/sh/include/asm/bitops.h      |    4 +
 common/spl/Kconfig                |    7 +
 configs/da850_am18xxevm_defconfig |    1 +
 configs/porter_defconfig          |    1 +
 drivers/mtd/spi/Kconfig           |    8 +
 drivers/mtd/spi/Makefile          |    4 +-
 drivers/mtd/spi/sandbox.c         |   36 +-
 drivers/mtd/spi/sf_dataflash.c    |   11 +-
 drivers/mtd/spi/sf_internal.h     |  227 +--
 drivers/mtd/spi/sf_probe.c        |   33 +-
 drivers/mtd/spi/spi-nor.c         | 2859 +++++++++++++++++++++++++++++
 drivers/mtd/spi/spi_flash.c       | 1337 --------------
 drivers/mtd/spi/spi_flash_ids.c   |  211 ---
 drivers/spi/spi-mem.c             |   15 +-
 drivers/spi/stm32_qspi.c          |    4 +-
 include/linux/mtd/cfi.h           |  385 ++++
 include/linux/mtd/mtd.h           |    2 +-
 include/linux/mtd/spi-nor.h       |  421 +++++
 include/spi_flash.h               |  105 +-
 19 files changed, 3805 insertions(+), 1866 deletions(-)
 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 include/linux/mtd/cfi.h
 create mode 100644 include/linux/mtd/spi-nor.h

-- 
2.19.2

             reply	other threads:[~2018-11-28 17:26 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-28 17:26 Vignesh R [this message]
2018-11-28 17:26 ` [U-Boot] [RFC PATCH 1/6] mtd: spi: Port SPI NOR framework from Linux Vignesh R
2018-11-29 16:04   ` Boris Brezillon
2018-11-29 17:26     ` Vignesh R
2018-11-29 18:52       ` Boris Brezillon
2018-11-29 19:11         ` Simon Goldschmidt
2018-11-28 17:26 ` [U-Boot] [RFC PATCH 2/6] mtd spi: Switch to new SPI NOR framework Vignesh R
2018-11-28 17:26 ` [U-Boot] [RFC PATCH 3/6] spi: spi-mem: Enable all SPI modes Vignesh R
2018-11-28 17:26 ` [U-Boot] [RFC PATCH 4/6] porter_defconfig: Enable tiny printf Vignesh R
2018-11-28 17:52   ` Marek Vasut
2018-11-28 20:34     ` Simon Goldschmidt
2018-11-28 21:50       ` Marek Vasut
2018-11-29 10:44         ` Vignesh R
2018-11-29 10:56           ` Miquel Raynal
2018-11-29 11:18             ` Simon Goldschmidt
2018-11-29 15:47               ` Vignesh R
2018-11-29 11:23           ` Marek Vasut
2018-11-28 17:26 ` [U-Boot] [RFC PATCH 5/6] da8250_am18xxevm_defconfig: Enable TINY PRINTF Vignesh R
2018-11-28 17:26 ` [U-Boot] [RFC PATCH 6/6] mtd: spi: Remove unused files Vignesh R
2018-11-28 20:27 ` [U-Boot] [RFC PATCH 0/6] SF: Migrate to Linux SPI NOR framework Simon Goldschmidt
2018-11-29 10:20 ` Stefan Roese
2018-11-29 11:21   ` Simon Goldschmidt
2018-11-29 15:22 ` Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181128172607.10179-1-vigneshr@ti.com \
    --to=vigneshr@ti.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.