fed up with those stupid warnings
[mmotm.git] / arch / blackfin / include / asm / dpmc.h
blob925e66cb2d49273581ec44c09b9ffe339dab19b4
1 /*
2 * Miscellaneous IOCTL commands for Dynamic Power Management Controller Driver
4 * Copyright (C) 2004-2008 Analog Device Inc.
6 * Licensed under the GPL-2
7 */
9 #ifndef _BLACKFIN_DPMC_H_
10 #define _BLACKFIN_DPMC_H_
12 #ifdef __KERNEL__
13 #ifndef __ASSEMBLY__
15 void sleep_mode(u32 sic_iwr0, u32 sic_iwr1, u32 sic_iwr2);
16 void hibernate_mode(u32 sic_iwr0, u32 sic_iwr1, u32 sic_iwr2);
17 void sleep_deeper(u32 sic_iwr0, u32 sic_iwr1, u32 sic_iwr2);
18 void do_hibernate(int wakeup);
19 void set_dram_srfs(void);
20 void unset_dram_srfs(void);
22 #define VRPAIR(vlev, freq) (((vlev) << 16) | ((freq) >> 16))
24 struct bfin_dpmc_platform_data {
25 const unsigned int *tuple_tab;
26 unsigned short tabsize;
27 unsigned short vr_settling_time; /* in us */
30 #else
32 #define PM_PUSH(x) \
33 R0 = [P0 + (x - SRAM_BASE_ADDRESS)];\
34 [--SP] = R0;\
36 #define PM_POP(x) \
37 R0 = [SP++];\
38 [P0 + (x - SRAM_BASE_ADDRESS)] = R0;\
40 #define PM_SYS_PUSH(x) \
41 R0 = [P0 + (x - PLL_CTL)];\
42 [--SP] = R0;\
44 #define PM_SYS_POP(x) \
45 R0 = [SP++];\
46 [P0 + (x - PLL_CTL)] = R0;\
48 #define PM_SYS_PUSH16(x) \
49 R0 = w[P0 + (x - PLL_CTL)];\
50 [--SP] = R0;\
52 #define PM_SYS_POP16(x) \
53 R0 = [SP++];\
54 w[P0 + (x - PLL_CTL)] = R0;\
56 #endif
57 #endif /* __KERNEL__ */
59 #endif /*_BLACKFIN_DPMC_H_*/