aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin
diff options
context:
space:
mode:
Diffstat (limited to 'arch/blackfin')
-rw-r--r--arch/blackfin/kernel/bfin_gpio.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/arch/blackfin/kernel/bfin_gpio.c b/arch/blackfin/kernel/bfin_gpio.c
index 8cefed8cf5d9..bb1f4fb2467c 100644
--- a/arch/blackfin/kernel/bfin_gpio.c
+++ b/arch/blackfin/kernel/bfin_gpio.c
@@ -494,19 +494,24 @@ u32 gpio_pm_setup(void)
494 gpio_bank_saved[bank].dir = gpio_bankb[bank]->dir; 494 gpio_bank_saved[bank].dir = gpio_bankb[bank]->dir;
495 gpio_bank_saved[bank].edge = gpio_bankb[bank]->edge; 495 gpio_bank_saved[bank].edge = gpio_bankb[bank]->edge;
496 gpio_bank_saved[bank].both = gpio_bankb[bank]->both; 496 gpio_bank_saved[bank].both = gpio_bankb[bank]->both;
497 gpio_bank_saved[bank].reserved = reserved_map[bank];
497 498
498 gpio = i; 499 gpio = i;
499 500
500 while (mask) { 501 while (mask) {
501 if (mask & 1) { 502 if (mask & 1) {
502 bfin_gpio_wakeup_type(gpio, wakeup_flags_map[gpio]); 503 reserved_map[gpio_bank(gpio)] |=
504 gpio_bit(gpio);
505 bfin_gpio_wakeup_type(gpio,
506 wakeup_flags_map[gpio]);
503 set_gpio_data(gpio, 0); /*Clear*/ 507 set_gpio_data(gpio, 0); /*Clear*/
504 } 508 }
505 gpio++; 509 gpio++;
506 mask >>= 1; 510 mask >>= 1;
507 } 511 }
508 512
509 sic_iwr |= 1 << (sic_iwr_irqs[bank] - (IRQ_CORETMR + 1)); 513 sic_iwr |= 1 <<
514 (sic_iwr_irqs[bank] - (IRQ_CORETMR + 1));
510 gpio_bankb[bank]->maskb_set = wakeup_map[gpio_bank(i)]; 515 gpio_bankb[bank]->maskb_set = wakeup_map[gpio_bank(i)];
511 } 516 }
512 } 517 }
@@ -535,6 +540,9 @@ void gpio_pm_restore(void)
535 gpio_bankb[bank]->polar = gpio_bank_saved[bank].polar; 540 gpio_bankb[bank]->polar = gpio_bank_saved[bank].polar;
536 gpio_bankb[bank]->edge = gpio_bank_saved[bank].edge; 541 gpio_bankb[bank]->edge = gpio_bank_saved[bank].edge;
537 gpio_bankb[bank]->both = gpio_bank_saved[bank].both; 542 gpio_bankb[bank]->both = gpio_bank_saved[bank].both;
543
544 reserved_map[bank] = gpio_bank_saved[bank].reserved;
545
538 } 546 }
539 547
540 gpio_bankb[bank]->maskb = gpio_bank_saved[bank].maskb; 548 gpio_bankb[bank]->maskb = gpio_bank_saved[bank].maskb;