1 /****************************************************************************
3 * Copyright (C) 2005 - 2013 by Vivante Corp.
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.
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.
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.
19 *****************************************************************************/
22 #ifndef __gc_hal_kernel_hardware_h_
23 #define __gc_hal_kernel_hardware_h_
26 #include "gc_hal_kernel_hardware_vg.h"
33 /* gckHARDWARE object. */
39 /* Pointer to gctKERNEL object. */
42 /* Pointer to gctOS object. */
48 /* Chip characteristics. */
49 gcsHAL_QUERY_CHIP_IDENTITY identity;
50 gctBOOL allowFastClear;
51 gctBOOL allowCompression;
52 gctUINT32 powerBaseAddress;
53 gctBOOL extraEventStates;
59 gctPOINTER powerMutex;
60 gctUINT32 powerProcess;
61 gctUINT32 powerThread;
62 gceCHIPPOWERSTATE chipPowerState;
63 gctUINT32 lastWaitLink;
66 gctPOINTER globalSemaphore;
68 gctISRMANAGERFUNC startIsr;
69 gctISRMANAGERFUNC stopIsr;
70 gctPOINTER isrContext;
75 gceHARDWARE_TYPE type;
77 #if gcdPOWEROFF_TIMEOUT
78 gctUINT32 powerOffTime;
79 gctUINT32 powerOffTimeout;
80 gctPOINTER powerOffTimer;
83 gctPOINTER pageTableDirty;
85 #if gcdENABLE_FSCALE_VAL_ADJUST
86 /* FSCALE_VAL when gcvPOWER_ON. */
87 gctUINT32 powerOnFscaleVal;
90 #if gcdLINK_QUEUE_SIZE
91 struct _gckLINKQUEUE linkQueue;
94 gctBOOL powerManagement;
99 gckHARDWARE_GetBaseAddress(
100 IN gckHARDWARE Hardware,
101 OUT gctUINT32_PTR BaseAddress
105 gckHARDWARE_NeedBaseAddress(
106 IN gckHARDWARE Hardware,
108 OUT gctBOOL_PTR NeedBase
112 gckHARDWARE_GetFrameInfo(
113 IN gckHARDWARE Hardware,
114 OUT gcsHAL_FRAME_INFO * FrameInfo
118 gckHARDWARE_SetFscaleValue(
119 IN gckHARDWARE Hardware,
120 IN gctUINT32 FscaleValue
124 gckHARDWARE_GetFscaleValue(
125 IN gckHARDWARE Hardware,
126 IN gctUINT * FscaleValue,
127 IN gctUINT * MinFscaleValue,
128 IN gctUINT * MaxFscaleValue
135 #endif /* __gc_hal_kernel_hardware_h_ */