All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Gupta, Pekon" <pekon@ti.com>
To: "thomas.langer@lantiq.com" <thomas.langer@lantiq.com>,
	"b32955@freescale.com" <b32955@freescale.com>
Cc: "broonie@kernel.org" <broonie@kernel.org>,
	"linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>,
	"spi-devel-general@lists.sourceforge.net"
	<spi-devel-general@lists.sourceforge.net>,
	"Poddar, Sourav" <sourav.poddar@ti.com>,
	"tpiepho@gmail.com" <tpiepho@gmail.com>,
	"wangyuhang2014@gmail.com" <wangyuhang2014@gmail.com>
Subject: RE: support DUAL and QUAD[patch v1]
Date: Mon, 22 Jul 2013 12:55:53 +0000	[thread overview]
Message-ID: <20980858CB6D3A4BAE95CA194937D5E73E9ECAFC@DBDE04.ent.ti.com> (raw)
In-Reply-To: <593AEF6C47F46446852B067021A273D6D97E2ED4@MUCSE039.lantiq.com>

Hi Shijie,
> 
> Hello Huang,
> 
> Huang Shijie wrote on 2013-07-22:
> > 于 2013年07月22日 17:56, Gupta, Pekon 写道:
> >> (b) struct spi_transfer: if each transfer of same message need to be
> >> transferred at different width. 	Example: Command @ Single-SPI
> >>   followed by Data @ Quad-SPI
> > I am coding the QuadSpi driver for Freescale's Vybrid now.
> >
> > I think we dot need to change the spi code. the spi layer should not
> > know the different width of the command and the data, let the qspi
> > driver does it.
> NO!
> >
> > In the m25p_probe(), after we knows that the qspi driver and flash
> > support the Quad read, so we can set the
> > m25p->read_opcode to 0xeb or 0xec. In the qspi driver, it can do the
> > real job.
> No, the qspi driver (as example here) should provide a transparent interface
> only,
> and the mp25p80 driver, which knows the details of the flash, has to provide
> the information
> which parts of a transfer has to be done in single-/dual- or quad-mode.
> Otherwise you always need to extend the qspi driver for new flashes.
> 
A QSPI interface can be connected to external-Flash and to Camera also.

- A camera interface may only require static config of Quad-mode.

- A Flash may require dynamic switching between Single-SPI or Quad-SPI
based on type of message, like Flash erase command need to be sent 
only Single-SPI mode, where as Read/Write Data can be done on
Quad-SPI mode to increase throughput. Here only the flash driver would 
know, which commands to send on Single-SPI and which on Quad-SPI. 

Thus, its better that channel-width information is passed by upper layer
driver along with spi_message, so that QSPI-controller driver can
dynamically switch between the modes.
This also keeps QSPI driver generic irrespective of devices connected to it.


with regards, pekon
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

WARNING: multiple messages have this Message-ID (diff)
From: "Gupta, Pekon" <pekon@ti.com>
To: "thomas.langer@lantiq.com" <thomas.langer@lantiq.com>,
	"b32955@freescale.com" <b32955@freescale.com>
Cc: "broonie@kernel.org" <broonie@kernel.org>,
	"linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>,
	"spi-devel-general@lists.sourceforge.net"
	<spi-devel-general@lists.sourceforge.net>,
	"Poddar, Sourav" <sourav.poddar@ti.com>,
	"tpiepho@gmail.com" <tpiepho@gmail.com>,
	"wangyuhang2014@gmail.com" <wangyuhang2014@gmail.com>
Subject: RE: support DUAL and QUAD[patch v1]
Date: Mon, 22 Jul 2013 12:55:53 +0000	[thread overview]
Message-ID: <20980858CB6D3A4BAE95CA194937D5E73E9ECAFC@DBDE04.ent.ti.com> (raw)
In-Reply-To: <593AEF6C47F46446852B067021A273D6D97E2ED4@MUCSE039.lantiq.com>

Hi Shijie,
> 
> Hello Huang,
> 
> Huang Shijie wrote on 2013-07-22:
> > 于 2013年07月22日 17:56, Gupta, Pekon 写道:
> >> (b) struct spi_transfer: if each transfer of same message need to be
> >> transferred at different width. 	Example: Command @ Single-SPI
> >>   followed by Data @ Quad-SPI
> > I am coding the QuadSpi driver for Freescale's Vybrid now.
> >
> > I think we dot need to change the spi code. the spi layer should not
> > know the different width of the command and the data, let the qspi
> > driver does it.
> NO!
> >
> > In the m25p_probe(), after we knows that the qspi driver and flash
> > support the Quad read, so we can set the
> > m25p->read_opcode to 0xeb or 0xec. In the qspi driver, it can do the
> > real job.
> No, the qspi driver (as example here) should provide a transparent interface
> only,
> and the mp25p80 driver, which knows the details of the flash, has to provide
> the information
> which parts of a transfer has to be done in single-/dual- or quad-mode.
> Otherwise you always need to extend the qspi driver for new flashes.
> 
A QSPI interface can be connected to external-Flash and to Camera also.

- A camera interface may only require static config of Quad-mode.

