All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vignesh R <vigneshr@ti.com>
To: Mark Brown <broonie@kernel.org>,
	David Woodhouse <dwmw2@infradead.org>,
	Brian Norris <computersforpeace@gmail.com>,
	Tony Lindgren <tony@atomide.com>,
	Russell King <linux@arm.linux.org.uk>
Cc: Huang Shijie <b32955@freescale.com>, Vignesh R <vigneshr@ti.com>,
	<linux-omap@vger.kernel.org>, <devicetree@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>, <linux-mtd@lists.infradead.org>,
	<linux-spi@vger.kernel.org>
Subject: [RFC PATCH 1/5] spi: introduce flag for memory mapped read
Date: Tue, 28 Jul 2015 14:11:12 +0530	[thread overview]
Message-ID: <1438072876-16338-2-git-send-email-vigneshr@ti.com> (raw)
In-Reply-To: <1438072876-16338-1-git-send-email-vigneshr@ti.com>

TI QSPI controller has SFI translator which exposes entire flash memory
as memory mapped region for read. With this interface, the CPU
can copy data from flash using normal memcpy call. SFI translator
takes care of generating appropriate SPI signals to read data from
flash. This interface works only with SPI flash memories and cannot be
used with other SPI devices.
Introduce use_mmap_read field in spi_message struct. This can be set by
mtd devices (m25p80) to indicate to spi-master (ti-qspi) to perform
memory mapped read. This helps to distinguish whether the spi-message is
from mtd layer(hence mmap read is possible) or by other spi devices.

Signed-off-by: Vignesh R <vigneshr@ti.com>
---
 include/linux/spi/spi.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h
