linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] i2c: mxs: set controller to pio queue mode after reset
@ 2011-02-25 17:54 Wolfram Sang
       [not found] ` <1298656491-30686-1-git-send-email-w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Wolfram Sang @ 2011-02-25 17:54 UTC (permalink / raw)
  To: linux-i2c-u79uwXL29TY76Z2rM5mHXA; +Cc: Sascha Hauer, Wolfram Sang, Ben Dooks

From: Sascha Hauer <s.hauer-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>

mxs_reset_block() clears the PIO_QUEUE_MODE bit. So we have
to set it again after a controller reset.

Signed-off-by: Sascha Hauer <s.hauer-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
Signed-off-by: Wolfram Sang <w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
Cc: Ben Dooks <ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org>
---
 drivers/i2c/busses/i2c-mxs.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/i2c/busses/i2c-mxs.c b/drivers/i2c/busses/i2c-mxs.c
index 8022e23..caf96dc 100644
--- a/drivers/i2c/busses/i2c-mxs.c
+++ b/drivers/i2c/busses/i2c-mxs.c
@@ -118,6 +118,8 @@ static void mxs_i2c_reset(struct mxs_i2c_dev *i2c)
 {
 	mxs_reset_block(i2c->regs);
 	writel(MXS_I2C_IRQ_MASK << 8, i2c->regs + MXS_I2C_CTRL1_SET);
+	writel(MXS_I2C_QUEUECTRL_PIO_QUEUE_MODE,
+			i2c->regs + MXS_I2C_QUEUECTRL_SET);
 }
 
 static void mxs_i2c_pioq_setup_read(struct mxs_i2c_dev *i2c, u8 addr, int len,
@@ -347,8 +349,6 @@ static int __devinit mxs_i2c_probe(struct platform_device *pdev)
 
 	/* Do reset to enforce correct startup after pinmuxing */
 	mxs_i2c_reset(i2c);
-	writel(MXS_I2C_QUEUECTRL_PIO_QUEUE_MODE,
-			i2c->regs + MXS_I2C_QUEUECTRL_SET);
 
 	adap = &i2c->adapter;
 	strlcpy(adap->name, "MXS I2C adapter", sizeof(adap->name));
-- 
1.7.2.3

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

* Re: [PATCH] i2c: mxs: set controller to pio queue mode after reset
       [not found] ` <1298656491-30686-1-git-send-email-w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
@ 2011-03-07  0:47   ` Ben Dooks
       [not found]     ` <20110307004736.GC15795-SMNkleLxa3Z6Wcw2j4pizdi2O/JbrIOy@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Ben Dooks @ 2011-03-07  0:47 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA, Sascha Hauer, Ben Dooks

On Fri, Feb 25, 2011 at 06:54:51PM +0100, Wolfram Sang wrote:
> From: Sascha Hauer <s.hauer-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
> 
> mxs_reset_block() clears the PIO_QUEUE_MODE bit. So we have
> to set it again after a controller reset.

-rc candidate?
 
