rk: ion: resolve build err
[firefly-linux-kernel-4.4.55.git] / drivers / gpu / arm / t6xx / kbase / src / integration_kit / MaliFns.h
1 /*----------------------------------------------------------------------------
2 *
3 *The confidential and proprietary information contained in this file may
4 *only be used by a person authorised under and to the extent permitted
5 *by a subsisting licensing agreement from ARM Limited.
6 *
7 *        (C) COPYRIGHT 2010-2013 ARM Limited.
8 *             ALL RIGHTS RESERVED
9 *             
10 *This entire notice must be reproduced on all copies of this file
11 *and copies of this file may only be made by a person if such person is
12 *permitted to do so under the terms of a subsisting license agreement
13 *from ARM Limited.
14 *Modified  : $Date: 2013-08-01 18:15:13 +0100 (Thu, 01 Aug 2013) $
15 *Revision  : $Revision: 66689 $
16 *Release   : $State: $
17 *-----------------------------------------------------------------------------
18
19 *-----------------------------------------------------------------------------
20 * Abstract :Declaration of Mali functions 
21 *-----------------------------------------------------------------------------
22 * Overview
23 *----------
24
25 **************************************************************/
26
27 //#define  t760 1
28 /*
29 #ifdef VE
30 #define  MALI_BASE 0x2D000000
31 #else
32 #define  MALI_BASE 0xC0000000
33 #endif
34 */
35 /****************************************************************************
36  * SYSTEM SPECIFIC FUNCTIONS                                                  
37  ****************************************************************************/
38 void CPU_EnableInterrupts(void);
39 void CPU_DisableInterrupts(void);
40 void CPU_InitialiseInterrupts(void);
41
42 void Mali_WaitForClk(int);
43 void Mali_WaitForInterrupt(void);
44 void Mali_InstallIntHandlers(void (*callback_mali_gpu)(void), 
45                              void (*callback_mali_mmu)(void), 
46                              void (*callback_mali_job)(void));
47 void Mali_Message(char *s);
48 void Mali_SetupOutputFrame(void);
49 void Mali_JobPartDone(void);
50
51 /****************************************************************************
52  * MALI REGISTER READ / WRITE
53  ****************************************************************************/
54 void Mali_Reset(void);
55 void *Mali_LdMem(void *srcptr,int size,int ttb_base);
56 void Mali_WrReg(int unit,int core,int regnum,int value);
57 int  Mali_RdReg(int unit,int core,int regnum);
58 unsigned int Mali_PollReg (unsigned int unit, unsigned int core, unsigned int regnum, unsigned int bit_location, unsigned int val, char * name_str);
59
60 void Mali_DisplayReg(int unit,int core, int regnum);
61
62 void Mali_Identify(void);
63
64 int Mali_InterruptCheck(int i_mask, int i_value);
65 int Mali_AnyInterruptCheck(int type, int i_mask, int i_value);
66 void Mali_MaskAllInterrupts(void);
67
68 void Mali_SetInterruptErrMask(int type, int e_mask);
69
70 /****************************************************************************
71  * MALI PERFORMANCE COUNTERS
72  ****************************************************************************/
73 void Mali_InitPerfCounters(void);
74 void Mali_ReadPerfCounters(void);
75
76 /****************************************************************************
77  * UTILITY FUNCTIONS FOR COPYING DATA INTO MALI MEMORY
78  ****************************************************************************/
79 int Mali_MemCpy(unsigned int *malidata_page,
80                 unsigned int mali_va,
81                 unsigned int *refdata,
82                 unsigned int refoffset,
83                 unsigned int len);
84
85 int Mali_MemCpyMasked(unsigned int *malidata_page,
86                       unsigned int mali_va,
87                       unsigned int *refdata,
88                       unsigned int *refmask,
89                       unsigned int refoffset,
90                       unsigned int len);
91
92 /****************************************************************************
93  * UTILITY FUNCTIONS FOR CHECKING TEST RESULTS
94  ****************************************************************************/
95 int Mali_MemCmp(unsigned int *malidata_page,
96                 unsigned int mali_va,
97                 unsigned int *refdata,
98                 unsigned int refoffset,
99                 unsigned int len);
100
101 int Mali_MemCmpMasked(unsigned int *malidata_page,
102                       unsigned int mali_va,
103                       unsigned int *refdata,
104                       unsigned int *refmask,
105                       unsigned int refoffset,
106                       unsigned int len);
107
108 int Mali_CompareRegs(unsigned int *reference_ptr, 
109                       int mali_unit,
110                      int mali_core,
111                      int lowreg, 
112                      int highreg);
113
114 /****************************************************************************
115  * FUNCTIONS THAT ARE USEFUL FOR DEBUG
116  ****************************************************************************/
117 void Mali_PrintMem       (volatile unsigned int * memory_address, unsigned int word_count );
118 void Mali_ReadDescriptor (volatile unsigned int * descriptor_address                      );
119
120
121 int RunMaliTest_sim1_t760 (int *base);
122 int RunMaliTest_sim2_t760 (int *base);
123 int RunMaliTest_sim3_t760 (int *base);
124 int RunMaliTest_sim4_t760 (int *base);
125