Skip to contentSkip to conversation

omap fixes for 2.6.35-rc2

PATCH New Tony Lindgren 1 participant 6 messages Jun 8, 2010

Subsystems (5)
lore
Share & tools
lore

Tony Lindgren

author maintainer
#0 lore raw

cover omap fixes for 2.6.35-rc2

Hi all,

Here are few omap fixes for review. I've moved anything that's not absolutely needed as a fix into for-next as requested by Linus.

Regards,

Tony

---

Amit Kucheria (1):
omap: fix build failure due to missing include dma-mapping.h

Kevin Hilman (2):
omap: GPIO: fix auto-disable of debounce clock
OMAP3: PM: fix IO daisy chain enable to use PM_WKEN reg

Santosh Shilimkar (1):
omap: Stalker board: switch over to gpio_set_debounce

Tero Kristo (1):
omap: DMTIMER: Ack pending interrupt always when stopping a timer

 arch/arm/mach-omap2/board-omap3stalker.c |    4 +---
 arch/arm/mach-omap2/pm34xx.c             |    4 ++--
 arch/arm/mach-omap2/usb-ehci.c           |    2 ++
 arch/arm/plat-omap/dmtimer.c             |    6 +++---
 arch/arm/plat-omap/gpio.c                |    1 +
 5 files changed, 9 insertions(+), 8 deletions(-)
Signature · 1 line
Signature
author maintainer
#1 lore raw

PATCH 1/5 omap: fix build failure due to missing include dma-mapping.h

From: Amit Kucheria <[email protected]>

Fixes following error,

CC arch/arm/mach-omap2/usb-ehci.o
arch/arm/mach-omap2/usb-ehci.c:263: error: implicit declaration of function 'DMA_BIT_MASK'
arch/arm/mach-omap2/usb-ehci.c:263: error: initializer element is not constant make[1]: *** [arch/arm/mach-omap2/usb-ehci.o] Error 1

---
 arch/arm/mach-omap2/usb-ehci.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
arch/arm/mach-omap2/usb-ehci.c +2 -0
index c68f799..d72d1ac 100644
@@ -20,6 +20,8 @@
 #include <linux/delay.h>
 #include <linux/platform_device.h>
 #include <linux/clk.h>
+#include <linux/dma-mapping.h>
+
 #include <asm/io.h>
 #include <plat/mux.h>
 
author maintainer
#2 lore raw

PATCH 2/5 omap: Stalker board: switch over to gpio_set_debounce

In reply to Tony Lindgren

From: Santosh Shilimkar <[email protected]>

With latest linus's tip, omap3_defconfig is broken.

