diff options
Diffstat (limited to 'drivers/gpu/pvr/omap4/syslocal.h')
-rw-r--r-- | drivers/gpu/pvr/omap4/syslocal.h | 65 |
1 files changed, 43 insertions, 22 deletions
diff --git a/drivers/gpu/pvr/omap4/syslocal.h b/drivers/gpu/pvr/omap4/syslocal.h index 766870f366c..bc7748c4705 100644 --- a/drivers/gpu/pvr/omap4/syslocal.h +++ b/drivers/gpu/pvr/omap4/syslocal.h | |||
@@ -1,26 +1,26 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | * | 2 | * |
3 | * Copyright(c) 2008 Imagination Technologies Ltd. All rights reserved. | 3 | * Copyright(c) 2008 Imagination Technologies Ltd. All rights reserved. |
4 | * | 4 | * |
5 | * This program is free software; you can redistribute it and/or modify it | 5 | * This program is free software; you can redistribute it and/or modify it |
6 | * under the terms and conditions of the GNU General Public License, | 6 | * under the terms and conditions of the GNU General Public License, |
7 | * version 2, as published by the Free Software Foundation. | 7 | * version 2, as published by the Free Software Foundation. |
8 | * | 8 | * |
9 | * This program is distributed in the hope it will be useful but, except | 9 | * This program is distributed in the hope it will be useful but, except |
10 | * as otherwise stated in writing, without any warranty; without even the | 10 | * as otherwise stated in writing, without any warranty; without even the |
11 | * implied warranty of merchantability or fitness for a particular purpose. | 11 | * implied warranty of merchantability or fitness for a particular purpose. |
12 | * See the GNU General Public License for more details. | 12 | * See the GNU General Public License for more details. |
13 | * | 13 | * |
14 | * You should have received a copy of the GNU General Public License along with | 14 | * You should have received a copy of the GNU General Public License along with |
15 | * this program; if not, write to the Free Software Foundation, Inc., | 15 | * this program; if not, write to the Free Software Foundation, Inc., |
16 | * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. | 16 | * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. |
17 | * | 17 | * |
18 | * The full GNU General Public License is included in this distribution in | 18 | * The full GNU General Public License is included in this distribution in |
19 | * the file called "COPYING". | 19 | * the file called "COPYING". |
20 | * | 20 | * |
21 | * Contact Information: | 21 | * Contact Information: |
22 | * Imagination Technologies Ltd. <gpl-support@imgtec.com> | 22 | * Imagination Technologies Ltd. <gpl-support@imgtec.com> |
23 | * Home Park Estate, Kings Langley, Herts, WD4 8LZ, UK | 23 | * Home Park Estate, Kings Langley, Herts, WD4 8LZ, UK |
24 | * | 24 | * |
25 | ******************************************************************************/ | 25 | ******************************************************************************/ |
26 | 26 | ||
@@ -41,21 +41,21 @@ | |||
41 | #if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,26)) | 41 | #if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,26)) |
42 | #include <linux/semaphore.h> | 42 | #include <linux/semaphore.h> |
43 | #include <linux/resource.h> | 43 | #include <linux/resource.h> |
44 | #else | 44 | #else |
45 | #include <asm/semaphore.h> | 45 | #include <asm/semaphore.h> |
46 | #if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,22)) | 46 | #if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,22)) |
47 | #include <asm/arch/resource.h> | 47 | #include <asm/arch/resource.h> |
48 | #endif | 48 | #endif |
49 | #endif | 49 | #endif |
50 | 50 | ||
51 | #endif | 51 | #endif |
52 | 52 | ||
53 | #if defined (__cplusplus) | 53 | #if defined (__cplusplus) |
54 | extern "C" { | 54 | extern "C" { |
55 | #endif | 55 | #endif |
56 | 56 | ||
57 | 57 | ||
58 | 58 | ||
59 | IMG_CHAR *SysCreateVersionString(IMG_CPU_PHYADDR sRegRegion); | 59 | IMG_CHAR *SysCreateVersionString(IMG_CPU_PHYADDR sRegRegion); |
60 | 60 | ||
61 | IMG_VOID DisableSystemClocks(SYS_DATA *psSysData); | 61 | IMG_VOID DisableSystemClocks(SYS_DATA *psSysData); |
@@ -77,13 +77,14 @@ PVRSRV_ERROR EnableSGXClocks(SYS_DATA *psSysData); | |||
77 | #define SYS_SPECIFIC_DATA_PM_UNINSTALL_LISR 0x00000200 | 77 | #define SYS_SPECIFIC_DATA_PM_UNINSTALL_LISR 0x00000200 |
78 | #define SYS_SPECIFIC_DATA_PM_DISABLE_SYSCLOCKS 0x00000400 | 78 | #define SYS_SPECIFIC_DATA_PM_DISABLE_SYSCLOCKS 0x00000400 |
79 | #define SYS_SPECIFIC_DATA_ENABLE_OCPREGS 0x00000800 | 79 | #define SYS_SPECIFIC_DATA_ENABLE_OCPREGS 0x00000800 |
80 | #define SYS_SPECIFIC_DATA_ENABLE_PM_RUNTIME 0x00001000 | ||
80 | 81 | ||
81 | #define SYS_SPECIFIC_DATA_SET(psSysSpecData, flag) ((IMG_VOID)((psSysSpecData)->ui32SysSpecificData |= (flag))) | 82 | #define SYS_SPECIFIC_DATA_SET(psSysSpecData, flag) ((IMG_VOID)((psSysSpecData)->ui32SysSpecificData |= (flag))) |
82 | 83 | ||
83 | #define SYS_SPECIFIC_DATA_CLEAR(psSysSpecData, flag) ((IMG_VOID)((psSysSpecData)->ui32SysSpecificData &= ~(flag))) | 84 | #define SYS_SPECIFIC_DATA_CLEAR(psSysSpecData, flag) ((IMG_VOID)((psSysSpecData)->ui32SysSpecificData &= ~(flag))) |
84 | 85 | ||
85 | #define SYS_SPECIFIC_DATA_TEST(psSysSpecData, flag) (((psSysSpecData)->ui32SysSpecificData & (flag)) != 0) | 86 | #define SYS_SPECIFIC_DATA_TEST(psSysSpecData, flag) (((psSysSpecData)->ui32SysSpecificData & (flag)) != 0) |
86 | 87 | ||
87 | typedef struct _SYS_SPECIFIC_DATA_TAG_ | 88 | typedef struct _SYS_SPECIFIC_DATA_TAG_ |
88 | { | 89 | { |
89 | IMG_UINT32 ui32SysSpecificData; | 90 | IMG_UINT32 ui32SysSpecificData; |
@@ -110,16 +111,11 @@ typedef struct _SYS_SPECIFIC_DATA_TAG_ | |||
110 | struct clk *psSGX_FCK; | 111 | struct clk *psSGX_FCK; |
111 | struct clk *psSGX_ICK; | 112 | struct clk *psSGX_ICK; |
112 | struct clk *psMPU_CK; | 113 | struct clk *psMPU_CK; |
113 | #if !defined(NO_OMAP_TIMER) | ||
114 | #if defined(DEBUG) || defined(TIMING) | 114 | #if defined(DEBUG) || defined(TIMING) |
115 | struct clk *psGPT11_FCK; | 115 | struct clk *psGPT11_FCK; |
116 | struct clk *psGPT11_ICK; | 116 | struct clk *psGPT11_ICK; |
117 | #endif | 117 | #endif |
118 | #endif | 118 | #endif |
119 | #if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,22)) | ||
120 | struct constraint_handle *pVdd2Handle; | ||
121 | #endif | ||
122 | #endif | ||
123 | } SYS_SPECIFIC_DATA; | 119 | } SYS_SPECIFIC_DATA; |
124 | 120 | ||
125 | extern SYS_SPECIFIC_DATA *gpsSysSpecificData; | 121 | extern SYS_SPECIFIC_DATA *gpsSysSpecificData; |
@@ -129,10 +125,35 @@ IMG_BOOL WrapSystemPowerChange(SYS_SPECIFIC_DATA *psSysSpecData); | |||
129 | IMG_VOID UnwrapSystemPowerChange(SYS_SPECIFIC_DATA *psSysSpecData); | 125 | IMG_VOID UnwrapSystemPowerChange(SYS_SPECIFIC_DATA *psSysSpecData); |
130 | #endif | 126 | #endif |
131 | 127 | ||
132 | #if defined(__cplusplus) | 128 | #if defined(__linux__) |
129 | |||
130 | PVRSRV_ERROR SysPMRuntimeRegister(void); | ||
131 | PVRSRV_ERROR SysPMRuntimeUnregister(void); | ||
132 | |||
133 | #else | ||
134 | |||
135 | #ifdef INLINE_IS_PRAGMA | ||
136 | #pragma inline(SysPMRuntimeRegister) | ||
137 | #endif | ||
138 | static INLINE PVRSRV_ERROR SysPMRuntimeRegister(void) | ||
139 | { | ||
140 | return PVRSRV_OK; | ||
133 | } | 141 | } |
142 | |||
143 | #ifdef INLINE_IS_PRAGMA | ||
144 | #pragma inline(SysPMRuntimeUnregister) | ||
134 | #endif | 145 | #endif |
146 | static INLINE PVRSRV_ERROR SysPMRuntimeUnregister(void) | ||
147 | { | ||
148 | return PVRSRV_OK; | ||
149 | } | ||
150 | |||
151 | #endif | ||
135 | 152 | ||
153 | #if defined(__cplusplus) | ||
154 | } | ||
136 | #endif | 155 | #endif |
137 | 156 | ||
157 | #endif | ||
158 | |||
138 | 159 | ||