- A Flash may require dynamic switching between Single-SPI or Quad-SPI
based on type of message, like Flash erase command need to be sent 
only Single-SPI mode, where as Read/Write Data can be done on
Quad-SPI mode to increase throughput. Here only the flash driver would 
know, which commands to send on Single-SPI and which on Quad-SPI. 

Thus, its better that channel-width information is passed by upper layer
driver along with spi_message, so that QSPI-controller driver can
dynamically switch between the modes.
This also keeps QSPI driver generic irrespective of devices connected to it.


with regards, pekon

  reply	other threads:[~2013-07-22 12:55 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-10  8:34 SPI: support DUAL and QUAD[patch v1] yuhang wang
2013-07-10  8:34 ` yuhang wang
     [not found] ` <CAHSAbzP0Nc1ahf_ra6yDuMvV998_+EGcUOGDv5ifKaagYf+NOg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-07-16  8:08   ` Gupta, Pekon
2013-07-16  8:08     ` Gupta, Pekon
     [not found]     ` <20980858CB6D3A4BAE95CA194937D5E73E9E84D2-yXqyApvAXouIQmiDNMet8wC/G2K4zDHf@public.gmane.org>
2013-07-16  8:59       ` yuhang wang
2013-07-16  8:59         ` yuhang wang
     [not found]         ` <CAHSAbzMDOWo5oBqUHqMxybuDwUjFbczYwN+85gH+rxZ9z8u2Pw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-07-16  9:11           ` Gupta, Pekon
2013-07-16  9:11             ` Gupta, Pekon
     [not found]             ` <20980858CB6D3A4BAE95CA194937D5E73E9E851E-yXqyApvAXouIQmiDNMet8wC/G2K4zDHf@public.gmane.org>
2013-07-16 10:12               ` thomas.langer-th3ZBGNqt+7QT0dZR+AlfA
2013-07-16 10:12                 ` thomas.langer
     [not found]                 ` <593AEF6C47F46446852B067021A273D6D93B49E1-6yu8tajIPx7U45ihrnOXy0EOCMrvLtNR@public.gmane.org>
2013-07-16 11:20                   ` Gupta, Pekon
2013-07-16 11:20                     ` Gupta, Pekon
     [not found]                     ` <20980858CB6D3A4BAE95CA194937D5E73E9E85D0-yXqyApvAXouIQmiDNMet8wC/G2K4zDHf@public.gmane.org>
2013-07-16 11:59                       ` yuhang wang
2013-07-16 11:59                         ` yuhang wang
2013-07-16 12:18                       ` thomas.langer-th3ZBGNqt+7QT0dZR+AlfA
2013-07-16 12:18                         ` thomas.langer
2013-07-18  1:58                       ` yuhang wang
2013-07-18  1:58                         ` yuhang wang
     [not found]                         ` <CAHSAbzP5jqHwCm0qhu=DiNzpP0swqWHsQ0=MnF+EKaSN22E5hg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-07-18  2:25                           ` Trent Piepho
2013-07-18  2:25                             ` Trent Piepho
     [not found]                             ` <CA+7tXihoZZhpoyvxj58c+Zi-Zy631kK5s-kDoSxPKq=ej0qyvA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-07-19  2:24                               ` yuhang wang
2013-07-19  2:24                                 ` yuhang wang
2013-07-19 19:34                               ` Gupta, Pekon
2013-07-19 19:34                                 ` Gupta, Pekon
2013-07-22  9:33                                 ` Mark Brown
2013-07-22  9:33                                   ` Mark Brown
     [not found]                                   ` <20130722093342.GJ9858-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2013-07-22  9:56                                     ` Gupta, Pekon
2013-07-22  9:56                                       ` Gupta, Pekon
2013-07-22 10:32                                       ` Huang Shijie
2013-07-22 10:32                                         ` Huang Shijie
     [not found]                                         ` <51ED0A57.4060105-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
2013-07-22 11:21                                           ` thomas.langer-th3ZBGNqt+7QT0dZR+AlfA
2013-07-22 11:21                                             ` thomas.langer
2013-07-22 12:55                                             ` Gupta, Pekon [this message]
2013-07-22 12:55                                               ` Gupta, Pekon
     [not found]                                               ` <20980858CB6D3A4BAE95CA194937D5E73E9ECAFC-yXqyApvAXouIQmiDNMet8wC/G2K4zDHf@public.gmane.org>
2013-07-23  2:24                                                 ` Huang Shijie
2013-07-23  2:24                                                   ` Huang Shijie
     [not found]                                       ` <20980858CB6D3A4BAE95CA194937D5E73E9EC9B1-yXqyApvAXouIQmiDNMet8wC/G2K4zDHf@public.gmane.org>
2013-07-27 11:35                                         ` yuhang wang
2013-07-27 11:35                                           ` yuhang wang
2013-07-16  9:29         ` Mark Brown
2013-07-16  9:29           ` Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20980858CB6D3A4BAE95CA194937D5E73E9ECAFC@DBDE04.ent.ti.com \
    --to=pekon@ti.com \
    --cc=b32955@freescale.com \
    --cc=broonie@kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=sourav.poddar@ti.com \
    --cc=spi-devel-general@lists.sourceforge.net \
    --cc=thomas.langer@lantiq.com \
    --cc=tpiepho@gmail.com \
    --cc=wangyuhang2014@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.