• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/arch/arm/mach-omap2/

Lines Matching refs:powerdomain

2  * OMAP powerdomain control
37 #include <plat/powerdomain.h>
85 static struct powerdomain *_pwrdm_lookup(const char *name)
87 struct powerdomain *pwrdm, *temp_pwrdm;
102 * _pwrdm_register - register a powerdomain
103 * @pwrdm: struct powerdomain * to register
105 * Adds a powerdomain to the internal powerdomain list. Returns
106 * -EINVAL if given a null pointer, -EEXIST if a powerdomain is
109 static int _pwrdm_register(struct powerdomain *pwrdm)
124 /* Initialize the powerdomain's state counter */
136 pr_debug("powerdomain: registered %s\n", pwrdm->name);
141 static void _update_logic_membank_counters(struct powerdomain *pwrdm)
160 static int _pwrdm_state_switch(struct powerdomain *pwrdm, int flag)
196 static int _pwrdm_pre_transition_cb(struct powerdomain *pwrdm, void *unused)
203 static int _pwrdm_post_transition_cb(struct powerdomain *pwrdm, void *unused)
211 void pwrdm_init(struct powerdomain **pwrdm_list)
213 struct powerdomain **p = NULL;
234 * pwrdm_lookup - look up a powerdomain by name, return a pointer
235 * @name: name of powerdomain
237 * Find a registered powerdomain by its name @name. Returns a pointer
238 * to the struct powerdomain if found, or NULL otherwise.
240 struct powerdomain *pwrdm_lookup(const char *name)
242 struct powerdomain *pwrdm;
256 * Call the supplied function @fn for each registered powerdomain.
262 int pwrdm_for_each(int (*fn)(struct powerdomain *pwrdm, void *user),
265 struct powerdomain *temp_pwrdm;
281 * pwrdm_add_clkdm - add a clockdomain to a powerdomain
282 * @pwrdm: struct powerdomain * to add the clockdomain to
283 * @clkdm: struct clockdomain * to associate with a powerdomain
285 * Associate the clockdomain @clkdm with a powerdomain @pwrdm. This
290 int pwrdm_add_clkdm(struct powerdomain *pwrdm, struct clockdomain *clkdm)
298 pr_debug("powerdomain: associating clockdomain %s with powerdomain "
313 pr_debug("powerdomain: increase PWRDM_MAX_CLKDMS for "
329 * pwrdm_del_clkdm - remove a clockdomain from a powerdomain
330 * @pwrdm: struct powerdomain * to add the clockdomain to
331 * @clkdm: struct clockdomain * to associate with a powerdomain
333 * Dissociate the clockdomain @clkdm from the powerdomain
335 * if @clkdm was not associated with the powerdomain, or 0 upon
338 int pwrdm_del_clkdm(struct powerdomain *pwrdm, struct clockdomain *clkdm)
346 pr_debug("powerdomain: dissociating clockdomain %s from powerdomain "
354 pr_debug("powerdomain: clkdm %s not associated with pwrdm "
370 * @pwrdm: struct powerdomain * to iterate over
373 * Call the supplied function @fn for each clockdomain in the powerdomain
380 int pwrdm_for_each_clkdm(struct powerdomain *pwrdm,
381 int (*fn)(struct powerdomain *pwrdm,
397 * pwrdm_get_mem_bank_count - get number of memory banks in this powerdomain
398 * @pwrdm: struct powerdomain *
400 * Return the number of controllable memory banks in powerdomain @pwrdm,
401 * starting with 1. Returns -EINVAL if the powerdomain pointer is null.
403 int pwrdm_get_mem_bank_count(struct powerdomain *pwrdm)
412 * pwrdm_set_next_pwrst - set next powerdomain power state
413 * @pwrdm: struct powerdomain * to set
416 * Set the powerdomain @pwrdm's next power state to @pwrst. The powerdomain
418 * have not been satisfied. Returns -EINVAL if the powerdomain pointer is
422 int pwrdm_set_next_pwrst(struct powerdomain *pwrdm, u8 pwrst)
430 pr_debug("powerdomain: setting next powerstate for %s to %0x\n",
441 * pwrdm_read_next_pwrst - get next powerdomain power state
442 * @pwrdm: struct powerdomain * to get power state
444 * Return the powerdomain @pwrdm's next power state. Returns -EINVAL
445 * if the powerdomain pointer is null or returns the next power state
448 int pwrdm_read_next_pwrst(struct powerdomain *pwrdm)
458 * pwrdm_read_pwrst - get current powerdomain power state
459 * @pwrdm: struct powerdomain * to get power state
461 * Return the powerdomain @pwrdm's current power state. Returns -EINVAL
462 * if the powerdomain pointer is null or returns the current power state
465 int pwrdm_read_pwrst(struct powerdomain *pwrdm)
475 * pwrdm_read_prev_pwrst - get previous powerdomain power state
476 * @pwrdm: struct powerdomain * to get previous power state
478 * Return the powerdomain @pwrdm's previous power state. Returns -EINVAL
479 * if the powerdomain pointer is null or returns the previous power state
482 int pwrdm_read_prev_pwrst(struct powerdomain *pwrdm)
492 * pwrdm_set_logic_retst - set powerdomain logic power state upon retention
493 * @pwrdm: struct powerdomain * to set
497 * powerdomain @pwrdm will enter when the powerdomain enters retention.
499 * -EINVAL if the powerdomain pointer is null or the target power
502 int pwrdm_set_logic_retst(struct powerdomain *pwrdm, u8 pwrst)
512 pr_debug("powerdomain: setting next logic powerstate for %s to %0x\n",
517 * actual names of the bits in each powerdomain's register,
519 * powerdomain.
529 * pwrdm_set_mem_onst - set memory power state while powerdomain ON
530 * @pwrdm: struct powerdomain * to set
535 * powerdomain @pwrdm will enter when the powerdomain enters the ON
537 * types of memory, depending on the powerdomain. Returns -EINVAL if
538 * the powerdomain pointer is null or the target power state is not
543 int pwrdm_set_mem_onst(struct powerdomain *pwrdm, u8 bank, u8 pwrst)
556 pr_debug("powerdomain: setting next memory powerstate for domain %s "
561 * actual names of the bits in each powerdomain's register,
563 * powerdomain.
593 * pwrdm_set_mem_retst - set memory power state while powerdomain in RET
594 * @pwrdm: struct powerdomain * to set
599 * powerdomain @pwrdm will enter when the powerdomain enters the
601 * different types of memory, depending on the powerdomain. @pwrst
603 * the powerdomain pointer is null or the target power state is not
608 int pwrdm_set_mem_retst(struct powerdomain *pwrdm, u8 bank, u8 pwrst)
621 pr_debug("powerdomain: setting next memory powerstate for domain %s "
626 * actual names of the bits in each powerdomain's register,
628 * powerdomain.
658 * pwrdm_read_logic_pwrst - get current powerdomain logic retention power state
659 * @pwrdm: struct powerdomain * to get current logic retention power state
661 * Return the power state that the logic portion of powerdomain @pwrdm
662 * will enter when the powerdomain enters retention. Returns -EINVAL
663 * if the powerdomain pointer is null or returns the logic retention
666 int pwrdm_read_logic_pwrst(struct powerdomain *pwrdm)
676 * pwrdm_read_prev_logic_pwrst - get previous powerdomain logic power state
677 * @pwrdm: struct powerdomain * to get previous logic power state
679 * Return the powerdomain @pwrdm's previous logic power state. Returns
680 * -EINVAL if the powerdomain pointer is null or returns the previous
683 int pwrdm_read_prev_logic_pwrst(struct powerdomain *pwrdm)
690 * actual names of the bits in each powerdomain's register,
692 * powerdomain.
699 * pwrdm_read_logic_retst - get next powerdomain logic power state
700 * @pwrdm: struct powerdomain * to get next logic power state
702 * Return the powerdomain pwrdm's logic power state. Returns -EINVAL
703 * if the powerdomain pointer is null or returns the next logic
706 int pwrdm_read_logic_retst(struct powerdomain *pwrdm)
713 * actual names of the bits in each powerdomain's register,
715 * powerdomain.
723 * @pwrdm: struct powerdomain * to get current memory bank power state
726 * Return the powerdomain @pwrdm's current memory power state for bank
727 * @bank. Returns -EINVAL if the powerdomain pointer is null, -EEXIST if
731 int pwrdm_read_mem_pwrst(struct powerdomain *pwrdm, u8 bank)
746 * actual names of the bits in each powerdomain's register,
748 * powerdomain.
777 * @pwrdm: struct powerdomain * to get previous memory bank power state
780 * Return the powerdomain @pwrdm's previous memory power state for
781 * bank @bank. Returns -EINVAL if the powerdomain pointer is null,
786 int pwrdm_read_prev_mem_pwrst(struct powerdomain *pwrdm, u8 bank)
801 * actual names of the bits in each powerdomain's register,
803 * powerdomain.
829 * @pwrdm: struct powerdomain * to get mext memory bank power state
832 * Return the powerdomain pwrdm's next memory power state for bank
833 * x. Returns -EINVAL if the powerdomain pointer is null, -EEXIST if
837 int pwrdm_read_mem_retst(struct powerdomain *pwrdm, u8 bank)
849 * actual names of the bits in each powerdomain's register,
851 * powerdomain.
880 * @pwrdm: struct powerdomain * to clear
882 * Clear the powerdomain's previous power state register @pwrdm.
884 * previous power states. Returns -EINVAL if the powerdomain pointer
887 int pwrdm_clear_all_prev_pwrst(struct powerdomain *pwrdm)
893 pr_debug("powerdomain: clearing previous power state reg for %s\n",
903 * @pwrdm: struct powerdomain *
906 * for some devices in the powerdomain @pwrdm. Warning: this only
907 * affects a subset of devices in a powerdomain; check the TRM
908 * closely. Returns -EINVAL if the powerdomain pointer is null or if
909 * the powerdomain does not support automatic save-and-restore, or
912 int pwrdm_enable_hdwr_sar(struct powerdomain *pwrdm)
920 pr_debug("powerdomain: %s: setting SAVEANDRESTORE bit\n",
931 * @pwrdm: struct powerdomain *
934 * for some devices in the powerdomain @pwrdm. Warning: this only
935 * affects a subset of devices in a powerdomain; check the TRM
936 * closely. Returns -EINVAL if the powerdomain pointer is null or if
937 * the powerdomain does not support automatic save-and-restore, or
940 int pwrdm_disable_hdwr_sar(struct powerdomain *pwrdm)
948 pr_debug("powerdomain: %s: clearing SAVEANDRESTORE bit\n",
958 * pwrdm_has_hdwr_sar - test whether powerdomain supports hardware SAR
959 * @pwrdm: struct powerdomain *
961 * Returns 1 if powerdomain @pwrdm supports hardware save-and-restore
964 bool pwrdm_has_hdwr_sar(struct powerdomain *pwrdm)
971 * @pwrdm: struct powerdomain *
973 * Allows a powerdomain to transtion to a lower power sleep state
974 * from an existing sleep state without waking up the powerdomain.
975 * Returns -EINVAL if the powerdomain pointer is null or if the
976 * powerdomain does not support LOWPOWERSTATECHANGE, or returns 0
979 int pwrdm_set_lowpwrstchange(struct powerdomain *pwrdm)
987 pr_debug("powerdomain: %s: setting LOWPOWERSTATECHANGE bit\n",
998 * pwrdm_wait_transition - wait for powerdomain power transition to finish
999 * @pwrdm: struct powerdomain * to wait for
1001 * If the powerdomain @pwrdm is in the process of a state transition,
1003 * bailout value is reached. Returns -EINVAL if the powerdomain
1007 int pwrdm_wait_transition(struct powerdomain *pwrdm)
1017 * powerdomain transitions to take?
1026 printk(KERN_ERR "powerdomain: waited too long for "
1027 "powerdomain %s to complete transition\n", pwrdm->name);
1031 pr_debug("powerdomain: completed transition in %d loops\n", c);
1036 int pwrdm_state_switch(struct powerdomain *pwrdm)