Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 313823
b: refs/heads/master
c: 923680c
h: refs/heads/master
i:
  313821: 329b5f0
  313819: 23ceb8e
  313815: 76d5537
  313807: f380aed
  313791: a2693bf
v: v3
  • Loading branch information
Steven Miao authored and Bob Liu committed Jul 24, 2012
1 parent bb2ce49 commit 35cfb71
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5f78028b1a1764cbd479092f568efe17a18af26f
refs/heads/master: 923680cbee19bf7be11c3ec3ad6e5c14c4aa2194
3 changes: 3 additions & 0 deletions trunk/arch/blackfin/mach-bf609/include/mach/pm.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,7 @@ extern void bf609_pm_finish(void);
void bf609_hibernate(void);
void bfin_sec_raise_irq(unsigned int sid);
void coreb_enable(void);

int bf609_nor_flash_init(void);
void bf609_nor_flash_exit(void);
#endif
23 changes: 22 additions & 1 deletion trunk/arch/blackfin/mach-bf609/pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
#include <linux/interrupt.h>
#include <linux/gpio.h>
#include <linux/irq.h>

#include <linux/delay.h>
#include <linux/syscore_ops.h>

#include <asm/dpmc.h>
#include <asm/pm.h>
Expand Down Expand Up @@ -293,6 +293,23 @@ static struct bfin_cpu_pm_fns bf609_cpu_pm = {
.finish = bf609_cpu_pm_finish,
};

#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE)
static void smc_pm_syscore_suspend(void)
{
bf609_nor_flash_exit();
}

static void smc_pm_syscore_resume(void)
{
bf609_nor_flash_init();
}

static struct syscore_ops smc_pm_syscore_ops = {
.suspend = smc_pm_syscore_suspend,
.resume = smc_pm_syscore_resume,
};
#endif

static irqreturn_t test_isr(int irq, void *dev_id)
{
printk(KERN_DEBUG "gpio irq %d\n", irq);
Expand All @@ -312,6 +329,10 @@ static int __init bf609_init_pm(void)
int irq;
int error;

#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE)
register_syscore_ops(&smc_pm_syscore_ops);
#endif

#ifdef CONFIG_PM_BFIN_WAKE_PE12
irq = gpio_to_irq(GPIO_PE12);
if (irq < 0) {
Expand Down

0 comments on commit 35cfb71

Please sign in to comment.