diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-05-18 01:37:44 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-05-18 01:37:49 -0400 |
commit | dc3f81b129b5439ba7bac265bbc6a51a39275dae (patch) | |
tree | 216030731d911249496d2e97206cd61431e31c89 /arch/arm/plat-omap/gpio.c | |
parent | d2517a49d55536b38c7a87e5289550cfedaa4dcc (diff) | |
parent | 1406de8e11eb043681297adf86d6892ff8efc27a (diff) |
Merge commit 'v2.6.30-rc6' into perfcounters/core
Merge reason: this branch was on an -rc4 base, merge it up to -rc6
to get the latest upstream fixes.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/arm/plat-omap/gpio.c')
-rw-r--r-- | arch/arm/plat-omap/gpio.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/arch/arm/plat-omap/gpio.c b/arch/arm/plat-omap/gpio.c index d3fa41e3d8c5..17d7afe42b83 100644 --- a/arch/arm/plat-omap/gpio.c +++ b/arch/arm/plat-omap/gpio.c | |||
@@ -758,8 +758,12 @@ static void _clear_gpio_irqbank(struct gpio_bank *bank, int gpio_mask) | |||
758 | 758 | ||
759 | /* Workaround for clearing DSP GPIO interrupts to allow retention */ | 759 | /* Workaround for clearing DSP GPIO interrupts to allow retention */ |
760 | #if defined(CONFIG_ARCH_OMAP24XX) || defined(CONFIG_ARCH_OMAP34XX) | 760 | #if defined(CONFIG_ARCH_OMAP24XX) || defined(CONFIG_ARCH_OMAP34XX) |
761 | reg = bank->base + OMAP24XX_GPIO_IRQSTATUS2; | ||
761 | if (cpu_is_omap24xx() || cpu_is_omap34xx()) | 762 | if (cpu_is_omap24xx() || cpu_is_omap34xx()) |
762 | __raw_writel(gpio_mask, bank->base + OMAP24XX_GPIO_IRQSTATUS2); | 763 | __raw_writel(gpio_mask, reg); |
764 | |||
765 | /* Flush posted write for the irq status to avoid spurious interrupts */ | ||
766 | __raw_readl(reg); | ||
763 | #endif | 767 | #endif |
764 | } | 768 | } |
765 | 769 | ||
@@ -921,13 +925,10 @@ static int _set_gpio_wakeup(struct gpio_bank *bank, int gpio, int enable) | |||
921 | case METHOD_MPUIO: | 925 | case METHOD_MPUIO: |
922 | case METHOD_GPIO_1610: | 926 | case METHOD_GPIO_1610: |
923 | spin_lock_irqsave(&bank->lock, flags); | 927 | spin_lock_irqsave(&bank->lock, flags); |
924 | if (enable) { | 928 | if (enable) |
925 | bank->suspend_wakeup |= (1 << gpio); | 929 | bank->suspend_wakeup |= (1 << gpio); |
926 | enable_irq_wake(bank->irq); | 930 | else |
927 | } else { | ||
928 | disable_irq_wake(bank->irq); | ||
929 | bank->suspend_wakeup &= ~(1 << gpio); | 931 | bank->suspend_wakeup &= ~(1 << gpio); |
930 | } | ||
931 | spin_unlock_irqrestore(&bank->lock, flags); | 932 | spin_unlock_irqrestore(&bank->lock, flags); |
932 | return 0; | 933 | return 0; |
933 | #endif | 934 | #endif |
@@ -940,13 +941,10 @@ static int _set_gpio_wakeup(struct gpio_bank *bank, int gpio, int enable) | |||
940 | return -EINVAL; | 941 | return -EINVAL; |
941 | } | 942 | } |
942 | spin_lock_irqsave(&bank->lock, flags); | 943 | spin_lock_irqsave(&bank->lock, flags); |
943 | if (enable) { | 944 | if (enable) |
944 | bank->suspend_wakeup |= (1 << gpio); | 945 | bank->suspend_wakeup |= (1 << gpio); |
945 | enable_irq_wake(bank->irq); | 946 | else |
946 | } else { | ||
947 | disable_irq_wake(bank->irq); | ||
948 | bank->suspend_wakeup &= ~(1 << gpio); | 947 | bank->suspend_wakeup &= ~(1 << gpio); |
949 | } | ||
950 | spin_unlock_irqrestore(&bank->lock, flags); | 948 | spin_unlock_irqrestore(&bank->lock, flags); |
951 | return 0; | 949 | return 0; |
952 | #endif | 950 | #endif |