lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20131119084223.GC31504@ulmo.nvidia.com>
Date:	Tue, 19 Nov 2013 09:42:24 +0100
From:	Thierry Reding <thierry.reding@...il.com>
To:	Mark Rutland <mark.rutland@....com>
Cc:	Samuel Ortiz <sameo@...ux.intel.com>,
	Lee Jones <lee.jones@...aro.org>,
	"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Rhyland Klein <rklein@...dia.com>,
	"rob.herring@...xeda.com" <rob.herring@...xeda.com>,
	Pawel Moll <Pawel.Moll@....com>,
	Ian Campbell <ijc+devicetree@...lion.org.uk>,
	Bernie Thompson <bhthompson@...omium.org>,
	Andrew Bresticker <abrestic@...omium.org>
Subject: Re: [PATCH 1/3] mfd: cros ec: spi: Add delay for raising CS

On Mon, Nov 18, 2013 at 11:48:10AM +0000, Mark Rutland wrote:
> On Mon, Nov 18, 2013 at 10:30:47AM +0000, Thierry Reding wrote:
> > From: Rhyland Klein <rklein@...dia.com>
> > 
> > The EC has specific timing it requires. Add support for an optional delay
> > after raising CS to fix timing issues. This is configurable based on
> > a DT property "google,cros-ec-spi-msg-delay".
> > 
> > If this property isn't set, then no delay will be added. However, if set
> > it will cause a delay equal to the value passed to it to be inserted at
> > the end of a transaction.
> > 
> > Signed-off-by: Rhyland Klein <rklein@...dia.com>
> > Reviewed-by: Bernie Thompson <bhthompson@...omium.org>
> > Reviewed-by: Andrew Bresticker <abrestic@...omium.org>
> > Cc: Rob Herring <rob.herring@...xeda.com>
> > Cc: Pawel Moll <pawel.moll@....com>
> > Cc: Mark Rutland <mark.rutland@....com>
> > Cc: Ian Campbell <ijc+devicetree@...lion.org.uk>
> > Signed-off-by: Thierry Reding <treding@...dia.com>
> > ---
> >  Documentation/devicetree/bindings/mfd/cros-ec.txt |  4 +++
> >  drivers/mfd/cros_ec_spi.c                         | 30 +++++++++++++++++++++++
> >  2 files changed, 34 insertions(+)
> > 
> > diff --git a/Documentation/devicetree/bindings/mfd/cros-ec.txt b/Documentation/devicetree/bindings/mfd/cros-ec.txt
> > index 5f229c5f6da9..fb3034a87ae0 100644
> > --- a/Documentation/devicetree/bindings/mfd/cros-ec.txt
> > +++ b/Documentation/devicetree/bindings/mfd/cros-ec.txt
> > @@ -17,6 +17,10 @@ Required properties (SPI):
> >  - compatible: "google,cros-ec-spi"
> >  - reg: SPI chip select
> >  
> > +Optional properties (SPI):
> > +- google,cros-ec-spi-msg-delay: This property is how long of a delay, in usecs,
> > +  to use on the last transfer of a message, to force time between transactions.
> > +
> 
> Lose the "This property is", that's obvious from the structure of the
> document.

Will do.

> It would be nice to have an explanation in the binding document as to
> _why_ you might want to do this (e.g. the HW expects the rising edge to
> come some number of uS after the data, if it comes too early it
> explodes).

From what I can tell, this might differ on the exact variant of the EC,
but generally it seems that when the interval between two transactions
isn't long enough the EC won't be able to respond properly in time and
cause subsequent transactions to hang. Perhaps Rhyland, Bernie or Andrew
are more familiar with the details and therefore can provide a better or
more accurate explanation.

> Otherwise this looks fine to me.

Thanks,
Thierry

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