]> git.kernelconcepts.de Git - karo-tx-linux.git/blob - drivers/mxc/gpu-viv/hal/kernel/arch/gc_hal_kernel_hardware.h
Revert "net: phy: Set the driver when registering an MDIO bus device"
[karo-tx-linux.git] / drivers / mxc / gpu-viv / hal / kernel / arch / gc_hal_kernel_hardware.h
1 /****************************************************************************
2 *
3 *    Copyright (C) 2005 - 2014 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 typedef enum {
34     gcvHARDWARE_FUNCTION_MMU,
35     gcvHARDWARE_FUNCTION_FLUSH,
36
37     gcvHARDWARE_FUNCTION_NUM,
38 }
39 gceHARDWARE_FUNCTION;
40
41
42 typedef struct _gcsHARWARE_FUNCTION
43 {
44     /* Entry of the function. */
45     gctUINT32                   address;
46
47     /* Bytes of the function. */
48     gctUINT32                   bytes;
49 }
50 gcsHARDWARE_FUNCTION;
51
52 /* gckHARDWARE object. */
53 struct _gckHARDWARE
54 {
55     /* Object. */
56     gcsOBJECT                   object;
57
58     /* Pointer to gctKERNEL object. */
59     gckKERNEL                   kernel;
60
61     /* Pointer to gctOS object. */
62     gckOS                       os;
63
64     /* Core */
65     gceCORE                     core;
66
67     /* Chip characteristics. */
68     gcsHAL_QUERY_CHIP_IDENTITY  identity;
69     gctBOOL                     allowFastClear;
70     gctBOOL                     allowCompression;
71     gctUINT32                   powerBaseAddress;
72     gctBOOL                     extraEventStates;
73
74     /* Big endian */
75     gctBOOL                     bigEndian;
76
77     /* Chip status */
78     gctPOINTER                  powerMutex;
79     gctUINT32                   powerProcess;
80     gctUINT32                   powerThread;
81     gceCHIPPOWERSTATE           chipPowerState;
82     gctUINT32                   lastWaitLink;
83     gctUINT32                   lastEnd;
84     gctBOOL                     clockState;
85     gctBOOL                     powerState;
86     gctPOINTER                  globalSemaphore;
87
88     gctISRMANAGERFUNC           startIsr;
89     gctISRMANAGERFUNC           stopIsr;
90     gctPOINTER                  isrContext;
91
92     gctUINT32                   mmuVersion;
93
94     /* Whether use new MMU. It is meaningless
95     ** for old MMU since old MMU is always enabled.
96     */
97     gctBOOL                     enableMMU;
98
99     /* Type */
100     gceHARDWARE_TYPE            type;
101
102 #if gcdPOWEROFF_TIMEOUT
103     gctUINT32                   powerOffTime;
104     gctUINT32                   powerOffTimeout;
105     gctPOINTER                  powerOffTimer;
106 #endif
107
108 #if gcdENABLE_FSCALE_VAL_ADJUST
109     gctUINT32                   powerOnFscaleVal;
110 #endif
111     gctPOINTER                  pageTableDirty;
112
113 #if gcdLINK_QUEUE_SIZE
114     struct _gckLINKQUEUE        linkQueue;
115 #endif
116
117     gctBOOL                     powerManagement;
118     gctBOOL                     powerManagementLock;
119     gctBOOL                     gpuProfiler;
120
121     gctBOOL                     endAfterFlushMmuCache;
122
123     gctUINT32                   minFscaleValue;
124
125     gctPOINTER                  pendingEvent;
126
127     /* Function used by gckHARDWARE. */
128     gctPHYS_ADDR                functionPhysical;
129     gctPOINTER                  functionLogical;
130     gctUINT32                   functionAddress;
131     gctSIZE_T                   functionBytes;
132
133     gcsHARDWARE_FUNCTION        functions[gcvHARDWARE_FUNCTION_NUM];
134 };
135
136 gceSTATUS
137 gckHARDWARE_GetBaseAddress(
138     IN gckHARDWARE Hardware,
139     OUT gctUINT32_PTR BaseAddress
140     );
141
142 gceSTATUS
143 gckHARDWARE_NeedBaseAddress(
144     IN gckHARDWARE Hardware,
145     IN gctUINT32 State,
146     OUT gctBOOL_PTR NeedBase
147     );
148
149 gceSTATUS
150 gckHARDWARE_GetFrameInfo(
151     IN gckHARDWARE Hardware,
152     OUT gcsHAL_FRAME_INFO * FrameInfo
153     );
154
155 #ifdef __cplusplus
156 }
157 #endif
158
159 #endif /* __gc_hal_kernel_hardware_h_ */
160