Help with freescale p1010 based espi implementation.

2011-10-18 Thread Robin Holt
I am a newbie to SPI and Broadcom Robo switch parts, so any correction
to my direction early on is _VERY_ welcome.


The Freescale P1010 communications SOC includes an ESPI controller
which works with the spi-fsl-espi.c driver.  In that driver, the chip
selects are limited to 4 by the SPCOM_CS field of the command register.
Unfortunately, in the documentation, the only supported value for
that field is '00b'.  In our board design, we decided to use GPIO5
to effectively drive the select line of a 1-of-2 MUX chip (TI Part
SN74CBTLV3257PWR pin 1).

My immediate need is a quick-fix to the espi driver to allow driving
GPIO5 in addition to the two bits currently being used by the chip select
portion of the command register.  By quick fix, I am looking for something
to maintain locally until a more general method for abstracting the
board specific CS enhancements from the ESPI driver.

I have modified the boot loader to have GPIO5 set as an output and setting
it high prior to booting the kernel.  That reflects the strapping on
the board and the inactive high state needed by the CS signal.

I believe that I want my flattened device tree to have
fsl,espi-num-chipselects set to 8 (or at least 5), and then assign the
two devices chipselect 4 (the SPI Flash part which is addressed with
GPIO5=1 and command.CS field=0) and chipselect 0 (Broadcom Robo switch
which is addressed with GPIO5=0 and command.CS field=0).


On the subject of the GPIOs, I see those are being defined by the
mpc8xxx_gpio.c driver.  I do see messages during boot, and can use the
sysfs interface to toggle GPIO5 (which is really mapped to GPIO 229, but
that is probably my problem).  How would I locate that GPIO "correctly"
from within the spi-fsl-espi.c driver?


Another, mostly unrelated question is, can I get the kernel to define the
robo switch device without any kernel driver matching its FDT "compatible"
entry?  What I believe the SDK needs is merely a SPI driver defined and
then I think I can get the remainder of the Broadcom SDK working.

Thank you in advance for the help,
Robin Holt

--
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2d-oct
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


[SPAM] Mobile Device Management Report 2011-2016

2011-10-18 Thread Jerry Burke
Mobile Device Management Report 2011-2016
--
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2d-oct
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


Re: SPI Slave Mode

2011-10-18 Thread Grant Likely
On Tue, Oct 18, 2011 at 6:10 AM, Ned Forrester  wrote:
> On 10/18/2011 06:13 AM, Holdsworth, Joel wrote:
>> Hi All,
>>
>> My team are working on an embedded system where we need our application
>> processor to be an SPI slave. The documentation that I have read is very
>> clear that this is currently not supported. I am trying to find out if
>> there is any work planned or underway to add support for this feature,
>> or what work would be required to add support. Would this be the simple
>> addition of a small family of infrastructure functions? Or a major
>> overhaul of the subsystem?
>
> Or is it even possible?  It depends on what you want to accomplish.
>
>> Does anyone have any information about these things?
>
> There was considerable discussion of this several years ago.
> I don't think anything has changed since then.
>
> http://www.mail-archive.com/spi-devel-general@lists.sourceforge.net/msg00306.html
>
> The short answer is that generalized slave operation requires nearly-instant
> response from the slave, something that an OS is in capable of.  However,
> it can work in specialized circumstances, such as when it is possible to 
> always
> predict the next request from the master.  Data streaming with a single master
> and slave is such an example.

Yes, pretty much.  It isn't so much that Linux is incapable of doing
it, but it really is an entirely different model from the spi master
infrastructure in the kernel.  I have no problem sharing SPI master
data structures and code between a theoretical SPI slave subsystem,
but the model is sufficiently different that I haven't seen any
approach where it makes sense to try and make the spi master subsystem
handle spi slave operations.

USB is very much in the same vein.  While USB host and USB gadget do
share a bit of code, they are essentially separate subsystems.

g.

--
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2d-oct
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


Le guide AGIR des monte-escaliers

2011-10-18 Thread Guide agir par Planduweb
Pour voir le message, veuillez utiliser un lecteur de mail compatible HTML

Lien miroir : 
http://mail.mc10.fr/mc10_m/YT0xMyZiPTIyMDImYz0yMTkwMDMwMyZkPTIwMTEtMTAtMTggMTU6NDA6MDEmZT0xJmY9MjIwMiZnPTIyMDImaD0yMjAy

Lien de désinscription : 
http://mail.mc10.fr/mc10_unsub/YT0xMyZiPTIyMDImYz0yMTkwMDMwMyZkPTIwMTEtMTAtMTggMTU6NDA6MDEmZT0xJmY9MjIwMiZnPTIyMDImaD0yMjAy


