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


Groups > linux.kernel > #1368179

RE: [LINUX PATCH 1/2] mtd: Added dummy entry in the spi_transfer structure.

From Lakshmi Sai Krishna Potthuri <lakshmi.sai.krishna.potthuri@xilinx.com>
Newsgroups linux.kernel
Subject RE: [LINUX PATCH 1/2] mtd: Added dummy entry in the spi_transfer structure.
Date 2016-03-31 13:20 +0200
Message-ID <riINQ-451-9@gated-at.bofh.it> (permalink)
References (3 earlier) <rfrq9-2RD-1@gated-at.bofh.it> <rgAro-2pI-25@gated-at.bofh.it> <rgBx8-3pJ-15@gated-at.bofh.it> <riEAy-T6-11@gated-at.bofh.it> <riG9l-29W-29@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hi,

>-----Original Message-----
>From: geert.uytterhoeven@gmail.com
>[mailto:geert.uytterhoeven@gmail.com] On Behalf Of Geert Uytterhoeven
>Sent: Thursday, March 31, 2016 1:58 PM
>To: Lakshmi Sai Krishna Potthuri <lakshmis@xilinx.com>
>Cc: Mark Brown <broonie@kernel.org>; Michal Simek <michals@xilinx.com>;
>Soren Brinkmann <sorenb@xilinx.com>; David Woodhouse
><dwmw2@infradead.org>; Brian Norris <computersforpeace@gmail.com>;
>Javier Martinez Canillas <javier@osg.samsung.com>; Boris Brezillon
><boris.brezillon@free-electrons.com>; Stephen Warren
><swarren@nvidia.com>; Geert Uytterhoeven <geert+renesas@glider.be>;
>Andrew F. Davis <afd@ti.com>; Marek Vasut <marex@denx.de>; Jagan Teki
><jteki@openedev.com>; Rafał Miłecki <zajec5@gmail.com>; linux-
>mtd@lists.infradead.org; linux-kernel@vger.kernel.org; linux-
>spi@vger.kernel.org; linux-arm-kernel@lists.infradead.org; Harini Katakam
><harinik@xilinx.com>; Punnaiah Choudary Kalluri <punnaia@xilinx.com>;
>Anirudha Sarangi <anirudh@xilinx.com>; saikrishna12468@gmail.com
>Subject: Re: [LINUX PATCH 1/2] mtd: Added dummy entry in the spi_transfer
>structure.
>
>On Thu, Mar 31, 2016 at 8:14 AM, Lakshmi Sai Krishna Potthuri
><lakshmi.sai.krishna.potthuri@xilinx.com> wrote:
>>>> >This is really not what I'd expect to happen, I'd expect that these
>dummy
>>>> >cycles would be in addition to the actual data (see my request for better
>>>> >documentation...).  If they overlap with the data then what is the point
>in
>>>> >specifying this?  It's more work for the host, what benefit do we get
>from
>>>> >doing it over just handing it like a normal byte?
>>>
>>>> len field in the transfer structure contains dummy bytes along with actual
>>>data
>>>> bytes, controllers which requires dummy bytes use len field and simply
>>>Ignore
>>>> the dummy field (contains only no of cycles)added in this patch.
>Controllers
>>>> (like ZynqMP GQSPI) expects dummy in cycles won't work directly by
>using
>>>> len field because host driver doesn't know that len field of a particular
>>>transfer
>>>> includes dummy bytes or not (and also number of dummy bytes included
>in
>>>len
>>>> field). In such cases driver use this dummy field to identify the number of
>>>dummy
>>>> cycles and based on that it will send the required number of dummy
>cycles
>>>(which
>>>> i did in the second patch).
>>>
>>>This doesn't make any sense at all to me.  Why does the controller care
>>>what the bytes being sent to and from the device mean?
>>
>> From the flash point of view, it expects the controller to send the dummy
>> on 1/2/4 lines based on the command. For Quad commands, flash expects
>> 4 lines to be active during dummy phase. Similarly, 2 lines for dual
>> Commands and 1 line for normal/fast commands.
>> Since len field contains total number of cmd+addr+dummy bytes,
>> host driver should take care of sending these bytes on their respective
>> bus widths. Knowing when the dummy is being sent also helps in
>> the correct switching of IO pads (since the data lines are bidirectional)
>> ZynqMP GQSPI is a generic controller, majorly interfaced to flash devices.
>> It seems reasonable for it to know the above information from
>> the flash layer. Adding "dummy" cycles entry should be useful to any
>> controller that cares about it without affecting other spi/qspi controllers.
>
>The m25p80 driver already uses dummy cycles, using real spi_transfer
>structs, which have tx_nbits/rx_nbits fields to indicate how many data lines
>to use.

m25p80 implementation just send command, address and dummy together
with tx_nbit field as 1 and host driver can't differentiate between them.
Command and address go on one line and dummy should send based
on the command as explained my previous mail.

Regards
Sai Krishna


This email and any attachments are intended for the sole use of the named recipient(s) and contain(s) confidential information that may be proprietary, privileged or copyrighted under applicable law. If you are not the intended recipient, do not read, copy, or forward this email message or any attachments. Delete this email message and any attachments immediately.

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


Thread

[LINUX PATCH 1/2] mtd: Added dummy entry in the spi_transfer structure. P L Sai Krishna <lakshmi.sai.krishna.potthuri@xilinx.com> - 2016-03-21 13:40 +0100
  [LINUX PATCH 2/2] spi:zynqmp:gqspi: Added separate dummy entry. P L Sai Krishna <lakshmi.sai.krishna.potthuri@xilinx.com> - 2016-03-21 14:00 +0100
  Re: [LINUX PATCH 1/2] mtd: Added dummy entry in the spi_transfer  structure. Mark Brown <broonie@kernel.org> - 2016-03-21 14:10 +0100
    RE: [LINUX PATCH 1/2] mtd: Added dummy entry in the spi_transfer  structure. Lakshmi Sai Krishna Potthuri   <lakshmi.sai.krishna.potthuri@xilinx.com> - 2016-03-22 07:50 +0100
      Re: [LINUX PATCH 1/2] mtd: Added dummy entry in the spi_transfer  structure. Mark Brown <broonie@kernel.org> - 2016-03-22 11:10 +0100
        RE: [LINUX PATCH 1/2] mtd: Added dummy entry in the spi_transfer  structure. Lakshmi Sai Krishna Potthuri   <lakshmi.sai.krishna.potthuri@xilinx.com> - 2016-03-25 15:00 +0100
          Re: [LINUX PATCH 1/2] mtd: Added dummy entry in the spi_transfer  structure. Mark Brown <broonie@kernel.org> - 2016-03-25 16:10 +0100
            RE: [LINUX PATCH 1/2] mtd: Added dummy entry in the spi_transfer  structure. Lakshmi Sai Krishna Potthuri   <lakshmi.sai.krishna.potthuri@xilinx.com> - 2016-03-31 08:50 +0200
              Re: [LINUX PATCH 1/2] mtd: Added dummy entry in the spi_transfer structure. Geert Uytterhoeven <geert@linux-m68k.org> - 2016-03-31 10:30 +0200
                RE: [LINUX PATCH 1/2] mtd: Added dummy entry in the spi_transfer  structure. Lakshmi Sai Krishna Potthuri   <lakshmi.sai.krishna.potthuri@xilinx.com> - 2016-03-31 13:20 +0200

csiph-web