<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/include/linux/spi/spi-mem.h, branch linux-5.11.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-5.11.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-5.11.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2020-07-14T16:29:38Z</updated>
<entry>
<title>spi: spi-mem: allow specifying a command's extension</title>
<updated>2020-07-14T16:29:38Z</updated>
<author>
<name>Pratyush Yadav</name>
<email>p.yadav@ti.com</email>
</author>
<published>2020-06-23T18:30:15Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=caf72df48be32c39f74287976ae843501ae06949'/>
<id>urn:sha1:caf72df48be32c39f74287976ae843501ae06949</id>
<content type='text'>
In xSPI mode, flashes expect 2-byte opcodes. The second byte is called
the "command extension". There can be 3 types of extensions in xSPI:
repeat, invert, and hex. When the extension type is "repeat", the same
opcode is sent twice. When it is "invert", the second byte is the
inverse of the opcode. When it is "hex" an additional opcode byte based
is sent with the command whose value can be anything.

So, make opcode a 16-bit value and add a 'nbytes', similar to how
multiple address widths are handled.

Some places use sizeof(op-&gt;cmd.opcode). Replace them with op-&gt;cmd.nbytes

The spi-mxic and spi-zynq-qspi drivers directly use op-&gt;cmd.opcode as a
buffer. Now that opcode is a 2-byte field, this can result in different
behaviour depending on if the machine is little endian or big endian.
Extract the opcode in a local 1-byte variable and use that as the buffer
instead. Both these drivers would reject multi-byte opcodes in their
supports_op() hook anyway, so we only need to worry about single-byte
opcodes for now.

The above two changes are put in this commit to keep the series
bisectable.

Signed-off-by: Pratyush Yadav &lt;p.yadav@ti.com&gt;
Reviewed-by: Tudor Ambarus &lt;tudor.ambarus@microchip.com&gt;
Link: https://lore.kernel.org/r/20200623183030.26591-3-p.yadav@ti.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>spi: spi-mem: allow specifying whether an op is DTR or not</title>
<updated>2020-07-14T16:29:37Z</updated>
<author>
<name>Pratyush Yadav</name>
<email>p.yadav@ti.com</email>
</author>
<published>2020-06-23T18:30:14Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=4c5e2bba30e49b970a0fd07b43e0b7a3b5fd5ea7'/>
<id>urn:sha1:4c5e2bba30e49b970a0fd07b43e0b7a3b5fd5ea7</id>
<content type='text'>
Each phase is given a separate 'dtr' field so mixed protocols like
4S-4D-4D can be supported.

Signed-off-by: Pratyush Yadav &lt;p.yadav@ti.com&gt;
Reviewed-by: Tudor Ambarus &lt;tudor.ambarus@microchip.com&gt;
Link: https://lore.kernel.org/r/20200623183030.26591-2-p.yadav@ti.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>spi: spi-mem: Make spi_mem_default_supports_op() static inline</title>
<updated>2019-05-02T01:37:46Z</updated>
<author>
<name>YueHaibing</name>
<email>yuehaibing@huawei.com</email>
</author>
<published>2019-04-10T13:18:28Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=b5881b153bc81d63a5a7e82a35e8a4bdbe1f8c73'/>
<id>urn:sha1:b5881b153bc81d63a5a7e82a35e8a4bdbe1f8c73</id>
<content type='text'>
Stub helper spi_mem_default_supports_op() should
be set to static inline

Signed-off-by: YueHaibing &lt;yuehaibing@huawei.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>spi: spi-mem: Fix build error without CONFIG_SPI_MEM</title>
<updated>2019-05-02T01:37:45Z</updated>
<author>
<name>YueHaibing</name>
<email>yuehaibing@huawei.com</email>
</author>
<published>2019-04-08T14:39:49Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=72e6841608b9ce7e04515ed43693b2878936c93a'/>
<id>urn:sha1:72e6841608b9ce7e04515ed43693b2878936c93a</id>
<content type='text'>
When building with CONFIG_SPI_MEM is not set
gc warns this:

drivers/spi/spi-zynq-qspi.o: In function `zynq_qspi_supports_op':
spi-zynq-qspi.c:(.text+0x1da): undefined reference to `spi_mem_default_supports_op'

Fixes: 67dca5e580f1 ("spi: spi-mem: Add support for Zynq QSPI controller")
Signed-off-by: YueHaibing &lt;yuehaibing@huawei.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>spi: spi-mem: export spi_mem_default_supports_op()</title>
<updated>2019-04-03T04:23:54Z</updated>
<author>
<name>Naga Sureshkumar Relli</name>
<email>naga.sureshkumar.relli@xilinx.com</email>
</author>
<published>2019-04-01T07:59:00Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=46109648052fe778c75f199d72255c899578d6f7'/>
<id>urn:sha1:46109648052fe778c75f199d72255c899578d6f7</id>
<content type='text'>
Export spi_mem_default_supports_op(), so that controller drivers
can use this.
spi-mem driver already exports this using EXPORT_SYMBOL,
but not declared it in spi-mem.h.
This patch declares spi_mem_default_supports_op() in spi-mem.h and
also removes the static from the function prototype.

