4 * DSP-BIOS Bridge driver support functions for TI OMAP processors.
6 * Copyright (C) 2005-2006 Texas Instruments, Inc.
8 * This package is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
12 * THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
13 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
14 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
20 #include <dspbridge/dbdefs.h>
21 #include <dspbridge/pwr_sh.h>
24 * ======== pwr_sleep_dsp ========
25 * Signal the DSP to go to sleep.
28 * sleepCode: New sleep state for DSP. (Initially, valid codes
29 * are PWR_DEEPSLEEP or PWR_EMERGENCYDEEPSLEEP; both of
30 * these codes will simply put the DSP in deep sleep.)
32 * timeout: Maximum time (msec) that PWR should wait for
33 * confirmation that the DSP sleep state has been
34 * reached. If PWR should simply send the command to
35 * the DSP to go to sleep and then return (i.e.,
36 * asynchrounous sleep), the timeout should be
41 * 0: Success, but the DSP was already asleep.
42 * -EINVAL: The specified sleepCode is not supported.
43 * -ETIME: A timeout occured while waiting for DSP sleep
45 * -EPERM: General failure, unable to send sleep command to
48 extern int pwr_sleep_dsp(IN CONST u32 sleepCode
, IN CONST u32 timeout
);
51 * ======== pwr_wake_dsp ========
52 * Signal the DSP to wake from sleep.
55 * timeout: Maximum time (msec) that PWR should wait for
56 * confirmation that the DSP is awake. If PWR should
57 * simply send a command to the DSP to wake and then
58 * return (i.e., asynchrounous wake), timeout should
59 * be specified as zero.
63 * 0: Success, but the DSP was already awake.
64 * -ETIME: A timeout occured while waiting for wake
66 * -EPERM: General failure, unable to send wake command to
69 extern int pwr_wake_dsp(IN CONST u32 timeout
);
72 * ======== pwr_pm_pre_scale ========
73 * Prescale notification to DSP.
76 * voltage_domain: The voltage domain for which notification is sent
77 * level: The level of voltage domain
81 * 0: Success, but the DSP was already awake.
82 * -ETIME: A timeout occured while waiting for wake
84 * -EPERM: General failure, unable to send wake command to
87 extern int pwr_pm_pre_scale(IN u16 voltage_domain
, u32 level
);
90 * ======== pwr_pm_post_scale ========
91 * PostScale notification to DSP.
94 * voltage_domain: The voltage domain for which notification is sent
95 * level: The level of voltage domain
99 * 0: Success, but the DSP was already awake.
100 * -ETIME: A timeout occured while waiting for wake
102 * -EPERM: General failure, unable to send wake command to
105 extern int pwr_pm_post_scale(IN u16 voltage_domain
, u32 level
);