LD init/built-in.o
LD .tmp_vmlinux1
arch/arm/mach-omap2/built-in.o: In function `ads7846_dev_init':
linux-2.6/arch/arm/mach-omap2/board-omap3stalker.c:542: undefined reference to omap_set_gpio_debounce' linux-2.6/arch/arm/mach-omap2/board-omap3stalker.c:543: undefined reference to omap_set_gpio_debounce_time'
make: *** [.tmp_vmlinux1] Error 1

Quoted 1 line

From the commit 48feb337475a ( arm: omap: switch over to gpio_set_debounce),

board-omap3stalker.c seems to be missed out or got merged later. The patch was to remove omap-specific implementations for gpio debouncing in favor of gpiolib function.

---
 arch/arm/mach-omap2/board-omap3stalker.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)
arch/arm/mach-omap2/board-omap3stalker.c +1 -3
index f848ba8..a04cffd 100644
@@ -538,9 +538,7 @@ static void ads7846_dev_init(void)
 		printk(KERN_ERR "can't get ads7846 pen down GPIO\n");
 
 	gpio_direction_input(OMAP3_STALKER_TS_GPIO);
-
-	omap_set_gpio_debounce(OMAP3_STALKER_TS_GPIO, 1);
-	omap_set_gpio_debounce_time(OMAP3_STALKER_TS_GPIO, 0xa);
+	gpio_set_debounce(OMAP3_STALKER_TS_GPIO, 310);
 }
 
 static int ads7846_get_pendown_state(void)
author maintainer
#3 lore raw

PATCH 3/5 omap: DMTIMER: Ack pending interrupt always when stopping a timer

In reply to Tony Lindgren

From: Tero Kristo <[email protected]>

The kernel timer queue is being run currently from a GP timer running in a one shot mode, which works in a way that when it expires, it will also stop. Usually during this situation, the interrupt handler will ack the interrupt, load a new value to the timer and start it again. During suspend, the situation is slightly different, as we disable interrupts just before timekeeping is suspended, which leaves a small window where the timer can expire before it is stopped, and will leave the interrupt flag pending. This pending interrupt will prevent ARM sleep entry, thus now we ack it always when we are attempting to stop a timer.

[[email protected]: removed the ifdef to make the patch cover omap1 also]
---
 arch/arm/plat-omap/dmtimer.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
arch/arm/plat-omap/dmtimer.c +3 -3
index c64875f..44bafda 100644
@@ -541,11 +541,11 @@ void omap_dm_timer_stop(struct omap_dm_timer *timer)
 		  * timer is stopped
 		  */
 		udelay(3500000 / clk_get_rate(timer->fclk) + 1);
-		/* Ack possibly pending interrupt */
-		omap_dm_timer_write_reg(timer, OMAP_TIMER_STAT_REG,
-				OMAP_TIMER_INT_OVERFLOW);
 #endif
 	}
+	/* Ack possibly pending interrupt */
+	omap_dm_timer_write_reg(timer, OMAP_TIMER_STAT_REG,
+			OMAP_TIMER_INT_OVERFLOW);
 }
 EXPORT_SYMBOL_GPL(omap_dm_timer_stop);
 
author maintainer
#4 lore raw

PATCH 4/5 omap: GPIO: fix auto-disable of debounce clock

In reply to Tony Lindgren

From: Kevin Hilman <[email protected]>

The addition of the new debounce code (commit 168ef3d9a56bd8bffe0ef4189c450888b4aefefe) broke the auto-disable of debounce clocks on idle by forgetting to update the debounce clock enable mask.

Add back the updating of bank->dbck_enable_mask so debounce clocks are auto-disabled.

---
 arch/arm/plat-omap/gpio.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
arch/arm/plat-omap/gpio.c +1 -0
index 393e921..9b7e354 100644
@@ -673,6 +673,7 @@ static void _set_gpio_debounce(struct gpio_bank *bank, unsigned gpio,
 		if (cpu_is_omap34xx() || cpu_is_omap44xx())
 			clk_disable(bank->dbck);
 	}
+	bank->dbck_enable_mask = val;
 
 	__raw_writel(val, reg);
 }
author maintainer
#5 lore raw

PATCH 5/5 OMAP3: PM: fix IO daisy chain enable to use PM_WKEN reg

In reply to Tony Lindgren

From: Kevin Hilman <[email protected]>

Checking to se if the IO daisy chain is enabled should be checking the PM_WKEN register, not the PM_WKST register. Reading PM_WKST tells us if an event occurred, not whether or not it is enabled.

Apparently, we've been lucky until now in that a pending event has not been there during enable. However, on 3630/Zoom3, I noticed because of the WARN that this timeout was always happening.

---
 arch/arm/mach-omap2/pm34xx.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
arch/arm/mach-omap2/pm34xx.c +2 -2
index 2e96771..b88737f 100644
@@ -99,7 +99,7 @@ static void omap3_enable_io_chain(void)
 		/* Do a readback to assure write has been done */
 		prm_read_mod_reg(WKUP_MOD, PM_WKEN);
 
-		while (!(prm_read_mod_reg(WKUP_MOD, PM_WKST) &
+		while (!(prm_read_mod_reg(WKUP_MOD, PM_WKEN) &
 			 OMAP3430_ST_IO_CHAIN_MASK)) {
 			timeout++;
 			if (timeout > 1000) {
@@ -108,7 +108,7 @@ static void omap3_enable_io_chain(void)
 				return;
 			}
 			prm_set_mod_reg_bits(OMAP3430_ST_IO_CHAIN_MASK,
-					     WKUP_MOD, PM_WKST);
+					     WKUP_MOD, PM_WKEN);
 		}
 	}
 }