Signed-off-by: Naga Sureshkumar Relli &lt;naga.sureshkumar.relli@xilinx.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>spi: spi-mem: Add devm_spi_mem_dirmap_{create,destroy}()</title>
<updated>2019-01-21T17:58:12Z</updated>
<author>
<name>Boris Brezillon</name>
<email>bbrezillon@kernel.org</email>
</author>
<published>2019-01-19T15:04:12Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=1fc1b63638da1accb27264a507b23aa6863c3852'/>
<id>urn:sha1:1fc1b63638da1accb27264a507b23aa6863c3852</id>
<content type='text'>
Since direct mapping descriptors usually the same lifetime as the SPI
MEM device adding devm_ variants of the spi_mem_dirmap_{create,destroy}()
should greatly simplify error/remove path of spi-mem drivers making use
of the direct mapping API.

Signed-off-by: Boris Brezillon &lt;bbrezillon@kernel.org&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>spi: spi-mem: Add a new API to support direct mapping</title>
<updated>2018-11-20T16:26:57Z</updated>
<author>
<name>Boris Brezillon</name>
<email>boris.brezillon@bootlin.com</email>
</author>
<published>2018-11-06T16:05:33Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=aa167f3fed0c37e0e4c707d4331d827661f46644'/>
<id>urn:sha1:aa167f3fed0c37e0e4c707d4331d827661f46644</id>
<content type='text'>
Most modern SPI controllers can directly map a SPI memory (or a portion
of the SPI memory) in the CPU address space. Most of the time this
brings significant performance improvements as it automates the whole
process of sending SPI memory operations every time a new region is
accessed.

This new API allows SPI memory drivers to create direct mappings and
then use them to access the memory instead of using spi_mem_exec_op().

Signed-off-by: Boris Brezillon &lt;boris.brezillon@bootlin.com&gt;
Reviewed-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>spi: spi-mem: Add SPI_MEM_NO_DATA to the spi_mem_data_dir enum</title>
<updated>2018-11-20T16:26:26Z</updated>
<author>
<name>Boris Brezillon</name>
<email>boris.brezillon@bootlin.com</email>
</author>
<published>2018-11-06T16:05:31Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=0ebb261a0b2d090de618a383d2378d4a00834958'/>
<id>urn:sha1:0ebb261a0b2d090de618a383d2378d4a00834958</id>
<content type='text'>
When defining spi_mem_op templates we don't necessarily know the size
that will be passed when the template is actually used, and basing the
supports_op() check on op-&gt;data.nbytes to know whether there will be
data transferred for a specific operation is this not possible.

Add SPI_MEM_NO_DATA to the spi_mem_data_dir enum so that we can base
our checks on op-&gt;data.dir instead of op-&gt;data.nbytes.

Signed-off-by: Boris Brezillon &lt;boris.brezillon@bootlin.com&gt;
Reviewed-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>spi: spi-mem: Add missing word in the SPI_MEM_DATA_OUT description</title>
<updated>2018-11-20T16:26:02Z</updated>
<author>
<name>Boris Brezillon</name>
<email>boris.brezillon@bootlin.com</email>
</author>
<published>2018-11-06T16:05:30Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=6afe76a6723975391d06c42a422370a588395f84'/>
<id>urn:sha1:6afe76a6723975391d06c42a422370a588395f84</id>
<content type='text'>
Missing 'to' in the SPI_MEM_DATA_OUT description.

Signed-off-by: Boris Brezillon &lt;boris.brezillon@bootlin.com&gt;
Reviewed-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'spi-fix-v4.19-rc5' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi</title>
<updated>2018-09-29T01:04:06Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2018-09-29T01:04:06Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=2f19e7a7e63a04f4bbaf327d9d0e69ac800b2b8f'/>
<id>urn:sha1:2f19e7a7e63a04f4bbaf327d9d0e69ac800b2b8f</id>
<content type='text'>
Mark writes:
  "spi: Fixes for v4.19

   Quite a few fixes for the Renesas drivers in here, plus a fix for the
   Tegra driver and some documentation fixes for the recently added
   spi-mem code.  The Tegra fix is relatively large but fairly
   straightforward and mechanical, it runs on probe so it's been
   reasonably well covered in -next testing."

* tag 'spi-fix-v4.19-rc5' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi:
  spi: spi-mem: Move the DMA-able constraint doc to the kerneldoc header
  spi: spi-mem: Add missing description for data.nbytes field
  spi: rspi: Fix interrupted DMA transfers
  spi: rspi: Fix invalid SPI use during system suspend
  spi: sh-msiof: Fix handling of write value for SISTR register
  spi: sh-msiof: Fix invalid SPI use during system suspend
  spi: gpio: Fix copy-and-paste error
  spi: tegra20-slink: explicitly enable/disable clock
</content>
</entry>
</feed>
