devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Illia Smyrnov <x0194613-l0cyMroinI0@public.gmane.org>
Cc: linux-doc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Greg Kroah-Hartman
	<gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org>,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Rob Herring <rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>,
	Illia Smyrnov <illia.smyrnov-l0cyMroinI0@public.gmane.org>,
	Matthias Brugger
	<matthias.bgg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Grant Likely
	<grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: Re: [PATCH 2/2] spi: omap2-mcspi: Add FIFO buffer support
Date: Thu, 6 Jun 2013 11:30:32 +0100	[thread overview]
Message-ID: <20130606103032.GR31367@sirena.org.uk> (raw)
In-Reply-To: <51B05FB8.6050903-l0cyMroinI0@public.gmane.org>


[-- Attachment #1.1: Type: text/plain, Size: 1623 bytes --]

On Thu, Jun 06, 2013 at 01:08:56PM +0300, Illia Smyrnov wrote:
> On 06/05/2013 03:03 PM, Mark Brown wrote:

> >Why is this defined for slaves?  Surely the size of the FIFO in the
> >controller is a property of the controller not the slave?

> According to OMAP TRM [1] the FIFO buffer can be used by only one
> channel at a time. If several channels are selected and several FIFO
> enable bit fields are set to 1, the controller forces the buffer not
> to be used.

The controller ought to be able to figure this out for itself.  As a
first pass just grabbing the FIFO on a first come first served basis
will probably work well most of the time, the device would have to be
very active for it to constantly be doing transfers on all channels.

If there's more contention than that we probably ought to be looking at
how we handle this in general, it seems like we'd have more problems
than just the FIFO to worry about.

> If there are several slaves on the controller we must select which
> of slaves will use the FIFO for SPI transfers. Also, optimal FIFO

A single controller is only going to be able to talk to one slave at
once, everything on the bus except chip select is shared.

> size is heavily dependent of the SPI transfers length specific for
> certain slave.

The transfer length doesn't seem like something that we want to be
encoding in DT, particularly not indirectly - it is obviously readily
available at runtime, variable during runtime (eg, firmware download may
do large transfers on a device that only does small transfers most of
the time) and is something that updates to the drivers could change.

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 192 bytes --]

_______________________________________________
devicetree-discuss mailing list
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
https://lists.ozlabs.org/listinfo/devicetree-discuss

  parent reply	other threads:[~2013-06-06 10:30 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-05 11:39 [PATCH 0/2] spi: omap2-mcspi: add FIFO buffer support Illia Smyrnov
2013-06-05 11:39 ` [PATCH 1/2] spi: spi-omap2-mcspi.c: Add dts for slave device configuration Illia Smyrnov
     [not found]   ` <1370432398-7796-2-git-send-email-illia.smyrnov-l0cyMroinI0@public.gmane.org>
2013-06-05 11:57     ` Mark Brown
     [not found]       ` <20130605115734.GY31367-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2013-06-06 10:08         ` Illia Smyrnov
2013-06-06 10:19           ` Mark Brown
     [not found] ` <1370432398-7796-1-git-send-email-illia.smyrnov-l0cyMroinI0@public.gmane.org>
2013-06-05 11:39   ` [PATCH 2/2] spi: omap2-mcspi: Add FIFO buffer support Illia Smyrnov
2013-06-05 12:03     ` Mark Brown
     [not found]       ` <20130605120346.GZ31367-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2013-06-06 10:08         ` Illia Smyrnov
     [not found]           ` <51B05FB8.6050903-l0cyMroinI0@public.gmane.org>
2013-06-06 10:30             ` Mark Brown [this message]
     [not found]               ` <20130606103032.GR31367-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2013-06-11 17:09                 ` Illia Smyrnov

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=20130606103032.GR31367@sirena.org.uk \
    --to=broonie-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
    --cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
    --cc=grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org \
    --cc=illia.smyrnov-l0cyMroinI0@public.gmane.org \
    --cc=linux-doc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=matthias.bgg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org \
    --cc=spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    --cc=x0194613-l0cyMroinI0@public.gmane.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).