From: Linus Torvalds Date: Fri, 18 Sep 2009 16:19:26 +0000 (-0700) Subject: Merge branch 'omap-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind... X-Git-Tag: v2.6.32-rc1~645 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=73c583e4e2dd0fbbf2fafe0cc57ff75314fe72df;p=profile%2Fivi%2Fkernel-adaptation-intel-automotive.git Merge branch 'omap-for-linus' of git://git./linux/kernel/git/tmlind/linux-omap-2.6 * 'omap-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6: (47 commits) OMAP clock: use debugfs_remove_recursive() for rewinding OMAP2/3/4 core: create omap_device layer OMAP: omap_hwmod: call omap_hwmod init at boot; create interconnects OMAP2/3/4: create omap_hwmod layer OMAP2/3 board-*.c files: read bootloader configuration earlier OMAP2/3/4 PRCM: add module IDLEST wait code OMAP2/3 PM: create the OMAP PM interface and add a default OMAP PM no-op layer OMAP3 clock: remove superfluous calls to omap2_init_clk_clkdm OMAP clock: associate MPU clocks with the mpu_clkdm OMAP3 clock: Fixed processing of bootarg 'mpurate' OMAP: SDRC: Add several new register definitions OMAP: powerdomain: Fix overflow when doing powerdomain deps lookups. OMAP: PM: Added suspend target state control to debugfs for OMAP3 OMAP: PM debug: Add PRCM register dump support OMAP: PM debug: make powerdomains use PM-debug counters OMAP: PM: Add pm-debug counters OMAP: PM: Add closures to clkdm_for_each and pwrdm_for_each. OMAP: PM: Hook into PM counters OMAP: PM counter infrastructure. OMAP3: PM: fix lockdep warning caused by omap3_pm_init ... --- 73c583e4e2dd0fbbf2fafe0cc57ff75314fe72df diff --cc arch/arm/plat-omap/gpio.c index 176c86e,7c70a6a..693839c --- a/arch/arm/plat-omap/gpio.c +++ b/arch/arm/plat-omap/gpio.c @@@ -2054,15 -1910,39 +2054,34 @@@ void omap2_gpio_resume_after_retention( * state. If so, generate an IRQ by software. This is * horribly racy, but it's the best we can do to work around * this silicon bug. */ -#if defined(CONFIG_ARCH_OMAP24XX) || defined(CONFIG_ARCH_OMAP34XX) || \ - defined(CONFIG_ARCH_OMAP4) - l = __raw_readl(bank->base + OMAP24XX_GPIO_DATAIN); -#endif l ^= bank->saved_datain; l &= bank->non_wakeup_gpios; - if (l) { + + /* + * No need to generate IRQs for the rising edge for gpio IRQs + * configured with falling edge only; and vice versa. + */ + gen0 = l & bank->saved_fallingdetect; + gen0 &= bank->saved_datain; + + gen1 = l & bank->saved_risingdetect; + gen1 &= ~(bank->saved_datain); + + /* FIXME: Consider GPIO IRQs with level detections properly! */ + gen = l & (~(bank->saved_fallingdetect) & + ~(bank->saved_risingdetect)); + /* Consider all GPIO IRQs needed to be updated */ + gen |= gen0 | gen1; + + if (gen) { u32 old0, old1; -#if defined(CONFIG_ARCH_OMAP24XX) || defined(CONFIG_ARCH_OMAP34XX) || \ - defined(CONFIG_ARCH_OMAP4) +#if defined(CONFIG_ARCH_OMAP24XX) || defined(CONFIG_ARCH_OMAP34XX) old0 = __raw_readl(bank->base + OMAP24XX_GPIO_LEVELDETECT0); old1 = __raw_readl(bank->base + OMAP24XX_GPIO_LEVELDETECT1); - __raw_writel(old0 | l, bank->base + OMAP24XX_GPIO_LEVELDETECT0); - __raw_writel(old1 | l, bank->base + OMAP24XX_GPIO_LEVELDETECT1); + __raw_writel(old0 | gen, bank->base + + OMAP24XX_GPIO_LEVELDETECT0); + __raw_writel(old1 | gen, bank->base + + OMAP24XX_GPIO_LEVELDETECT1); __raw_writel(old0, bank->base + OMAP24XX_GPIO_LEVELDETECT0); __raw_writel(old1, bank->base + OMAP24XX_GPIO_LEVELDETECT1); #endif