summaryrefslogtreecommitdiff
path: root/arch/blackfin/kernel/bfin_gpio.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-08 23:33:45 (GMT)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-08 23:33:45 (GMT)
commit04a94babd68952a4e3cdd54ebf8ce8891f9b0f2e (patch)
tree9d4a01f6b6d0093397c2122c4d85abbb57f3e349 /arch/blackfin/kernel/bfin_gpio.c
parent765cdb6cef63c0b41c3f6c9285769080b3f41bb0 (diff)
parent920e526f93009a81e09809edb7a755a5b22e907d (diff)
downloadlinux-fsl-qoriq-04a94babd68952a4e3cdd54ebf8ce8891f9b0f2e.tar.xz
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/blackfin-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/blackfin-2.6: (24 commits) [Blackfin] arch: import defines for BF547 -- it is just like the BF548, but no CAN [Blackfin] arch: fix build fails only include header files when enabled [Blackfin] arch: declare default INSTALL_PATH for Blackfin ports [Blackfin] arch: Encourage users to use the spidev character driver: Provide platform support [Blackfin] arch: Enable UART2 and UART3 for bf548 [Blackfin] arch: Enable NET2272 on BF561-EZkit - remove request_mem_region [Blackfin] arch:Fix BUG [#3876] pfbutton test for BTN3 on bf533 don't show complete info [Blackfin] arch: remove duplicated definitions of the line discipline numbers N_* in asm-blackfin/termios.h [Blackfin] arch: fix building with mtd uclinux by putting the mtd_phys option into the function it actually gets used in [Blackfin] arch: simpler header and update dates [Blackfin] arch: move the init sections to the end of memory [Blackfin] arch: change the trace buffer control start/stop logic in the exception handlers [Blackfin] arch: fix typo in printk message [Blackfin] arch: this is an ezkit, not a stamp, so fixup the init function name [Blackfin] arch: add slightly better help text for CPLB_INFO [Blackfin] arch: Fix BUG - Enable ISP1362 driver to work ok with BF561 [Blackfin] arch: Fix header file information [Blackfin] arch: Add Support for ISP1362 [Blackfin] arch: add support for cmdline partitioning to the BF533-STAMP flash map driver and enable it as a module by default [Blackfin] arch: hook up set_irq_wake in Blackfin's irq code ...
Diffstat (limited to 'arch/blackfin/kernel/bfin_gpio.c')
-rw-r--r--arch/blackfin/kernel/bfin_gpio.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/arch/blackfin/kernel/bfin_gpio.c b/arch/blackfin/kernel/bfin_gpio.c
index 6bbe0a2..08788f7 100644
--- a/arch/blackfin/kernel/bfin_gpio.c
+++ b/arch/blackfin/kernel/bfin_gpio.c
@@ -186,7 +186,7 @@ static struct str_ident {
char name[RESOURCE_LABEL_SIZE];
} str_ident[MAX_RESOURCES];
-#ifdef CONFIG_PM
+#if defined(CONFIG_PM) && !defined(CONFIG_BF54x)
static unsigned short wakeup_map[gpio_bank(MAX_BLACKFIN_GPIOS)];
static unsigned char wakeup_flags_map[MAX_BLACKFIN_GPIOS];
static struct gpio_port_s gpio_bank_saved[gpio_bank(MAX_BLACKFIN_GPIOS)];
@@ -696,9 +696,8 @@ static int bfin_gpio_wakeup_type(unsigned gpio, unsigned char type)
return 0;
}
-u32 gpio_pm_setup(void)
+u32 bfin_pm_setup(void)
{
- u32 sic_iwr = 0;
u16 bank, mask, i, gpio;
for (i = 0; i < MAX_BLACKFIN_GPIOS; i += GPIO_BANKSIZE) {
@@ -723,7 +722,8 @@ u32 gpio_pm_setup(void)
gpio = i;
while (mask) {
- if (mask & 1) {
+ if ((mask & 1) && (wakeup_flags_map[gpio] !=
+ PM_WAKE_IGNORE)) {
reserved_gpio_map[gpio_bank(gpio)] |=
gpio_bit(gpio);
bfin_gpio_wakeup_type(gpio,
@@ -734,21 +734,17 @@ u32 gpio_pm_setup(void)
mask >>= 1;
}
- sic_iwr |= 1 <<
- (sic_iwr_irqs[bank] - (IRQ_CORETMR + 1));
+ bfin_internal_set_wake(sic_iwr_irqs[bank], 1);
gpio_bankb[bank]->maskb_set = wakeup_map[gpio_bank(i)];
}
}
AWA_DUMMY_READ(maskb_set);
- if (sic_iwr)
- return sic_iwr;
- else
- return IWR_ENABLE_ALL;
+ return 0;
}
-void gpio_pm_restore(void)
+void bfin_pm_restore(void)
{
u16 bank, mask, i;
@@ -768,7 +764,7 @@ void gpio_pm_restore(void)
reserved_gpio_map[bank] =
gpio_bank_saved[bank].reserved;
-
+ bfin_internal_set_wake(sic_iwr_irqs[bank], 0);
}
gpio_bankb[bank]->maskb = gpio_bank_saved[bank].maskb;