Merge branch 'omap-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind...
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 18 Sep 2009 16:19:26 +0000 (09:19 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 18 Sep 2009 16:19:26 +0000 (09:19 -0700)
* '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
  ...

1  2 
arch/arm/mach-omap2/board-4430sdp.c
arch/arm/mach-omap2/serial.c
arch/arm/plat-omap/common.c
arch/arm/plat-omap/dma.c
arch/arm/plat-omap/gpio.c

Simple merge
Simple merge
Simple merge
Simple merge
index 176c86e5531d62f01376beb693cee0b55eb7cbc4,7c70a6afcf66ffa0adc4bd55e8ecbb31d6acc815..693839c89ad08475cec23e2f74dc92755949ffc9
@@@ -2054,31 -1910,41 +2054,50 @@@ 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
 +#ifdef CONFIG_ARCH_OMAP4
 +                      old0 = __raw_readl(bank->base +
 +                                              OMAP4_GPIO_LEVELDETECT0);
 +                      old1 = __raw_readl(bank->base +
 +                                              OMAP4_GPIO_LEVELDETECT1);
 +                      __raw_writel(old0 | l, bank->base +
 +                                              OMAP4_GPIO_LEVELDETECT0);
 +                      __raw_writel(old1 | l, bank->base +
 +                                              OMAP4_GPIO_LEVELDETECT1);
 +                      __raw_writel(old0, bank->base +
 +                                              OMAP4_GPIO_LEVELDETECT0);
 +                      __raw_writel(old1, bank->base +
 +                                              OMAP4_GPIO_LEVELDETECT1);
  #endif
                }
        }