diff options
Diffstat (limited to 'drivers/gpu/pvr/omap4/syslocal.h')
-rw-r--r-- | drivers/gpu/pvr/omap4/syslocal.h | 61 |
1 files changed, 55 insertions, 6 deletions
diff --git a/drivers/gpu/pvr/omap4/syslocal.h b/drivers/gpu/pvr/omap4/syslocal.h index bc9a078fc43..e07c51fda75 100644 --- a/drivers/gpu/pvr/omap4/syslocal.h +++ b/drivers/gpu/pvr/omap4/syslocal.h | |||
@@ -48,16 +48,52 @@ | |||
48 | #endif | 48 | #endif |
49 | #endif | 49 | #endif |
50 | 50 | ||
51 | |||
52 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) | ||
53 | #if !defined(LDM_PLATFORM) | ||
54 | #error "LDM_PLATFORM must be set" | ||
55 | #endif | ||
56 | #define PVR_LINUX_DYNAMIC_SGX_RESOURCE_INFO | ||
57 | #include <linux/platform_device.h> | ||
58 | #endif | ||
59 | |||
60 | #if ((defined(DEBUG) || defined(TIMING)) && \ | ||
61 | (LINUX_VERSION_CODE == KERNEL_VERSION(2,6,34))) && \ | ||
62 | !defined(PVR_NO_OMAP_TIMER) | ||
63 | #define PVR_OMAP4_TIMING_PRCM | ||
64 | #endif | ||
65 | |||
66 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) | ||
67 | #include <plat/gpu.h> | ||
68 | #if !defined(PVR_NO_OMAP_TIMER) | ||
69 | #define PVR_OMAP_USE_DM_TIMER_API | ||
70 | #include <plat/dmtimer.h> | ||
71 | #endif | ||
72 | #endif | ||
73 | |||
74 | #if !defined(PVR_NO_OMAP_TIMER) | ||
75 | #define PVR_OMAP_TIMER_BASE_IN_SYS_SPEC_DATA | ||
76 | #endif | ||
51 | #endif | 77 | #endif |
52 | 78 | ||
79 | #if !defined(NO_HARDWARE) && \ | ||
80 | defined(SYS_USING_INTERRUPTS) && \ | ||
81 | defined(SGX540) | ||
82 | #define SGX_OCP_REGS_ENABLED | ||
83 | #endif | ||
84 | |||
85 | #if defined(__linux__) | ||
86 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) && defined(SGX_OCP_REGS_ENABLED) | ||
87 | #define SGX_OCP_NO_INT_BYPASS | ||
88 | #endif | ||
89 | #endif | ||
90 | |||
53 | #if defined (__cplusplus) | 91 | #if defined (__cplusplus) |
54 | extern "C" { | 92 | extern "C" { |
55 | #endif | 93 | #endif |
56 | 94 | ||
57 | 95 | ||
58 | 96 | ||
59 | IMG_CHAR *SysCreateVersionString(IMG_CPU_PHYADDR sRegRegion); | ||
60 | |||
61 | IMG_VOID DisableSystemClocks(SYS_DATA *psSysData); | 97 | IMG_VOID DisableSystemClocks(SYS_DATA *psSysData); |
62 | PVRSRV_ERROR EnableSystemClocks(SYS_DATA *psSysData); | 98 | PVRSRV_ERROR EnableSystemClocks(SYS_DATA *psSysData); |
63 | 99 | ||
@@ -78,6 +114,9 @@ PVRSRV_ERROR EnableSGXClocks(SYS_DATA *psSysData); | |||
78 | #define SYS_SPECIFIC_DATA_PM_DISABLE_SYSCLOCKS 0x00000400 | 114 | #define SYS_SPECIFIC_DATA_PM_DISABLE_SYSCLOCKS 0x00000400 |
79 | #define SYS_SPECIFIC_DATA_ENABLE_OCPREGS 0x00000800 | 115 | #define SYS_SPECIFIC_DATA_ENABLE_OCPREGS 0x00000800 |
80 | #define SYS_SPECIFIC_DATA_ENABLE_PM_RUNTIME 0x00001000 | 116 | #define SYS_SPECIFIC_DATA_ENABLE_PM_RUNTIME 0x00001000 |
117 | #if defined(SGX_OCP_REGS_ENABLED) && defined(SGX_OCP_NO_INT_BYPASS) | ||
118 | #define SYS_SPECIFIC_DATA_IRQ_ENABLED 0x00002000 | ||
119 | #endif | ||
81 | 120 | ||
82 | #define SYS_SPECIFIC_DATA_SET(psSysSpecData, flag) ((IMG_VOID)((psSysSpecData)->ui32SysSpecificData |= (flag))) | 121 | #define SYS_SPECIFIC_DATA_SET(psSysSpecData, flag) ((IMG_VOID)((psSysSpecData)->ui32SysSpecificData |= (flag))) |
83 | 122 | ||
@@ -90,6 +129,9 @@ typedef struct _SYS_SPECIFIC_DATA_TAG_ | |||
90 | IMG_UINT32 ui32SysSpecificData; | 129 | IMG_UINT32 ui32SysSpecificData; |
91 | PVRSRV_DEVICE_NODE *psSGXDevNode; | 130 | PVRSRV_DEVICE_NODE *psSGXDevNode; |
92 | IMG_BOOL bSGXInitComplete; | 131 | IMG_BOOL bSGXInitComplete; |
132 | #if defined(PVR_OMAP_TIMER_BASE_IN_SYS_SPEC_DATA) | ||
133 | IMG_CPU_PHYADDR sTimerRegPhysBase; | ||
134 | #endif | ||
93 | #if !defined(__linux__) | 135 | #if !defined(__linux__) |
94 | IMG_BOOL bSGXClocksEnabled; | 136 | IMG_BOOL bSGXClocksEnabled; |
95 | #endif | 137 | #endif |
@@ -107,19 +149,26 @@ typedef struct _SYS_SPECIFIC_DATA_TAG_ | |||
107 | atomic_t sNotifyLockCPU; | 149 | atomic_t sNotifyLockCPU; |
108 | IMG_BOOL bCallVDD2PostFunc; | 150 | IMG_BOOL bCallVDD2PostFunc; |
109 | #endif | 151 | #endif |
110 | struct clk *psCORE_CK; | ||
111 | struct clk *psSGX_FCK; | ||
112 | struct clk *psSGX_ICK; | ||
113 | struct clk *psMPU_CK; | ||
114 | #if defined(DEBUG) || defined(TIMING) | 152 | #if defined(DEBUG) || defined(TIMING) |
115 | struct clk *psGPT11_FCK; | 153 | struct clk *psGPT11_FCK; |
116 | struct clk *psGPT11_ICK; | 154 | struct clk *psGPT11_ICK; |
117 | #endif | 155 | #endif |
156 | #if defined(PVR_OMAP_USE_DM_TIMER_API) | ||
157 | struct omap_dm_timer *psGPTimer; | ||
158 | #endif | ||
118 | #endif | 159 | #endif |
119 | } SYS_SPECIFIC_DATA; | 160 | } SYS_SPECIFIC_DATA; |
120 | 161 | ||
121 | extern SYS_SPECIFIC_DATA *gpsSysSpecificData; | 162 | extern SYS_SPECIFIC_DATA *gpsSysSpecificData; |
122 | 163 | ||
164 | #if defined(SGX_OCP_REGS_ENABLED) && defined(SGX_OCP_NO_INT_BYPASS) | ||
165 | IMG_VOID SysEnableSGXInterrupts(SYS_DATA* psSysData); | ||
166 | IMG_VOID SysDisableSGXInterrupts(SYS_DATA* psSysData); | ||
167 | #else | ||
168 | #define SysEnableSGXInterrupts(psSysData) | ||
169 | #define SysDisableSGXInterrupts(psSysData) | ||
170 | #endif | ||
171 | |||
123 | #if defined(SYS_CUSTOM_POWERLOCK_WRAP) | 172 | #if defined(SYS_CUSTOM_POWERLOCK_WRAP) |
124 | IMG_BOOL WrapSystemPowerChange(SYS_SPECIFIC_DATA *psSysSpecData); | 173 | IMG_BOOL WrapSystemPowerChange(SYS_SPECIFIC_DATA *psSysSpecData); |
125 | IMG_VOID UnwrapSystemPowerChange(SYS_SPECIFIC_DATA *psSysSpecData); | 174 | IMG_VOID UnwrapSystemPowerChange(SYS_SPECIFIC_DATA *psSysSpecData); |