Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1624479

Re: [PATCH v6 2/4] mtd: m25p80: add support of SPI 1-2-2 and 1-4-4 protocols

From Marek Vasut <marek.vasut@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH v6 2/4] mtd: m25p80: add support of SPI 1-2-2 and 1-4-4 protocols
Date 2017-04-17 00:40 +0200
Message-ID <tx0ZQ-Vi-13@gated-at.bofh.it> (permalink)
References <tx0dr-p3-3@gated-at.bofh.it> <tx0dr-p3-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 04/16/2017 11:41 PM, Cyrille Pitchen wrote:
> 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>

-- 
Best regards,
Marek Vasut

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH v6 2/4] mtd: m25p80: add support of SPI 1-2-2 and 1-4-4 protocols Cyrille Pitchen <cyrille.pitchen@atmel.com> - 2017-04-16 23:50 +0200
  Re: [PATCH v6 2/4] mtd: m25p80: add support of SPI 1-2-2 and 1-4-4  protocols Marek Vasut <marek.vasut@gmail.com> - 2017-04-17 00:40 +0200

csiph-web