linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch 1/2] spi: omap2_mcspi supports wake events
@ 2009-07-02 23:29 David Brownell
       [not found] ` <200907021629.33372.david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: David Brownell @ 2009-07-02 23:29 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Tony Lindgren,
	spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	Jouni Hogander

Author: Jouni Hogander <jouni.hogander-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>

Currently mcspi wake-ups are not enabled. This might cause case where
OMAP is not waking up on mcspi events.

Signed-off-by: Jouni Hogander <jouni.hogander-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>
Signed-off-by: Tony Lindgren <tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
Signed-off-by: David Brownell <dbrownell-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
---
 drivers/spi/omap2_mcspi.c |   11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

--- a/drivers/spi/omap2_mcspi.c
+++ b/drivers/spi/omap2_mcspi.c
@@ -59,6 +59,8 @@
 
 /* per-register bitmasks: */
 
+#define OMAP2_MCSPI_SYSCONFIG_SMARTIDLE	(2 << 3)
+#define OMAP2_MCSPI_SYSCONFIG_ENAWAKEUP	(1 << 2)
 #define OMAP2_MCSPI_SYSCONFIG_AUTOIDLE	(1 << 0)
 #define OMAP2_MCSPI_SYSCONFIG_SOFTRESET	(1 << 1)
 
@@ -90,6 +92,7 @@
 
 #define OMAP2_MCSPI_CHCTRL_EN		(1 << 0)
 
+#define OMAP2_MCSPI_WAKEUPENABLE_WKEN	(1 << 0)
 
 /* We have 2 DMA channels per CS, one for RX and one for TX */
 struct omap2_mcspi_dma {
@@ -873,8 +876,12 @@ static int __init omap2_mcspi_reset(stru
 	} while (!(tmp & OMAP2_MCSPI_SYSSTATUS_RESETDONE));
 
 	mcspi_write_reg(master, OMAP2_MCSPI_SYSCONFIG,
-			/* (3 << 8) | (2 << 3) | */
-			OMAP2_MCSPI_SYSCONFIG_AUTOIDLE);
+			OMAP2_MCSPI_SYSCONFIG_AUTOIDLE |
+			OMAP2_MCSPI_SYSCONFIG_ENAWAKEUP |
+			OMAP2_MCSPI_SYSCONFIG_SMARTIDLE);
+
+	mcspi_write_reg(master, OMAP2_MCSPI_WAKEUPENABLE,
+			OMAP2_MCSPI_WAKEUPENABLE_WKEN);
 
 	omap2_mcspi_set_master_mode(master);
 


------------------------------------------------------------------------------

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [patch 1/2] spi: omap2_mcspi supports wake events
       [not found] ` <200907021629.33372.david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>
@ 2009-07-17 23:08   ` Andrew Morton
       [not found]     ` <20090717160835.66ed106e.akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Andrew Morton @ 2009-07-17 23:08 UTC (permalink / raw)
  To: David Brownell
  Cc: tony-4v6yS6AI5VpBDgjK7y7TUQ,
	spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	jouni.hogander-xNZwKgViW5gAvxtiuMwx3w

On Thu, 2 Jul 2009 16:29:33 -0700
David Brownell <david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org> wrote:

> Author: Jouni Hogander <jouni.hogander-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>

Please use From: here.

> Currently mcspi wake-ups are not enabled. This might cause case where
> OMAP is not waking up on mcspi events.
> 
> Signed-off-by: Jouni Hogander <jouni.hogander-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>
> Signed-off-by: Tony Lindgren <tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
> Signed-off-by: David Brownell <dbrownell-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>

For disposition of these I'm thinking

spi-omap2_mcspi-supports-wake-events.patch	-> 2.6.31
spi-omap2_mcspi-use-bitn.patch			-> 2.6.32
spi-omap2_mcspi-rxdma-bugfix.patch		-> 2.6.31

?


------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [patch 1/2] spi: omap2_mcspi supports wake events
       [not found]     ` <20090717160835.66ed106e.akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
@ 2009-07-18  1:29       ` David Brownell
  0 siblings, 0 replies; 3+ messages in thread
From: David Brownell @ 2009-07-18  1:29 UTC (permalink / raw)
  To: Andrew Morton
  Cc: tony-4v6yS6AI5VpBDgjK7y7TUQ,
	spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	jouni.hogander-xNZwKgViW5gAvxtiuMwx3w

On Friday 17 July 2009, Andrew Morton wrote:
> On Thu, 2 Jul 2009 16:29:33 -0700
> David Brownell <david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org> wrote:
> 
> > Author: Jouni Hogander <jouni.hogander-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>
> 
> Please use From: here.

Sorry, I thought I'd fixed those.


> > Currently mcspi wake-ups are not enabled. This might cause case where
> > OMAP is not waking up on mcspi events.
> > 
> > Signed-off-by: Jouni Hogander <jouni.hogander-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>
> > Signed-off-by: Tony Lindgren <tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
> > Signed-off-by: David Brownell <dbrownell-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
> 
> For disposition of these I'm thinking
> 
> spi-omap2_mcspi-supports-wake-events.patch	-> 2.6.31
> spi-omap2_mcspi-use-bitn.patch			-> 2.6.32
> spi-omap2_mcspi-rxdma-bugfix.patch		-> 2.6.31
> 
> ?

Sounds OK.

------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-07-18  1:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-02 23:29 [patch 1/2] spi: omap2_mcspi supports wake events David Brownell
     [not found] ` <200907021629.33372.david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>
2009-07-17 23:08   ` Andrew Morton
     [not found]     ` <20090717160835.66ed106e.akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
2009-07-18  1:29       ` David Brownell

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).