--
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2d-oct
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


RE: SPI Slave Mode

2011-10-18 Thread Holdsworth, Joel
Thanks for your quick answer Ned. It sounds like the best solution for
our bespoke application, would be to implement a half-duplex driver
designed to simply collect the data from the bespoke master, and then
process the packet offline when the slave select goes high.

-Original Message-
From: Ned Forrester [mailto:nforres...@whoi.edu] 
Sent: 18 October 2011 13:10
To: Holdsworth, Joel (UK Guildford)
Cc: spi-devel-general@lists.sourceforge.net; Beaumont, Charlie (UK
Gloucester)
Subject: Re: SPI Slave Mode

On 10/18/2011 06:13 AM, Holdsworth, Joel wrote:
> Hi All,
> 
> My team are working on an embedded system where we need our 
> application processor to be an SPI slave. The documentation that I 
> have read is very clear that this is currently not supported. I am 
> trying to find out if there is any work planned or underway to add 
> support for this feature, or what work would be required to add 
> support. Would this be the simple addition of a small family of 
> infrastructure functions? Or a major overhaul of the subsystem?

Or is it even possible?  It depends on what you want to accomplish.

> Does anyone have any information about these things?

There was considerable discussion of this several years ago.  
I don't think anything has changed since then.

http://www.mail-archive.com/spi-devel-general@lists.sourceforge.net/msg0
0306.html

The short answer is that generalized slave operation requires
nearly-instant response from the slave, something that an OS is in
capable of.  However, it can work in specialized circumstances, such as
when it is possible to always predict the next request from the master.
Data streaming with a single master and slave is such an example.

> Best Regards
> Joel Holdsworth
> 
> __
> Joel Holdsworth - Engineer
> t +44 (0)1483 816052
> a Detica | Surrey Research Park | Guildford | GU2 7YP | UK 
> __
> www.detica.com 

-- 
Ned Forrester   nforres...@whoi.edu
Oceanographic Systems Lab   508-289-2226 Office / 774-392-5352 Cell
Applied Ocean Physics and Engineering Dept.
Woods Hole Oceanographic Institution  Woods Hole, MA 02543, USA
http://www.whoi.edu/
http://www.whoi.edu/page.do?pid=29856
http://www.whoi.edu/hpb/Site.do?id=1532

Please consider the environment before printing this email.
 
This message should be regarded as confidential. If you have received this 
email in error please notify the sender and destroy it immediately.
 
Statements of intent shall only become binding when confirmed in hard copy by 
an authorised signatory. 
 
The contents of this email may relate to dealings with other companies under 
the control of BAE Systems plc details of which can be found at 
http://www.baesystems.com/Businesses/index.htm.
 
Detica Limited is a BAE Systems company trading as BAE Systems Detica.
Detica Limited is registered in England and Wales under No: 1337451.
Registered office: Surrey Research Park, Guildford, Surrey, GU2 7YP, England.


--
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2d-oct
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


Re: SPI Slave Mode

2011-10-18 Thread Ned Forrester
On 10/18/2011 06:13 AM, Holdsworth, Joel wrote:
> Hi All,
> 
> My team are working on an embedded system where we need our application
> processor to be an SPI slave. The documentation that I have read is very
> clear that this is currently not supported. I am trying to find out if
> there is any work planned or underway to add support for this feature,
> or what work would be required to add support. Would this be the simple
> addition of a small family of infrastructure functions? Or a major
> overhaul of the subsystem?

Or is it even possible?  It depends on what you want to accomplish.

> Does anyone have any information about these things?

There was considerable discussion of this several years ago.  
I don't think anything has changed since then.

http://www.mail-archive.com/spi-devel-general@lists.sourceforge.net/msg00306.html

The short answer is that generalized slave operation requires nearly-instant 
response from the slave, something that an OS is in capable of.  However, 
it can work in specialized circumstances, such as when it is possible to always
predict the next request from the master.  Data streaming with a single master
and slave is such an example.

> Best Regards
> Joel Holdsworth
> 
> __
> Joel Holdsworth - Engineer
> t +44 (0)1483 816052
> a Detica | Surrey Research Park | Guildford | GU2 7YP | UK
> __
> www.detica.com  

-- 
Ned Forrester   nforres...@whoi.edu
Oceanographic Systems Lab   508-289-2226 Office / 774-392-5352 Cell
Applied Ocean Physics and Engineering Dept.
Woods Hole Oceanographic Institution  Woods Hole, MA 02543, USA
http://www.whoi.edu/
http://www.whoi.edu/page.do?pid=29856
http://www.whoi.edu/hpb/Site.do?id=1532


