]> git.karo-electronics.de Git - karo-tx-linux.git/blob - drivers/mxc/gpu-viv/arch/XAQ2/hal/kernel/gc_hal_kernel_hardware.h
287ea600a2b3683f409eefe67e01fbf8d5648fca
[karo-tx-linux.git] / drivers / mxc / gpu-viv / arch / XAQ2 / hal / kernel / gc_hal_kernel_hardware.h
1 /****************************************************************************
2 *
3 *    Copyright (C) 2005 - 2013 by Vivante Corp.
4 *
5 *    This program is free software; you can redistribute it and/or modify
6 *    it under the terms of the GNU General Public License as published by
7 *    the Free Software Foundation; either version 2 of the license, or
8 *    (at your option) any later version.
9 *
10 *    This program is distributed in the hope that it will be useful,
11 *    but WITHOUT ANY WARRANTY; without even the implied warranty of
12 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 *    GNU General Public License for more details.
14 *
15 *    You should have received a copy of the GNU General Public License
16 *    along with this program; if not write to the Free Software
17 *    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18 *
19 *****************************************************************************/
20
21
22 #ifndef __gc_hal_kernel_hardware_h_
23 #define __gc_hal_kernel_hardware_h_
24
25 #if gcdENABLE_VG
26 #include "gc_hal_kernel_hardware_vg.h"
27 #endif
28
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32
33 /* gckHARDWARE object. */
34 struct _gckHARDWARE
35 {
36     /* Object. */
37     gcsOBJECT                   object;
38
39     /* Pointer to gctKERNEL object. */
40     gckKERNEL                   kernel;
41
42     /* Pointer to gctOS object. */
43     gckOS                       os;
44
45     /* Core */
46     gceCORE                     core;
47
48     /* Chip characteristics. */
49     gcsHAL_QUERY_CHIP_IDENTITY  identity;
50     gctBOOL                     allowFastClear;
51     gctBOOL                     allowCompression;
52     gctUINT32                   powerBaseAddress;
53     gctBOOL                     extraEventStates;
54
55     /* Big endian */
56     gctBOOL                     bigEndian;
57
58     /* Chip status */
59     gctPOINTER                  powerMutex;
60     gctUINT32                   powerProcess;
61     gctUINT32                   powerThread;
62     gceCHIPPOWERSTATE           chipPowerState;
63     gctUINT32                   lastWaitLink;
64     gctBOOL                     clockState;
65     gctBOOL                     powerState;
66     gctPOINTER                  globalSemaphore;
67
68     gctISRMANAGERFUNC           startIsr;
69     gctISRMANAGERFUNC           stopIsr;
70     gctPOINTER                  isrContext;
71
72     gctUINT32                   mmuVersion;
73
74     /* Type */
75     gceHARDWARE_TYPE            type;
76
77 #if gcdPOWEROFF_TIMEOUT
78     gctUINT32                   powerOffTime;
79     gctUINT32                   powerOffTimeout;
80     gctPOINTER                  powerOffTimer;
81 #endif
82
83     gctPOINTER                  pageTableDirty;
84
85 #if gcdENABLE_FSCALE_VAL_ADJUST
86     /* FSCALE_VAL when gcvPOWER_ON. */
87     gctUINT32                   powerOnFscaleVal;
88 #endif
89
90 #if gcdLINK_QUEUE_SIZE
91     struct _gckLINKQUEUE        linkQueue;
92 #endif
93
94     gctBOOL                     powerManagement;
95     gctBOOL                     gpuProfiler;
96 };
97
98 gceSTATUS
99 gckHARDWARE_GetBaseAddress(
100     IN gckHARDWARE Hardware,
101     OUT gctUINT32_PTR BaseAddress
102     );
103
104 gceSTATUS
105 gckHARDWARE_NeedBaseAddress(
106     IN gckHARDWARE Hardware,
107     IN gctUINT32 State,
108     OUT gctBOOL_PTR NeedBase
109     );
110
111 gceSTATUS
112 gckHARDWARE_GetFrameInfo(
113     IN gckHARDWARE Hardware,
114     OUT gcsHAL_FRAME_INFO * FrameInfo
115     );
116
117 gceSTATUS
118 gckHARDWARE_SetFscaleValue(
119     IN gckHARDWARE Hardware,
120     IN gctUINT32   FscaleValue
121     );
122
123 gceSTATUS
124 gckHARDWARE_GetFscaleValue(
125     IN gckHARDWARE Hardware,
126     IN gctUINT * FscaleValue,
127     IN gctUINT * MinFscaleValue,
128     IN gctUINT * MaxFscaleValue
129     );
130
131 #ifdef __cplusplus
132 }
133 #endif
134
135 #endif /* __gc_hal_kernel_hardware_h_ */
136