linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] i2c-pxa2xx: Fix register offsets
@ 2011-03-13 13:53 Vasily Khoruzhick
  2011-03-13 13:53 ` [PATCH 2/2] i2c-pxa2xx: Don't clear isr bits too early Vasily Khoruzhick
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Vasily Khoruzhick @ 2011-03-13 13:53 UTC (permalink / raw)
  To: linux-arm-kernel

Fix regression that was introduced by dynamic register layout.

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
---
 drivers/i2c/busses/i2c-pxa.c |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/i2c/busses/i2c-pxa.c b/drivers/i2c/busses/i2c-pxa.c
index a90739b..312d369 100644
--- a/drivers/i2c/busses/i2c-pxa.c
+++ b/drivers/i2c/busses/i2c-pxa.c
@@ -66,18 +66,18 @@ enum pxa_i2c_types {
 static struct pxa_reg_layout pxa_reg_layout[] = {
 	[REGS_PXA2XX] = {
 		.ibmr =	0x00,
-		.idbr =	0x10,
-		.icr =	0x20,
-		.isr =	0x30,
-		.isar =	0x40,
-	},
-	[REGS_PXA3XX] = {
-		.ibmr =	0x00,
 		.idbr =	0x08,
 		.icr =	0x10,
 		.isr =	0x18,
 		.isar =	0x20,
 	},
+	[REGS_PXA3XX] = {
+		.ibmr =	0x00,
+		.idbr =	0x04,
+		.icr =	0x08,
+		.isr =	0x0c,
+		.isar =	0x10,
+	},
 	[REGS_CE4100] = {
 		.ibmr =	0x14,
 		.idbr =	0x0c,
-- 
1.7.4.1

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

* [PATCH 2/2] i2c-pxa2xx: Don't clear isr bits too early
  2011-03-13 13:53 [PATCH 1/2] i2c-pxa2xx: Fix register offsets Vasily Khoruzhick
@ 2011-03-13 13:53 ` Vasily Khoruzhick
  2011-03-14 14:15 ` [PATCH 1/2] i2c-pxa2xx: Fix register offsets Sebastian Andrzej Siewior
  2011-03-14 14:29 ` Ben Dooks
  2 siblings, 0 replies; 4+ messages in thread
From: Vasily Khoruzhick @ 2011-03-13 13:53 UTC (permalink / raw)
  To: linux-arm-kernel

isr is passed later into i2c_pxa_irq_txempty and
i2c_pxa_irq_rxfull and they may use some other bits
than irq sources.

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
---
 drivers/i2c/busses/i2c-pxa.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/i2c/busses/i2c-pxa.c b/drivers/i2c/busses/i2c-pxa.c
index 312d369..cab529d 100644
--- a/drivers/i2c/busses/i2c-pxa.c
+++ b/drivers/i2c/busses/i2c-pxa.c
@@ -966,8 +966,7 @@ static irqreturn_t i2c_pxa_handler(int this_irq, void *dev_id)
 	struct pxa_i2c *i2c = dev_id;
 	u32 isr = readl(_ISR(i2c));
 
-	isr &= VALID_INT_SOURCE;
-	if (!isr)
+	if (!(isr & VALID_INT_SOURCE))
 		return IRQ_NONE;
 
 	if (i2c_debug > 2 && 0) {
@@ -984,7 +983,7 @@ static irqreturn_t i2c_pxa_handler(int this_irq, void *dev_id)
 	/*
 	 * Always clear all pending IRQs.
 	 */
-	writel(isr, _ISR(i2c));
+	writel(isr & VALID_INT_SOURCE, _ISR(i2c));
 
 	if (isr & ISR_SAD)
 		i2c_pxa_slave_start(i2c, isr);
-- 
1.7.4.1

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

* [PATCH 1/2] i2c-pxa2xx: Fix register offsets
  2011-03-13 13:53 [PATCH 1/2] i2c-pxa2xx: Fix register offsets Vasily Khoruzhick
  2011-03-13 13:53 ` [PATCH 2/2] i2c-pxa2xx: Don't clear isr bits too early Vasily Khoruzhick
@ 2011-03-14 14:15 ` Sebastian Andrzej Siewior
  2011-03-14 14:29 ` Ben Dooks
  2 siblings, 0 replies; 4+ messages in thread
From: Sebastian Andrzej Siewior @ 2011-03-14 14:15 UTC (permalink / raw)
  To: linux-arm-kernel

Vasily Khoruzhick wrote:
> Fix regression that was introduced by dynamic register layout.
> 
> Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Acked-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>

After looking at my patch once again I noticed that I really mixed those
two up. Thanks for fixing this.

Sebastian

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

* [PATCH 1/2] i2c-pxa2xx: Fix register offsets
  2011-03-13 13:53 [PATCH 1/2] i2c-pxa2xx: Fix register offsets Vasily Khoruzhick
  2011-03-13 13:53 ` [PATCH 2/2] i2c-pxa2xx: Don't clear isr bits too early Vasily Khoruzhick
  2011-03-14 14:15 ` [PATCH 1/2] i2c-pxa2xx: Fix register offsets Sebastian Andrzej Siewior
@ 2011-03-14 14:29 ` Ben Dooks
  2 siblings, 0 replies; 4+ messages in thread
From: Ben Dooks @ 2011-03-14 14:29 UTC (permalink / raw)
  To: linux-arm-kernel

On Sun, Mar 13, 2011 at 03:53:28PM +0200, Vasily Khoruzhick wrote:
> Fix regression that was introduced by dynamic register layout.

applied both to the relevant -next branch

-- 
Ben Dooks, ben at fluff.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-14 14:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-13 13:53 [PATCH 1/2] i2c-pxa2xx: Fix register offsets Vasily Khoruzhick
2011-03-13 13:53 ` [PATCH 2/2] i2c-pxa2xx: Don't clear isr bits too early Vasily Khoruzhick
2011-03-14 14:15 ` [PATCH 1/2] i2c-pxa2xx: Fix register offsets Sebastian Andrzej Siewior
2011-03-14 14:29 ` 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).