public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] OMAP I2C: Include OMAP_I2C_SYSC_REG in save and restore.
@ 2009-01-22  7:19 Pakaravoor, Jagadeesh
  2009-02-10 10:27 ` Pakaravoor, Jagadeesh
  0 siblings, 1 reply; 3+ messages in thread
From: Pakaravoor, Jagadeesh @ 2009-01-22  7:19 UTC (permalink / raw)
  To: linux-omap@vger.kernel.org
  Cc: jouni.hogander@nokia.com, khilman@deeprootsystems.com

From: Jagadeesh Bhaskar Pakaravoor <j-pakaravoor@ti.com>

Save and restore should include OMAP_I2C_SYSC_REG.
This patch applies on origin/pm.

Signed-off-by: Jagadeesh Bhaskar Pakaravoor <j-pakaravoor@ti.com>
---
Index: linux-omap-2.6/drivers/i2c/busses/i2c-omap.c
===================================================================
--- linux-omap-2.6.orig/drivers/i2c/busses/i2c-omap.c	2009-01-22 12:11:12.000000000 +0530
+++ linux-omap-2.6/drivers/i2c/busses/i2c-omap.c	2009-01-22 12:44:12.202367296 +0530
@@ -182,6 +182,7 @@ struct omap_i2c_dev {
 	u16			scllstate;
 	u16			sclhstate;
 	u16			bufstate;
+	u16			syscstate;
 };
 
 static inline void omap_i2c_write_reg(struct omap_i2c_dev *i2c_dev,
@@ -240,6 +241,7 @@ static void omap_i2c_unidle(struct omap_
 		omap_i2c_write_reg(dev, OMAP_I2C_SCLL_REG, dev->scllstate);
 		omap_i2c_write_reg(dev, OMAP_I2C_SCLH_REG, dev->sclhstate);
 		omap_i2c_write_reg(dev, OMAP_I2C_BUF_REG, dev->bufstate);
+		omap_i2c_write_reg(dev, OMAP_I2C_SYSC_REG, dev->syscstate);
 	}
 	dev->idle = 0;
 	omap_i2c_write_reg(dev, OMAP_I2C_IE_REG, dev->iestate);
@@ -300,14 +302,15 @@ static int omap_i2c_init(struct omap_i2c
 		} else if (dev->rev >= OMAP_I2C_REV_ON_3430) {
 			u32 v;
 
-			v = SYSC_AUTOIDLE_MASK;
-			v |= SYSC_ENAWAKEUP_MASK;
-			v |= (SYSC_IDLEMODE_SMART <<
+			dev->syscstate = SYSC_AUTOIDLE_MASK;
+			dev->syscstate |= SYSC_ENAWAKEUP_MASK;
+			dev->syscstate |= (SYSC_IDLEMODE_SMART <<
 			      __ffs(SYSC_SIDLEMODE_MASK));
-			v |= (SYSC_CLOCKACTIVITY_FCLK <<
+			dev->syscstate |= (SYSC_CLOCKACTIVITY_FCLK <<
 			      __ffs(SYSC_CLOCKACTIVITY_MASK));
 
-			omap_i2c_write_reg(dev, OMAP_I2C_SYSC_REG, v);
+			omap_i2c_write_reg(dev, OMAP_I2C_SYSC_REG,
+							dev->syscstate);
 			/*
 			 * Enabling all wakup sources to stop I2C freezing on
 			 * WFI instruction.

--
With Regards,
Jagadeesh Bhaskar P
 
----------------------------
Some men see things as they are and say why - I dream things that never were and say why not.
- George Bernard Shaw
-------------------


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

* RE: [PATCH] OMAP I2C: Include OMAP_I2C_SYSC_REG in save and restore.
  2009-01-22  7:19 [PATCH] OMAP I2C: Include OMAP_I2C_SYSC_REG in save and restore Pakaravoor, Jagadeesh
@ 2009-02-10 10:27 ` Pakaravoor, Jagadeesh
  2009-02-10 22:25   ` Kevin Hilman
  0 siblings, 1 reply; 3+ messages in thread
From: Pakaravoor, Jagadeesh @ 2009-02-10 10:27 UTC (permalink / raw)
  To: khilman@deeprootsystems.com
  Cc: jouni.hogander@nokia.com, linux-omap@vger.kernel.org

Kevin,
  Did you get a chance to review this patch?

--
Jagadeesh

> -----Original Message-----
> From: linux-omap-owner@vger.kernel.org [mailto:linux-omap-owner@vger.kernel.org] On Behalf Of
> Pakaravoor, Jagadeesh
> Sent: Thursday, January 22, 2009 12:49 PM
> To: linux-omap@vger.kernel.org
> Cc: jouni.hogander@nokia.com; khilman@deeprootsystems.com
> Subject: [PATCH] OMAP I2C: Include OMAP_I2C_SYSC_REG in save and restore.
> 
> From: Jagadeesh Bhaskar Pakaravoor <j-pakaravoor@ti.com>
> 
> Save and restore should include OMAP_I2C_SYSC_REG.
> This patch applies on origin/pm.
> 
> Signed-off-by: Jagadeesh Bhaskar Pakaravoor <j-pakaravoor@ti.com>
> ---
> Index: linux-omap-2.6/drivers/i2c/busses/i2c-omap.c
> ===================================================================
> --- linux-omap-2.6.orig/drivers/i2c/busses/i2c-omap.c	2009-01-22 12:11:12.000000000 +0530
> +++ linux-omap-2.6/drivers/i2c/busses/i2c-omap.c	2009-01-22 12:44:12.202367296 +0530
> @@ -182,6 +182,7 @@ struct omap_i2c_dev {
>  	u16			scllstate;
>  	u16			sclhstate;
>  	u16			bufstate;
> +	u16			syscstate;
>  };
> 
>  static inline void omap_i2c_write_reg(struct omap_i2c_dev *i2c_dev,
> @@ -240,6 +241,7 @@ static void omap_i2c_unidle(struct omap_
>  		omap_i2c_write_reg(dev, OMAP_I2C_SCLL_REG, dev->scllstate);
>  		omap_i2c_write_reg(dev, OMAP_I2C_SCLH_REG, dev->sclhstate);
>  		omap_i2c_write_reg(dev, OMAP_I2C_BUF_REG, dev->bufstate);
> +		omap_i2c_write_reg(dev, OMAP_I2C_SYSC_REG, dev->syscstate);
>  	}
>  	dev->idle = 0;
>  	omap_i2c_write_reg(dev, OMAP_I2C_IE_REG, dev->iestate);
> @@ -300,14 +302,15 @@ static int omap_i2c_init(struct omap_i2c
>  		} else if (dev->rev >= OMAP_I2C_REV_ON_3430) {
>  			u32 v;
> 
> -			v = SYSC_AUTOIDLE_MASK;
> -			v |= SYSC_ENAWAKEUP_MASK;
> -			v |= (SYSC_IDLEMODE_SMART <<
> +			dev->syscstate = SYSC_AUTOIDLE_MASK;
> +			dev->syscstate |= SYSC_ENAWAKEUP_MASK;
> +			dev->syscstate |= (SYSC_IDLEMODE_SMART <<
>  			      __ffs(SYSC_SIDLEMODE_MASK));
> -			v |= (SYSC_CLOCKACTIVITY_FCLK <<
> +			dev->syscstate |= (SYSC_CLOCKACTIVITY_FCLK <<
>  			      __ffs(SYSC_CLOCKACTIVITY_MASK));
> 
> -			omap_i2c_write_reg(dev, OMAP_I2C_SYSC_REG, v);
> +			omap_i2c_write_reg(dev, OMAP_I2C_SYSC_REG,
> +							dev->syscstate);
>  			/*
>  			 * Enabling all wakup sources to stop I2C freezing on
>  			 * WFI instruction.
> 
> --
> With Regards,
> Jagadeesh Bhaskar P
> 
> ----------------------------
> Some men see things as they are and say why - I dream things that never were and say why not.
> - George Bernard Shaw
> -------------------
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


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

* Re: [PATCH] OMAP I2C: Include OMAP_I2C_SYSC_REG in save and restore.
  2009-02-10 10:27 ` Pakaravoor, Jagadeesh
@ 2009-02-10 22:25   ` Kevin Hilman
  0 siblings, 0 replies; 3+ messages in thread
From: Kevin Hilman @ 2009-02-10 22:25 UTC (permalink / raw)
  To: Pakaravoor, Jagadeesh
  Cc: jouni.hogander@nokia.com, linux-omap@vger.kernel.org

"Pakaravoor, Jagadeesh" <j-pakaravoor@ti.com> writes:

> Kevin,
>   Did you get a chance to review this patch?
>

Yes, and I applied it to the PM branch early last week.  See the
commit log[1].

I guess I forgot to respond to the list.  Sorry...
 
Kevin

[1] http://git.kernel.org/?p=linux/kernel/git/khilman/linux-omap-pm.git;a=shortlog;h=pm


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

end of thread, other threads:[~2009-02-10 22:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-22  7:19 [PATCH] OMAP I2C: Include OMAP_I2C_SYSC_REG in save and restore Pakaravoor, Jagadeesh
2009-02-10 10:27 ` Pakaravoor, Jagadeesh
2009-02-10 22:25   ` Kevin Hilman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox