linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Ramuthevar,Vadivel MuruganX"  <vadivel.muruganx.ramuthevar@linux.intel.com>
To: linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: broonie@kernel.org, vigneshr@ti.com, robh+dt@kernel.org,
	cheol.yong.kim@intel.com, qi-ming.wu@intel.com,
	"Ramuthevar,Vadivel MuruganX" 
	<vadivel.muruganx.ramuthevar@linux.intel.com>
Subject: [PATCH v2 0/2] spi: cadence-quadpsi: Add support for the Cadence QSPI controller
Date: Wed, 30 Oct 2019 16:11:53 +0800	[thread overview]
Message-ID: <20191030081155.29947-1-vadivel.muruganx.ramuthevar@linux.intel.com> (raw)

Add support for the Cadence QSPI controller. This controller is
present in the Intel Lightning Mountain(LGM) SoCs, Altera and TI SoCs.
This driver has been tested on the Intel LGM SoCs.

This driver does not support generic SPI and also the implementation
only supports spi-mem interface to replace the existing driver in
mtd/spi-nor/cadence-quadspi.c, the existing driver only support SPI-NOR
flash memory.

v2 changes from v1:
  Thank you Mark and Vignesh for the review comments and also shared link to develop 
cadence-quadspi driver based on spi-mem framework against removal of legacy SPI.

Mark Brown Review comments:
	If it's different versions of the same IP then everything should be in
	one driver with the optional features enabled depending on what's in a
	given system.

Vignesh review comments:
	Nope, you cannot have two drivers for the same IP (i.e Cadence QSPI)
	just to support to different types of SPI memories. This is the reason
	why spi_mem_ops was introduced.

	Please rewrite this driver over to use spi_mem_ops (instead of using
	generic SPI xfers) so that same driver supports both SPI-NOR and
	SPI-NAND flashes. Once that's done drivers/mtd/spi-nor/cadence-quadspi.c
	can be deleted.

	There are few existing examples of spi_mem_ops users in drivers/spi/
	(git grep spi_mem_ops) and materials here on how to write such a driver:
	
	[1] https://bootlin.com/blog/spi-mem-bringing-some-consistency-to-the-spi-memory-ecosystem/
	[2] https://www.youtube.com/watch?v=PkWbuLM_gmU

 

Ramuthevar Vadivel Murugan (2):
  dt-bindings: spi: Add schema for Cadence QSPI Controller driver
  spi: cadence-quadpsi: Add support for the Cadence QSPI controller

 .../devicetree/bindings/spi/cadence,qspi.yaml      |   65 +
 drivers/spi/Kconfig                                |   10 +
 drivers/spi/Makefile                               |    1 +
 drivers/spi/spi-cadence-quadspi.c                  | 1290 ++++++++++++++++++++
 drivers/spi/spi-cadence-quadspi.h                  |  272 +++++
 5 files changed, 1638 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/spi/cadence,qspi.yaml
 create mode 100644 drivers/spi/spi-cadence-quadspi.c
 create mode 100644 drivers/spi/spi-cadence-quadspi.h

-- 
2.11.0


             reply	other threads:[~2019-10-30  8:12 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-30  8:11 Ramuthevar,Vadivel MuruganX [this message]
2019-10-30  8:11 ` [PATCH v2 1/2] dt-bindings: spi: Add schema for Cadence QSPI Controller driver Ramuthevar,Vadivel MuruganX
2019-11-05  4:30   ` Vignesh Raghavendra
2019-11-11  7:35     ` Ramuthevar, Vadivel MuruganX
2019-10-30  8:11 ` [PATCH v2 2/2] spi: cadence-quadpsi: Add support for the Cadence QSPI controller Ramuthevar,Vadivel MuruganX
2019-11-01 15:19   ` kbuild test robot
2019-11-01 15:19   ` [PATCH] spi: cadence-quadpsi: fix platform_get_irq.cocci warnings kbuild test robot
2019-11-01 17:36   ` [PATCH v2 2/2] spi: cadence-quadpsi: Add support for the Cadence QSPI controller kbuild test robot
2019-11-01 17:36   ` [RFC PATCH] spi: cadence-quadpsi: cadence_qspi_init_timeout() can be static kbuild test robot
2019-11-07  5:44   ` [PATCH v2 2/2] spi: cadence-quadpsi: Add support for the Cadence QSPI controller Vignesh Raghavendra
2019-11-11  7:32     ` Ramuthevar, Vadivel MuruganX

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=20191030081155.29947-1-vadivel.muruganx.ramuthevar@linux.intel.com \
    --to=vadivel.muruganx.ramuthevar@linux.intel.com \
    --cc=broonie@kernel.org \
    --cc=cheol.yong.kim@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=qi-ming.wu@intel.com \
    --cc=robh+dt@kernel.org \
    --cc=vigneshr@ti.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).