--
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2d-oct
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


SPI Slave Mode

2011-10-18 Thread Holdsworth, Joel
Hi All,

My team are working on an embedded system where we need our application
processor to be an SPI slave. The documentation that I have read is very
clear that this is currently not supported. I am trying to find out if
there is any work planned or underway to add support for this feature,
or what work would be required to add support. Would this be the simple
addition of a small family of infrastructure functions? Or a major
overhaul of the subsystem?

Does anyone have any information about these things?

Best Regards
Joel Holdsworth

__
Joel Holdsworth - Engineer
t +44 (0)1483 816052
a Detica | Surrey Research Park | Guildford | GU2 7YP | UK
__
www.detica.com  


Please consider the environment before printing this email.
 
This message should be regarded as confidential. If you have received this 
email in error please notify the sender and destroy it immediately.
 
Statements of intent shall only become binding when confirmed in hard copy by 
an authorised signatory. 
 
The contents of this email may relate to dealings with other companies under 
the control of BAE Systems plc details of which can be found at 
http://www.baesystems.com/Businesses/index.htm.
 
Detica Limited is a BAE Systems company trading as BAE Systems Detica.
Detica Limited is registered in England and Wales under No: 1337451.
Registered office: Surrey Research Park, Guildford, Surrey, GU2 7YP, England.

--
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2d-oct
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


Re: [PATCH 3/3] spi/pl022: skip default configuration before suspending

2011-10-18 Thread Russell King - ARM Linux
On Tue, Oct 18, 2011 at 02:43:34PM +0530, Viresh Kumar wrote:
> On 10/17/2011 6:42 PM, Linus WALLEIJ wrote:
> > From: Virupax Sadashivpetimath 
> > 
> > The loading of the default configuration before suspending has
> > been in the driver since its inception, but it is not really
> > needed. Especially so since we take to all the trouble of
> > enabling and disabling power and clock just to do this. Let's
> > scrap this now.
> > 
> > Signed-off-by: Virupax Sadashivpetimath 
> > 
> > Signed-off-by: Linus Walleij 
> > ---
> >  drivers/spi/spi-pl022.c |5 -
> >  1 files changed, 0 insertions(+), 5 deletions(-)
> > 
> > diff --git a/drivers/spi/spi-pl022.c b/drivers/spi/spi-pl022.c
> > index 0a1d8ed..29dc70f 100644
> > --- a/drivers/spi/spi-pl022.c
> > +++ b/drivers/spi/spi-pl022.c
> > @@ -2342,11 +2342,6 @@ static int pl022_suspend(struct amba_device *adev, 
> > pm_message_t state)
> > return status;
> > }
> >  
> > -   amba_vcore_enable(adev);
> > -   amba_pclk_enable(adev);
> > -   load_ssp_default_config(pl022);
> > -   amba_pclk_disable(adev);
> > -   amba_vcore_disable(adev);
> > dev_dbg(&adev->dev, "suspended\n");
> > return 0;
> >  }
> 
> Reviewed-by: Viresh Kumar 

This definitely conflicts with patches I have queued for this window.

--
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2d-oct
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


Re: [PATCH 2/3] spi/pl022: disable the PL022 block when unused

2011-10-18 Thread Russell King - ARM Linux
On Tue, Oct 18, 2011 at 02:43:27PM +0530, Viresh Kumar wrote:
> On 10/17/2011 6:42 PM, Linus WALLEIJ wrote:
> > From: Virupax Sadashivpetimath 
> > 
> > Make sure we clear the enable bit when the block is not used.
> > This will save some energy in certain hardware versions.
> > 
> > Signed-off-by: Virupax Sadashivpetimath 
> > 
> > Signed-off-by: Linus Walleij 
> > ---
> >  drivers/spi/spi-pl022.c |7 ++-
> >  1 files changed, 6 insertions(+), 1 deletions(-)
> > 
> > diff --git a/drivers/spi/spi-pl022.c b/drivers/spi/spi-pl022.c
> > index 91700bb..0a1d8ed 100644
> > --- a/drivers/spi/spi-pl022.c
> > +++ b/drivers/spi/spi-pl022.c
> > @@ -513,7 +513,12 @@ static void giveback(struct pl022 *pl022)
> > msg->state = NULL;
> > if (msg->complete)
> > msg->complete(msg->context);
> > -   /* This message is completed, so let's turn off the clocks & power */
> > +
> > +   /* disable the SPI/SSP operation */
> > +   writew((readw(SSP_CR1(pl022->virtbase)) &
> > +   (~SSP_CR1_MASK_SSE)), SSP_CR1(pl022->virtbase));
> > +
> > +   /* This message is completed, so let's turn off the clock! */
> > clk_disable(pl022->clk);
> > amba_pclk_disable(pl022->adev);
> > amba_vcore_disable(pl022->adev);
> 
> Reviewed-by: Viresh Kumar 

