]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - ipc/ipcdev.git/blob - qnx/src/ipc3x_dev/ti/syslink/family/common/ipu_pm.h
Cleanup: remove directory qnx/src/ipc3x_dev/ti/syslink/rpmsg-dce
[ipc/ipcdev.git] / qnx / src / ipc3x_dev / ti / syslink / family / common / ipu_pm.h
1 /*
2  * Remote processor power management
3  *
4  * Copyright (c) 2011-2013 Texas Instruments. All rights reserved.
5  *
6  * Redistribution and use in source and binary forms, with or without
7  * modification, are permitted provided that the following conditions
8  * are met:
9  *
10  * * Redistributions of source code must retain the above copyright
11  *   notice, this list of conditions and the following disclaimer.
12  * * Redistributions in binary form must reproduce the above copyright
13  *   notice, this list of conditions and the following disclaimer in
14  *   the documentation and/or other materials provided with the
15  *   distribution.
16  * * Neither the name Texas Instruments nor the names of its
17  *   contributors may be used to endorse or promote products derived
18  *   from this software without specific prior written permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  */
33 #include <_MultiProc.h>
34 #include <stdint.h>
35 #include <stdbool.h>
37 #ifndef _IPU_PM_H
38 #define _IPU_PM_H
40 #define IPU_PM_MAX_PROCS 3
42 typedef struct ipu_pm_config_tag {
43     uint32_t int_id;
44     /*!< Mailbox interrupt ID */
45     uint32_t num_procs;
46     /*!< Number of remote procs to configure */
47     uint16_t proc_ids[IPU_PM_MAX_PROCS];
48     /*!< Array of proc IDs to configure */
49 } ipu_pm_config;
51 typedef enum {
52     _NONE,
53     _NEED_IVA_OPP50,
54     _NEED_IVA_OPP100,
55     _NEED_IVA_OPPTURBO
56 } ipu_pm_requirement_t;
58 struct ipu_pm_const_req {
59     unsigned rsrc;
60     unsigned target_rsrc;
61     unsigned rate;
62 };
64 #define NO_FREQ_CONSTRAINT  0
65 #define NO_LAT_CONSTRAINT  -1
66 #define NO_BW_CONSTRAINT   -1
68 #define FREQ_266Mhz 266000000
69 #define FREQ_133Mhz 133000000
71 int ipu_pm_setup(ipu_pm_config *cfg);
72 int ipu_pm_destroy(void);
73 int ipu_pm_attach(int proc_id);
74 int ipu_pm_detach(int proc_id);
75 int ipu_pm_ivaseq1_disable(void);
76 int ipu_pm_ivaseq1_enable(void);
77 int ipu_pm_ivaseq0_disable(void);
78 int ipu_pm_ivaseq0_enable(void);
79 int ipu_pm_ivahd_disable(void);
80 int ipu_pm_ivahd_enable(void);
81 int ipu_pm_ivahd_off(void);
82 int ipu_pm_restore_ctx(int proc_id);
83 int ipu_pm_gpt_enable(int num);
84 int ipu_pm_gpt_disable(int num);
85 int ipu_pm_gpt_start(int num);
86 int ipu_pm_gpt_stop(int num);
87 void restore_gpt_context(int num);
88 int ipu_pm_set_bandwidth(unsigned int bandwidth);
89 int ipu_pm_set_rate(struct ipu_pm_const_req * request);
90 int ipu_pm_led_enable(unsigned int mode, unsigned int intensity);
91 int ipu_pm_alloc_sdma(int num_chs, int* channels);
92 int ipu_pm_free_sdma(int num_chs, int* channels);
93 int ipu_pm_camera_enable(unsigned int mode, unsigned int on);
94 int ipu_pm_get_max_freq(unsigned int proc, unsigned int * freq);
97 #endif /* _IPU_PM_H */