index d673072346f2..f1a0329ee63f 100644
--- a/include/linux/spi/spi.h
+++ b/include/linux/spi/spi.h
@@ -640,6 +640,8 @@ struct spi_transfer {
  * @actual_length: the total number of bytes that were transferred in all
  *	successful segments
  * @status: zero for success, else negative errno
+ * @use_mmap_mode: Indicate to spi master to perform memory mapped
+ *	read if possible.
  * @queue: for use by whichever driver currently owns the message
  * @state: for use by whichever driver currently owns the message
  *
@@ -681,6 +683,7 @@ struct spi_message {
 	unsigned		frame_length;
 	unsigned		actual_length;
 	int			status;
+	bool			use_mmap_mode;
 
 	/* for optional use by whatever driver currently owns the
 	 * spi_message ...  between calls to spi_async and then later
-- 
2.4.6


WARNING: multiple messages have this Message-ID (diff)
From: Vignesh R <vigneshr@ti.com>
To: Mark Brown <broonie@kernel.org>,
	David Woodhouse <dwmw2@infradead.org>,
	Brian Norris <computersforpeace@gmail.com>,
	Tony Lindgren <tony@atomide.com>,
	Russell King <linux@arm.linux.org.uk>
Cc: Huang Shijie <b32955@freescale.com>, Vignesh R <vigneshr@ti.com>,
	linux-omap@vger.kernel.org, devicetree@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org,
	linux-spi@vger.kernel.org
Subject: [RFC PATCH 1/5] spi: introduce flag for memory mapped read
Date: Tue, 28 Jul 2015 14:11:12 +0530	[thread overview]
Message-ID: <1438072876-16338-2-git-send-email-vigneshr@ti.com> (raw)
In-Reply-To: <1438072876-16338-1-git-send-email-vigneshr@ti.com>

TI QSPI controller has SFI translator which exposes entire flash memory
as memory mapped region for read. With this interface, the CPU
can copy data from flash using normal memcpy call. SFI translator
takes care of generating appropriate SPI signals to read data from
flash. This interface works only with SPI flash memories and cannot be
used with other SPI devices.
Introduce use_mmap_read field in spi_message struct. This can be set by
mtd devices (m25p80) to indicate to spi-master (ti-qspi) to perform
memory mapped read. This helps to distinguish whether the spi-message is
from mtd layer(hence mmap read is possible) or by other spi devices.

Signed-off-by: Vignesh R <vigneshr@ti.com>
---
 include/linux/spi/spi.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h
index d673072346f2..f1a0329ee63f 100644
--- a/include/linux/spi/spi.h
+++ b/include/linux/spi/spi.h
@@ -640,6 +640,8 @@ struct spi_transfer {
  * @actual_length: the total number of bytes that were transferred in all
  *	successful segments
  * @status: zero for success, else negative errno
+ * @use_mmap_mode: Indicate to spi master to perform memory mapped
+ *	read if possible.
  * @queue: for use by whichever driver currently owns the message
  * @state: for use by whichever driver currently owns the message
  *
@@ -681,6 +683,7 @@ struct spi_message {
 	unsigned		frame_length;
 	unsigned		actual_length;
 	int			status;
+	bool			use_mmap_mode;
 
 	/* for optional use by whatever driver currently owns the
 	 * spi_message ...  between calls to spi_async and then later
-- 
2.4.6

WARNING: multiple messages have this Message-ID (diff)
From: vigneshr@ti.com (Vignesh R)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH 1/5] spi: introduce flag for memory mapped read
Date: Tue, 28 Jul 2015 14:11:12 +0530	[thread overview]
Message-ID: <1438072876-16338-2-git-send-email-vigneshr@ti.com> (raw)
In-Reply-To: <1438072876-16338-1-git-send-email-vigneshr@ti.com>

TI QSPI controller has SFI translator which exposes entire flash memory
as memory mapped region for read. With this interface, the CPU
can copy data from flash using normal memcpy call. SFI translator
takes care of generating appropriate SPI signals to read data from
flash. This interface works only with SPI flash memories and cannot be
used with other SPI devices.
Introduce use_mmap_read field in spi_message struct. This can be set by
mtd devices (m25p80) to indicate to spi-master (ti-qspi) to perform
memory mapped read. This helps to distinguish whether the spi-message is
from mtd layer(hence mmap read is possible) or by other spi devices.

Signed-off-by: Vignesh R <vigneshr@ti.com>
---
 include/linux/spi/spi.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h
index d673072346f2..f1a0329ee63f 100644
--- a/include/linux/spi/spi.h
+++ b/include/linux/spi/spi.h
@@ -640,6 +640,8 @@ struct spi_transfer {
  * @actual_length: the total number of bytes that were transferred in all
  *	successful segments
  * @status: zero for success, else negative errno
+ * @use_mmap_mode: Indicate to spi master to perform memory mapped
+ *	read if possible.
  * @queue: for use by whichever driver currently owns the message
  * @state: for use by whichever driver currently owns the message
  *
@@ -681,6 +683,7 @@ struct spi_message {
 	unsigned		frame_length;
 	unsigned		actual_length;
 	int			status;
+	bool			use_mmap_mode;
 
 	/* for optional use by whatever driver currently owns the
 	 * spi_message ...  between calls to spi_async and then later
-- 
2.4.6

  reply	other threads:[~2015-07-28  8:43 UTC|newest]

Thread overview: 150+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-28  8:41 [RFC PATCH 0/5] Add memory mapped read support for TI QSPI Vignesh R
2015-07-28  8:41 ` Vignesh R
2015-07-28  8:41 ` Vignesh R
2015-07-28  8:41 ` Vignesh R [this message]
2015-07-28  8:41   ` [RFC PATCH 1/5] spi: introduce flag for memory mapped read Vignesh R
2015-07-28  8:41   ` Vignesh R
2015-07-31 18:17   ` Mark Brown
2015-07-31 18:17     ` Mark Brown
2015-07-31 18:17     ` Mark Brown
2015-08-03  4:57     ` Vignesh R
2015-08-03  4:57       ` Vignesh R
2015-08-03  4:57       ` Vignesh R
2015-08-04 15:51       ` Mark Brown
2015-08-04 15:51         ` Mark Brown
2015-08-04 17:59         ` R, Vignesh
2015-08-04 17:59           ` R, Vignesh
2015-08-04 17:59           ` R, Vignesh
2015-08-04 17:59           ` R, Vignesh
2015-08-05  5:21           ` Michal Suchanek
2015-08-05  5:21             ` Michal Suchanek
2015-08-05  5:21             ` Michal Suchanek
2015-08-05  5:21             ` Michal Suchanek
2015-08-05  5:35             ` Vignesh R
2015-08-05  5:35               ` Vignesh R
2015-08-05  5:35               ` Vignesh R
2015-08-05  5:35               ` Vignesh R
2015-08-05  5:57               ` Michal Suchanek
2015-08-05  5:57                 ` Michal Suchanek
2015-08-05  5:57                 ` Michal Suchanek
2015-08-05  5:57                 ` Michal Suchanek
2015-08-05 11:50           ` Mark Brown
2015-08-05 11:50             ` Mark Brown
2015-08-05 12:40             ` Michal Suchanek
2015-08-05 12:40               ` Michal Suchanek
2015-08-05 12:40               ` Michal Suchanek
2015-08-05 12:40               ` Michal Suchanek
2015-08-05 12:44               ` Mark Brown
2015-08-05 12:44                 ` Mark Brown
2015-08-05 12:44                 ` Mark Brown
2015-08-05 12:44                 ` Mark Brown
2015-08-05 12:56                 ` Michal Suchanek
2015-08-05 12:56                   ` Michal Suchanek
2015-08-05 12:56                   ` Michal Suchanek
2015-08-06  9:02                   ` Mark Brown
2015-08-06  9:02                     ` Mark Brown
2015-08-06  9:02                     ` Mark Brown
2015-08-06 10:01                     ` Michal Suchanek
2015-08-06 10:01                       ` Michal Suchanek
2015-08-06 10:01                       ` Michal Suchanek
2015-08-06 10:22                       ` Russell King - ARM Linux
2015-08-06 10:22                         ` Russell King - ARM Linux
2015-08-06 10:22                         ` Russell King - ARM Linux
2015-08-06 10:22                         ` Russell King - ARM Linux
2015-08-06 11:00                         ` Mark Brown
2015-08-06 11:00                           ` Mark Brown
2015-08-06 11:00                           ` Mark Brown
2015-08-06 11:02                         ` Michal Suchanek
2015-08-06 11:02                           ` Michal Suchanek
2015-08-06 11:02                           ` Michal Suchanek
2015-08-06 11:02                           ` Michal Suchanek
2015-08-06 12:25                         ` Vignesh R
2015-08-06 12:25                           ` Vignesh R
2015-08-06 12:25                           ` Vignesh R
2015-08-06 12:25                           ` Vignesh R
2015-08-06 12:25                           ` Vignesh R
2015-08-06 13:51                           ` Russell King - ARM Linux
2015-08-06 13:51                             ` Russell King - ARM Linux
2015-08-06 13:51                             ` Russell King - ARM Linux
2015-08-06 16:14                             ` Geert Uytterhoeven
2015-08-06 16:14                               ` Geert Uytterhoeven
2015-08-06 16:14                               ` Geert Uytterhoeven
2015-08-06 16:14                               ` Geert Uytterhoeven
2015-08-06 18:20                               ` Michal Suchanek
2015-08-06 18:20                                 ` Michal Suchanek
2015-08-06 18:20                                 ` Michal Suchanek
2015-08-06 18:20                                 ` Michal Suchanek
2015-08-06 21:33                               ` Russell King - ARM Linux
2015-08-06 21:33                                 ` Russell King - ARM Linux
2015-08-06 21:33                                 ` Russell King - ARM Linux
2015-08-06 21:33                                 ` Russell King - ARM Linux
2015-08-07  7:38                                 ` Michal Suchanek
2015-08-07  7:38                                   ` Michal Suchanek
2015-08-07  7:38                                   ` Michal Suchanek
2015-08-07  7:38                                   ` Michal Suchanek
2015-08-07  8:35                                   ` Vignesh R
2015-08-07  8:35                                     ` Vignesh R
2015-08-07  8:35                                     ` Vignesh R
2015-08-07  8:25                                 ` Martin Sperl
2015-08-07  8:25                                   ` Martin Sperl
2015-08-07  8:25                                   ` Martin Sperl
2015-08-07  8:25                                   ` Martin Sperl
2015-08-07 10:16                                   ` Michal Suchanek
2015-08-07 10:16                                     ` Michal Suchanek
2015-08-07 10:16                                     ` Michal Suchanek
2015-08-12  9:27                                     ` Vignesh R
2015-08-12  9:27                                       ` Vignesh R
2015-08-12  9:27                                       ` Vignesh R
2015-08-12  9:27                                       ` Vignesh R
2015-08-06 16:46                             ` Mark Brown
2015-08-06 16:46                               ` Mark Brown
2015-08-06 16:46                               ` Mark Brown
2015-08-06 16:46                               ` Mark Brown
2015-08-06 18:20                           ` Mark Brown
2015-08-06 18:20                             ` Mark Brown
2015-08-06 18:20                             ` Mark Brown
2015-08-06 11:23                       ` Mark Brown
2015-08-06 11:23                         ` Mark Brown
2015-08-06 11:23                         ` Mark Brown
2015-08-06 11:23                         ` Mark Brown
2015-08-06 11:42                         ` Michal Suchanek
2015-08-06 11:42                           ` Michal Suchanek
2015-08-06 11:42                           ` Michal Suchanek
2015-08-06 16:03                           ` Mark Brown
2015-08-06 16:03                             ` Mark Brown
2015-08-06 16:03                             ` Mark Brown
2015-07-28  8:41 ` [RFC PATCH 2/5] spi: spi-ti-qspi: Add memory mapped read support Vignesh R
2015-07-28  8:41   ` Vignesh R
2015-07-28  8:41   ` Vignesh R
2015-07-28  8:41 ` [RFC PATCH 3/5] mtd: devices: m25p80: set flag to request memory mapped read Vignesh R
2015-07-28  8:41   ` Vignesh R
2015-07-28  8:41   ` Vignesh R
2015-07-28  8:41 ` [RFC PATCH 4/5] ARM: dts: DRA7: Add memory map region entries for qspi Vignesh R
2015-07-28  8:41   ` Vignesh R
2015-07-28  8:41   ` Vignesh R
2015-07-31 13:48   ` Sekhar Nori
2015-07-31 13:48     ` Sekhar Nori
2015-07-31 13:48     ` Sekhar Nori
2015-08-03  5:09     ` Vignesh R
2015-08-03  5:09       ` Vignesh R
2015-08-03  5:09       ` Vignesh R
2015-08-03  5:09       ` Vignesh R
2015-07-31 18:19   ` Mark Brown
2015-07-31 18:19     ` Mark Brown
2015-07-31 18:19     ` Mark Brown
2015-08-03  5:02     ` Vignesh R
2015-08-03  5:02       ` Vignesh R
2015-08-03  5:02       ` Vignesh R
2015-08-03  5:02       ` Vignesh R
2015-08-04 15:52       ` Mark Brown
2015-08-04 15:52         ` Mark Brown
2015-08-04 15:52         ` Mark Brown
2015-07-31 21:28   ` Brian Norris
2015-07-31 21:28     ` Brian Norris
2015-08-03  5:06     ` Vignesh R
2015-08-03  5:06       ` Vignesh R
2015-08-03  5:06       ` Vignesh R
2015-08-03  5:06       ` Vignesh R
2015-07-28  8:41 ` [RFC PATCH 5/5] ARM: dts: AM4372: " Vignesh R
2015-07-28  8:41   ` Vignesh R
2015-07-28  8:41   ` Vignesh R

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=1438072876-16338-2-git-send-email-vigneshr@ti.com \
    --to=vigneshr@ti.com \
    --cc=b32955@freescale.com \
    --cc=broonie@kernel.org \
    --cc=computersforpeace@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dwmw2@infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=tony@atomide.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 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.