Note that I have some changes around here in my amba branch (which are
dependent on other changes I have for the primecell runtime pm.)

--
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2d-oct
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


Re: [PATCH 3/3] spi/pl022: skip default configuration before suspending

2011-10-18 Thread Viresh Kumar
On 10/17/2011 6:42 PM, Linus WALLEIJ wrote:
> From: Virupax Sadashivpetimath 
> 
> The loading of the default configuration before suspending has
> been in the driver since its inception, but it is not really
> needed. Especially so since we take to all the trouble of
> enabling and disabling power and clock just to do this. Let's
> scrap this now.
> 
> Signed-off-by: Virupax Sadashivpetimath 
> 
> Signed-off-by: Linus Walleij 
> ---
>  drivers/spi/spi-pl022.c |5 -
>  1 files changed, 0 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/spi/spi-pl022.c b/drivers/spi/spi-pl022.c
> index 0a1d8ed..29dc70f 100644
> --- a/drivers/spi/spi-pl022.c
> +++ b/drivers/spi/spi-pl022.c
> @@ -2342,11 +2342,6 @@ static int pl022_suspend(struct amba_device *adev, 
> pm_message_t state)
>   return status;
>   }
>  
> - amba_vcore_enable(adev);
> - amba_pclk_enable(adev);
> - load_ssp_default_config(pl022);
> - amba_pclk_disable(adev);
> - amba_vcore_disable(adev);
>   dev_dbg(&adev->dev, "suspended\n");
>   return 0;
>  }

Reviewed-by: Viresh Kumar 

-- 
viresh

--
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2d-oct
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


Re: [PATCH 2/3] spi/pl022: disable the PL022 block when unused

2011-10-18 Thread Viresh Kumar
On 10/17/2011 6:42 PM, Linus WALLEIJ wrote:
> From: Virupax Sadashivpetimath 
> 
> Make sure we clear the enable bit when the block is not used.
> This will save some energy in certain hardware versions.
> 
> Signed-off-by: Virupax Sadashivpetimath 
> 
> Signed-off-by: Linus Walleij 
> ---
>  drivers/spi/spi-pl022.c |7 ++-
>  1 files changed, 6 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/spi/spi-pl022.c b/drivers/spi/spi-pl022.c
> index 91700bb..0a1d8ed 100644
> --- a/drivers/spi/spi-pl022.c
> +++ b/drivers/spi/spi-pl022.c
> @@ -513,7 +513,12 @@ static void giveback(struct pl022 *pl022)
>   msg->state = NULL;
>   if (msg->complete)
>   msg->complete(msg->context);
> - /* This message is completed, so let's turn off the clocks & power */
> +
> + /* disable the SPI/SSP operation */
> + writew((readw(SSP_CR1(pl022->virtbase)) &
> + (~SSP_CR1_MASK_SSE)), SSP_CR1(pl022->virtbase));
> +
> + /* This message is completed, so let's turn off the clock! */
>   clk_disable(pl022->clk);
>   amba_pclk_disable(pl022->adev);
>   amba_vcore_disable(pl022->adev);

Reviewed-by: Viresh Kumar 

-- 
viresh

--
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2d-oct
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general


Re: [PATCH 1/3] spi/pl022: fix build warnings

2011-10-18 Thread Viresh Kumar
On 10/17/2011 6:42 PM, Linus WALLEIJ wrote:
> From: Jonas Aaberg 
> 
> The driver build complains with newer compilers unless you
> initialize this struct properly.
> 
> Signed-off-by: Jonas Aaberg 
> Signed-off-by: Linus Walleij 
> ---
>  drivers/spi/spi-pl022.c |2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/spi/spi-pl022.c b/drivers/spi/spi-pl022.c
> index debdaeb..91700bb 100644
> --- a/drivers/spi/spi-pl022.c
> +++ b/drivers/spi/spi-pl022.c
> @@ -1930,7 +1930,7 @@ static int pl022_setup(struct spi_device *spi)
>  {
>   struct pl022_config_chip const *chip_info;
>   struct chip_data *chip;
> - struct ssp_clock_params clk_freq = {0, };
> + struct ssp_clock_params clk_freq = { .cpsdvsr = 0, .scr = 0};
>   int status = 0;
>   struct pl022 *pl022 = spi_master_get_devdata(spi->master);
>   unsigned int bits = spi->bits_per_word;

Reviewed-by: Viresh Kumar 

-- 
viresh

--
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2d-oct
___
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general