powerdomain.h (129c65ee66a97fbf663f2f5fce26aacdc7348736) powerdomain.h (8179488a36985d4929cf89be5d9171145a769511)
1/*
2 * OMAP2/3/4 powerdomain control
3 *
4 * Copyright (C) 2007-2008, 2010 Texas Instruments, Inc.
5 * Copyright (C) 2007-2011 Nokia Corporation
6 *
7 * Paul Walmsley
8 *

--- 64 unchanged lines hidden (view full) ---

73#define PWRDM_TRANSITION_BAILOUT 100000
74
75struct clockdomain;
76struct powerdomain;
77
78/**
79 * struct powerdomain - OMAP powerdomain
80 * @name: Powerdomain name
1/*
2 * OMAP2/3/4 powerdomain control
3 *
4 * Copyright (C) 2007-2008, 2010 Texas Instruments, Inc.
5 * Copyright (C) 2007-2011 Nokia Corporation
6 *
7 * Paul Walmsley
8 *

--- 64 unchanged lines hidden (view full) ---

73#define PWRDM_TRANSITION_BAILOUT 100000
74
75struct clockdomain;
76struct powerdomain;
77
78/**
79 * struct powerdomain - OMAP powerdomain
80 * @name: Powerdomain name
81 * @omap_chip: represents the OMAP chip types containing this pwrdm
82 * @prcm_offs: the address offset from CM_BASE/PRM_BASE
83 * @prcm_partition: (OMAP4 only) the PRCM partition ID containing @prcm_offs
84 * @pwrsts: Possible powerdomain power states
85 * @pwrsts_logic_ret: Possible logic power states when pwrdm in RETENTION
86 * @flags: Powerdomain flags
87 * @banks: Number of software-controllable memory banks in this powerdomain
88 * @pwrsts_mem_ret: Possible memory bank pwrstates when pwrdm in RETENTION
89 * @pwrsts_mem_on: Possible memory bank pwrstates when pwrdm in ON
90 * @pwrdm_clkdms: Clockdomains in this powerdomain
91 * @node: list_head linking all powerdomains
92 * @state:
93 * @state_counter:
94 * @timer:
95 * @state_timer:
96 *
97 * @prcm_partition possible values are defined in mach-omap2/prcm44xx.h.
98 */
99struct powerdomain {
100 const char *name;
81 * @prcm_offs: the address offset from CM_BASE/PRM_BASE
82 * @prcm_partition: (OMAP4 only) the PRCM partition ID containing @prcm_offs
83 * @pwrsts: Possible powerdomain power states
84 * @pwrsts_logic_ret: Possible logic power states when pwrdm in RETENTION
85 * @flags: Powerdomain flags
86 * @banks: Number of software-controllable memory banks in this powerdomain
87 * @pwrsts_mem_ret: Possible memory bank pwrstates when pwrdm in RETENTION
88 * @pwrsts_mem_on: Possible memory bank pwrstates when pwrdm in ON
89 * @pwrdm_clkdms: Clockdomains in this powerdomain
90 * @node: list_head linking all powerdomains
91 * @state:
92 * @state_counter:
93 * @timer:
94 * @state_timer:
95 *
96 * @prcm_partition possible values are defined in mach-omap2/prcm44xx.h.
97 */
98struct powerdomain {
99 const char *name;
101 const struct omap_chip_id omap_chip;
102 const s16 prcm_offs;
103 const u8 pwrsts;
104 const u8 pwrsts_logic_ret;
105 const u8 flags;
106 const u8 banks;
107 const u8 pwrsts_mem_ret[PWRDM_MAX_MEM_BANKS];
108 const u8 pwrsts_mem_on[PWRDM_MAX_MEM_BANKS];
109 const u8 prcm_partition;

--- 97 unchanged lines hidden (view full) ---

207int pwrdm_state_switch(struct powerdomain *pwrdm);
208int pwrdm_clkdm_state_switch(struct clockdomain *clkdm);
209int pwrdm_pre_transition(void);
210int pwrdm_post_transition(void);
211int pwrdm_set_lowpwrstchange(struct powerdomain *pwrdm);
212u32 pwrdm_get_context_loss_count(struct powerdomain *pwrdm);
213bool pwrdm_can_ever_lose_context(struct powerdomain *pwrdm);
214
100 const s16 prcm_offs;
101 const u8 pwrsts;
102 const u8 pwrsts_logic_ret;
103 const u8 flags;
104 const u8 banks;
105 const u8 pwrsts_mem_ret[PWRDM_MAX_MEM_BANKS];
106 const u8 pwrsts_mem_on[PWRDM_MAX_MEM_BANKS];
107 const u8 prcm_partition;

--- 97 unchanged lines hidden (view full) ---

205int pwrdm_state_switch(struct powerdomain *pwrdm);
206int pwrdm_clkdm_state_switch(struct clockdomain *clkdm);
207int pwrdm_pre_transition(void);
208int pwrdm_post_transition(void);
209int pwrdm_set_lowpwrstchange(struct powerdomain *pwrdm);
210u32 pwrdm_get_context_loss_count(struct powerdomain *pwrdm);
211bool pwrdm_can_ever_lose_context(struct powerdomain *pwrdm);
212
215extern void omap2xxx_powerdomains_init(void);
213extern void omap242x_powerdomains_init(void);
214extern void omap243x_powerdomains_init(void);
216extern void omap3xxx_powerdomains_init(void);
217extern void omap44xx_powerdomains_init(void);
218
219extern struct pwrdm_ops omap2_pwrdm_operations;
220extern struct pwrdm_ops omap3_pwrdm_operations;
221extern struct pwrdm_ops omap4_pwrdm_operations;
222
223/* Common Internal functions used across OMAP rev's */
224extern u32 omap2_pwrdm_get_mem_bank_onstate_mask(u8 bank);
225extern u32 omap2_pwrdm_get_mem_bank_retst_mask(u8 bank);
226extern u32 omap2_pwrdm_get_mem_bank_stst_mask(u8 bank);
227
228extern struct powerdomain wkup_omap2_pwrdm;
229extern struct powerdomain gfx_omap2_pwrdm;
230
231
232#endif
215extern void omap3xxx_powerdomains_init(void);
216extern void omap44xx_powerdomains_init(void);
217
218extern struct pwrdm_ops omap2_pwrdm_operations;
219extern struct pwrdm_ops omap3_pwrdm_operations;
220extern struct pwrdm_ops omap4_pwrdm_operations;
221
222/* Common Internal functions used across OMAP rev's */
223extern u32 omap2_pwrdm_get_mem_bank_onstate_mask(u8 bank);
224extern u32 omap2_pwrdm_get_mem_bank_retst_mask(u8 bank);
225extern u32 omap2_pwrdm_get_mem_bank_stst_mask(u8 bank);
226
227extern struct powerdomain wkup_omap2_pwrdm;
228extern struct powerdomain gfx_omap2_pwrdm;
229
230
231#endif