aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-blackfin
diff options
context:
space:
mode:
authorMichael Hennerich <michael.hennerich@analog.com>2008-02-08 15:12:37 -0500
committerBryan Wu <bryan.wu@analog.com>2008-02-08 15:12:37 -0500
commitcfefe3c683e0d14c9ce3aeb883c55c7f30c20183 (patch)
tree77434010fc64f64606e893ce7b6f73243073ebb0 /include/asm-blackfin
parent2c4f829b0ce3d2fb447acca823e141094a50daa5 (diff)
[Blackfin] arch: hook up set_irq_wake in Blackfin's irq code
- Add support for irq_wake on system and gpio interrupts - Remove outdated kernel options - Add option to select default PM mode - Fix various places where SIC_IWRx was only handled partially Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Diffstat (limited to 'include/asm-blackfin')
-rw-r--r--include/asm-blackfin/bfin-global.h2
-rw-r--r--include/asm-blackfin/dpmc.h8
-rw-r--r--include/asm-blackfin/gpio.h8
3 files changed, 12 insertions, 6 deletions
diff --git a/include/asm-blackfin/bfin-global.h b/include/asm-blackfin/bfin-global.h
index 6ae0619d7696..5dba3a735596 100644
--- a/include/asm-blackfin/bfin-global.h
+++ b/include/asm-blackfin/bfin-global.h
@@ -70,6 +70,7 @@ extern void program_IAR(void);
70extern void evt14_softirq(void); 70extern void evt14_softirq(void);
71extern asmlinkage void asm_do_IRQ(unsigned int irq, struct pt_regs *regs); 71extern asmlinkage void asm_do_IRQ(unsigned int irq, struct pt_regs *regs);
72extern void bfin_gpio_interrupt_setup(int irq, int irq_pfx, int type); 72extern void bfin_gpio_interrupt_setup(int irq, int irq_pfx, int type);
73extern int bfin_internal_set_wake(unsigned int irq, unsigned int state);
73 74
74extern asmlinkage void finish_atomic_sections (struct pt_regs *regs); 75extern asmlinkage void finish_atomic_sections (struct pt_regs *regs);
75extern char fixed_code_start; 76extern char fixed_code_start;
@@ -121,6 +122,7 @@ extern unsigned long dpdt_swapcount_table[];
121 122
122extern unsigned long table_start, table_end; 123extern unsigned long table_start, table_end;
123 124
125extern unsigned long bfin_sic_iwr[];
124extern u16 _bfin_swrst; /* shadow for Software Reset Register (SWRST) */ 126extern u16 _bfin_swrst; /* shadow for Software Reset Register (SWRST) */
125extern struct file_operations dpmc_fops; 127extern struct file_operations dpmc_fops;
126extern char _start; 128extern char _start;
diff --git a/include/asm-blackfin/dpmc.h b/include/asm-blackfin/dpmc.h
index f162edb23033..686cf83a5269 100644
--- a/include/asm-blackfin/dpmc.h
+++ b/include/asm-blackfin/dpmc.h
@@ -53,10 +53,10 @@ unsigned long get_pll_status(void);
53void change_baud(int baud); 53void change_baud(int baud);
54void fullon_mode(void); 54void fullon_mode(void);
55void active_mode(void); 55void active_mode(void);
56void sleep_mode(u32 sic_iwr); 56void sleep_mode(u32 sic_iwr0, u32 sic_iwr1, u32 sic_iwr2);
57void deep_sleep(u32 sic_iwr); 57void deep_sleep(u32 sic_iwr0, u32 sic_iwr1, u32 sic_iwr2);
58void hibernate_mode(u32 sic_iwr); 58void hibernate_mode(u32 sic_iwr0, u32 sic_iwr1, u32 sic_iwr2);
59void sleep_deeper(u32 sic_iwr); 59void sleep_deeper(u32 sic_iwr0, u32 sic_iwr1, u32 sic_iwr2);
60void program_wdog_timer(unsigned long); 60void program_wdog_timer(unsigned long);
61void unmask_wdog_wakeup_evt(void); 61void unmask_wdog_wakeup_evt(void);
62void clear_wdog_wakeup_evt(void); 62void clear_wdog_wakeup_evt(void);
diff --git a/include/asm-blackfin/gpio.h b/include/asm-blackfin/gpio.h
index d0426c108262..27ff532a806c 100644
--- a/include/asm-blackfin/gpio.h
+++ b/include/asm-blackfin/gpio.h
@@ -376,16 +376,19 @@ struct gpio_port_t {
376#endif 376#endif
377 377
378#ifdef CONFIG_PM 378#ifdef CONFIG_PM
379unsigned int bfin_pm_setup(void);
380void bfin_pm_restore(void);
381
382#ifndef CONFIG_BF54x
379#define PM_WAKE_RISING 0x1 383#define PM_WAKE_RISING 0x1
380#define PM_WAKE_FALLING 0x2 384#define PM_WAKE_FALLING 0x2
381#define PM_WAKE_HIGH 0x4 385#define PM_WAKE_HIGH 0x4
382#define PM_WAKE_LOW 0x8 386#define PM_WAKE_LOW 0x8
383#define PM_WAKE_BOTH_EDGES (PM_WAKE_RISING | PM_WAKE_FALLING) 387#define PM_WAKE_BOTH_EDGES (PM_WAKE_RISING | PM_WAKE_FALLING)
388#define PM_WAKE_IGNORE 0xF0
384 389
385int gpio_pm_wakeup_request(unsigned gpio, unsigned char type); 390int gpio_pm_wakeup_request(unsigned gpio, unsigned char type);
386void gpio_pm_wakeup_free(unsigned gpio); 391void gpio_pm_wakeup_free(unsigned gpio);
387unsigned int gpio_pm_setup(void);
388void gpio_pm_restore(void);
389 392
390struct gpio_port_s { 393struct gpio_port_s {
391 unsigned short data; 394 unsigned short data;
@@ -409,6 +412,7 @@ struct gpio_port_s {
409 unsigned short fer; 412 unsigned short fer;
410 unsigned short reserved; 413 unsigned short reserved;
411}; 414};
415#endif /*CONFIG_BF54x*/
412#endif /*CONFIG_PM*/ 416#endif /*CONFIG_PM*/
413 417
414/*********************************************************** 418/***********************************************************