> Signed-off-by: Sascha Hauer <s.hauer-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
> Signed-off-by: Wolfram Sang <w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
> Cc: Ben Dooks <ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org>
> ---
>  drivers/i2c/busses/i2c-mxs.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/i2c/busses/i2c-mxs.c b/drivers/i2c/busses/i2c-mxs.c
> index 8022e23..caf96dc 100644
> --- a/drivers/i2c/busses/i2c-mxs.c
> +++ b/drivers/i2c/busses/i2c-mxs.c
> @@ -118,6 +118,8 @@ static void mxs_i2c_reset(struct mxs_i2c_dev *i2c)
>  {
>  	mxs_reset_block(i2c->regs);
>  	writel(MXS_I2C_IRQ_MASK << 8, i2c->regs + MXS_I2C_CTRL1_SET);
> +	writel(MXS_I2C_QUEUECTRL_PIO_QUEUE_MODE,
> +			i2c->regs + MXS_I2C_QUEUECTRL_SET);
>  }
>  
>  static void mxs_i2c_pioq_setup_read(struct mxs_i2c_dev *i2c, u8 addr, int len,
> @@ -347,8 +349,6 @@ static int __devinit mxs_i2c_probe(struct platform_device *pdev)
>  
>  	/* Do reset to enforce correct startup after pinmuxing */
>  	mxs_i2c_reset(i2c);
> -	writel(MXS_I2C_QUEUECTRL_PIO_QUEUE_MODE,
> -			i2c->regs + MXS_I2C_QUEUECTRL_SET);
>  
>  	adap = &i2c->adapter;
>  	strlcpy(adap->name, "MXS I2C adapter", sizeof(adap->name));
> -- 
> 1.7.2.3
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 
Ben Dooks, ben-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org, http://www.fluff.org/ben/

Large Hadron Colada: A large Pina Colada that makes the universe disappear.

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

* Re: [PATCH] i2c: mxs: set controller to pio queue mode after reset
       [not found]     ` <20110307004736.GC15795-SMNkleLxa3Z6Wcw2j4pizdi2O/JbrIOy@public.gmane.org>
@ 2011-03-07  9:06       ` Wolfram Sang
       [not found]         ` <20110307090651.GA3425-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Wolfram Sang @ 2011-03-07  9:06 UTC (permalink / raw)
  To: Ben Dooks; +Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA, Sascha Hauer, Ben Dooks

[-- Attachment #1: Type: text/plain, Size: 649 bytes --]

On Mon, Mar 07, 2011 at 12:47:36AM +0000, Ben Dooks wrote:
> On Fri, Feb 25, 2011 at 06:54:51PM +0100, Wolfram Sang wrote:
> > From: Sascha Hauer <s.hauer-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
> > 
> > mxs_reset_block() clears the PIO_QUEUE_MODE bit. So we have
> > to set it again after a controller reset.
> 
> -rc candidate?

The driver is only in your next branch. I guess you could even squash
it into the driver if rebasing does not hurt there.

Thanks,

   Wolfram

-- 
Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

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

* Re: [PATCH] i2c: mxs: set controller to pio queue mode after reset
       [not found]         ` <20110307090651.GA3425-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
@ 2011-03-10  8:13           ` Ben Dooks
  0 siblings, 0 replies; 4+ messages in thread
From: Ben Dooks @ 2011-03-10  8:13 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: Ben Dooks, linux-i2c-u79uwXL29TY76Z2rM5mHXA, Sascha Hauer,
	Ben Dooks

On Mon, Mar 07, 2011 at 10:06:51AM +0100, Wolfram Sang wrote:
> On Mon, Mar 07, 2011 at 12:47:36AM +0000, Ben Dooks wrote:
> > On Fri, Feb 25, 2011 at 06:54:51PM +0100, Wolfram Sang wrote:
> > > From: Sascha Hauer <s.hauer-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
> > > 
> > > mxs_reset_block() clears the PIO_QUEUE_MODE bit. So we have
> > > to set it again after a controller reset.
> > 
> > -rc candidate?
> 
> The driver is only in your next branch. I guess you could even squash
> it into the driver if rebasing does not hurt there.

I'll add it to the -next branch ready for merging.

-- 
Ben Dooks, ben-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org, http://www.fluff.org/ben/

Large Hadron Colada: A large Pina Colada that makes the universe disappear.

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

end of thread, other threads:[~2011-03-10  8:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-25 17:54 [PATCH] i2c: mxs: set controller to pio queue mode after reset Wolfram Sang
     [not found] ` <1298656491-30686-1-git-send-email-w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2011-03-07  0:47   ` Ben Dooks
     [not found]     ` <20110307004736.GC15795-SMNkleLxa3Z6Wcw2j4pizdi2O/JbrIOy@public.gmane.org>
2011-03-07  9:06       ` Wolfram Sang
     [not found]         ` <20110307090651.GA3425-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2011-03-10  8:13           ` Ben Dooks

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