linux/drivers/mtd/devices
Cyrille Pitchen 138f5dc61b mtd: m25p80: add support of SPI 1-2-2 and 1-4-4 protocols
Before this patch, m25p80_read() supported few SPI protocols:
- regular SPI 1-1-1
- SPI Dual Output 1-1-2
- SPI Quad Output 1-1-4
On the other hand, m25p80_write() only supported SPI 1-1-1.

This patch updates both m25p80_read() and m25p80_write() functions to let
them support SPI 1-2-2 and SPI 1-4-4 protocols for Fast Read and Page
Program SPI commands.

It adopts a conservative approach to avoid regressions. Hence the new
implementations try to be as close as possible to the old implementations,
so the main differences are:
- the tx_nbits values now being set properly for the spi_transfer
  structures carrying the (op code + address/dummy) bytes
- and the spi_transfer structure being split into 2 spi_transfer
  structures when the numbers of I/O lines are different for op code and
  for address/dummy byte transfers on the SPI bus.

Besides, the current spi-nor framework supports neither the SPI 2-2-2 nor
the SPI 4-4-4 protocols. So, for now, we don't need to update the
m25p80_{read|write}_reg() functions as SPI 1-1-1 is the only one possible
protocol.

Signed-off-by: Cyrille Pitchen <cyrille.pitchen@atmel.com>
Reviewed-by: Marek Vasut <marek.vasut@gmail.com>
2017-05-15 21:56:17 +02:00
..
bcm47xxsflash.c mtd: bcm47xxsflash: support reading flash out of mapping window 2017-02-08 15:07:59 -08:00
bcm47xxsflash.h mtd: bcm47xxsflash: support reading flash out of mapping window 2017-02-08 15:07:59 -08:00
block2mtd.c mm, fs: get rid of PAGE_CACHE_* and page_cache_{get,release} macros 2016-04-04 10:41:08 -07:00
docg3.c mtd: docg3: switch to mtd_ooblayout_ops 2016-04-19 22:05:56 +02:00
docg3.h mtd: docg3 add protection against concurrency 2012-03-27 01:03:27 +01:00
Kconfig MTD updates for v4.8: 2016-08-02 17:05:11 -04:00
lart.c ARM: 8638/1: mtd: lart: Rename partition defines to be prefixed with PART_ 2017-02-28 11:05:46 +00:00
m25p80.c mtd: m25p80: add support of SPI 1-2-2 and 1-4-4 protocols 2017-05-15 21:56:17 +02:00
Makefile mtd: powernv: Add powernv flash MTD abstraction driver 2015-06-11 13:23:30 +10:00
ms02-nv.c mtd: ms02-nv: remove superfluous name cast 2014-01-03 11:22:09 -08:00
ms02-nv.h
mtd_dataflash.c Linux 4.4-rc1 2015-11-15 20:31:29 -08:00
mtdram.c mtd: mtdram: Add parameter for setting writebuf size 2016-03-07 13:06:27 -08:00
phram.c mtd: phram: fix asm/io.h include usage 2014-10-22 01:59:30 -07:00
pmc551.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
powernv_flash.c powerpc/opal: Add inline function to get rc from an ASYNC_COMP opal_msg 2016-06-29 17:33:18 +10:00
serial_flash_cmds.h mtd: spi-nor: rename SPINOR_OP_* macros of the 4-byte address op codes 2017-02-10 13:55:03 +01:00
slram.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
spear_smi.c mtd: drop unnecessary partition parser data 2015-11-11 13:58:59 -08:00
sst25l.c MTD updates for 4.4-rc1: 2015-11-06 11:50:24 -08:00
st_spi_fsm.c mtd: spi-nor: rename SPINOR_OP_* macros of the 4-byte address op codes 2017-02-10 13:55:03 +01:00