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


Groups > linux.kernel > #1379023

Re: [LINUX PATCH v2 1/3] spi: Added dummy_cycle entry in the spi_transfer structure.

From Cyrille Pitchen <cyrille.pitchen@atmel.com>
Newsgroups linux.kernel
Subject Re: [LINUX PATCH v2 1/3] spi: Added dummy_cycle entry in the spi_transfer structure.
Date 2016-04-14 17:30 +0200
Message-ID <rnRnt-3WP-29@gated-at.bofh.it> (permalink)
References <rljgf-5hz-27@gated-at.bofh.it> <rljJg-5O0-13@gated-at.bofh.it> <rnlxg-49c-3@gated-at.bofh.it> <rnKvE-75X-13@gated-at.bofh.it> <rnLi3-7rI-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Le 14/04/2016 10:57, Mark Brown a écrit :
> On Thu, Apr 14, 2016 at 10:06:55AM +0200, Cyrille Pitchen wrote:
> 
>> I understand but you propose to patch both the SPI layer and the m25p80 driver
>> to introduce some support which is already provided by the "spi_flash_read"
>> hook: struct spi_flash_read_message has already a "dummy_bytes" field.
>> IMHO, it looks redundant.
> 
> My understanding is that this is intended for dummy bits rather than
> dummy bytes.
> 

dummy_bits == (dummy_bytes * 8) and
dummy_cycles == ((dummy_bytes * 8) / addr_nbits)

witch addr_nbits in {1, 2, 4}

the struct_flash_read_message has both dummy_bytes and addr_nbits members.

The spi-nor framework seems to always provide a multiple of 8 for dummy *bits*.
I guess because the m25p80 driver only supports such number of dummy bits but
also because all SPI memories can be configured so their number of dummy cycles keeps the byte alignment for the data to follow.

It still allows to use less than 8 dummy *cycles*, for instance the factory
settings for Macronix Quad SPI memories are:
- 4 dummy cycles for Fast Read 1-2-2 (hence 8 dummy bits)
- 6 dummy cycles for Fast Read x-4-4 (hence 24 dummy bits)

AFAIK, only Micron QSPI memories could be configured so the number of dummy
cycles doesn't result in a multiple of 8 bits but theirs are not the
recommanded timings provided by the datasheet.

Micron factory settings are:
- 10 dummy cycles for Fast Read x-4-4 (hence 40 dummy bits)
- 8 dummy cycles for other Fast Reads.


Best regards,

Cyrille

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


Thread

[LINUX PATCH v2 1/3] spi: Added dummy_cycle entry in the spi_transfer structure. P L Sai Krishna <lakshmi.sai.krishna.potthuri@xilinx.com> - 2016-04-07 16:40 +0200
  [LINUX PATCH v2 3/3] spi:zynqmp:gqspi: Added separate dummy entry. P L Sai Krishna <lakshmi.sai.krishna.potthuri@xilinx.com> - 2016-04-07 16:50 +0200
  [LINUX PATCH v2 2/3] mtd:m25p80: Assigned number of dummy cycles to dummy_cycles. P L Sai Krishna <lakshmi.sai.krishna.potthuri@xilinx.com> - 2016-04-07 16:50 +0200
    Re: [LINUX PATCH v2 2/3] mtd:m25p80: Assigned number of dummy cycles  to dummy_cycles. kbuild test robot <lkp@intel.com> - 2016-04-07 17:10 +0200
  Re: [LINUX PATCH v2 1/3] spi: Added dummy_cycle entry in the  spi_transfer structure. Cyrille Pitchen <cyrille.pitchen@atmel.com> - 2016-04-07 17:10 +0200
    RE: [LINUX PATCH v2 1/3] spi: Added dummy_cycle entry in the  spi_transfer structure. Lakshmi Sai Krishna Potthuri   <lakshmi.sai.krishna.potthuri@xilinx.com> - 2016-04-13 07:30 +0200
      Re: [LINUX PATCH v2 1/3] spi: Added dummy_cycle entry in the  spi_transfer structure. Cyrille Pitchen <cyrille.pitchen@atmel.com> - 2016-04-14 10:10 +0200
        Re: [LINUX PATCH v2 1/3] spi: Added dummy_cycle entry in the  spi_transfer structure. Mark Brown <broonie@kernel.org> - 2016-04-14 11:00 +0200
          Re: [LINUX PATCH v2 1/3] spi: Added dummy_cycle entry in the  spi_transfer structure. Cyrille Pitchen <cyrille.pitchen@atmel.com> - 2016-04-14 17:30 +0200
  Re: [LINUX PATCH v2 1/3] spi: Added dummy_cycle entry in the  spi_transfer structure. Mark Brown <broonie@kernel.org> - 2016-04-12 08:20 +0200

csiph-web