omap fixes for 2.6.35-rc2
Subsystems (5)
Tony Lindgren
maintainercover 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
Tony Lindgren
maintainerPATCH 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.oarch/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
@@ -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>
Tony Lindgren
maintainerPATCH 2/5 omap: Stalker board: switch over to gpio_set_debounce
In reply to Tony LindgrenFrom: Santosh Shilimkar <[email protected]>
With latest linus's tip, omap3_defconfig is broken.
LD init/built-in.o
LD .tmp_vmlinux1arch/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 togpio_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
@@ -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 )
Tony Lindgren
maintainerPATCH 3/5 omap: DMTIMER: Ack pending interrupt always when stopping a timer
In reply to Tony LindgrenFrom: 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.
--- arch/arm/plat-omap/dmtimer.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
arch/arm/plat-omap/dmtimer.c +3 -3
@@ -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);
Tony Lindgren
maintainerPATCH 4/5 omap: GPIO: fix auto-disable of debounce clock
In reply to Tony LindgrenFrom: 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
@@ -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); }
Tony Lindgren
maintainerPATCH 5/5 OMAP3: PM: fix IO daisy chain enable to use PM_WKEN reg
In reply to Tony LindgrenFrom: 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
@@ -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 ); } } }