1 /**********************************************************************
3 * Copyright(c) 2008 Imagination Technologies Ltd. All rights reserved.
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms and conditions of the GNU General Public License,
7 * version 2, as published by the Free Software Foundation.
9 * This program is distributed in the hope it will be useful but, except
10 * as otherwise stated in writing, without any warranty; without even the
11 * implied warranty of merchantability or fitness for a particular purpose.
12 * See the GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License along with
15 * this program; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
18 * The full GNU General Public License is included in this distribution in
19 * the file called "COPYING".
21 * Contact Information:
22 * Imagination Technologies Ltd. <gpl-support@imgtec.com>
23 * Home Park Estate, Kings Langley, Herts, WD4 8LZ, UK
25 ******************************************************************************/
27 #if !defined(__SYSINFO_H__)
30 #define MAX_HW_TIME_US 500000
31 #define WAIT_TRY_COUNT 10000
33 enum SYS_DEVICE_TYPE {
35 SYS_DEVICE_FORCE_I16 = 0x7fff
38 #define SYS_DEVICE_COUNT 15
40 #define PRM_REG32(offset) (offset)
41 #define CM_REG32(offset) (offset)
43 #define CM_FCLKEN_SGX CM_REG32(0xB00)
44 #define CM_FCLKEN_SGX_EN_3D 0x00000002
46 #define CM_ICLKEN_SGX CM_REG32(0xB10)
47 #define CM_ICLKEN_SGX_EN_SGX 0x00000001
49 #define CM_IDLEST_SGX CM_REG32(0xB20)
50 #define CM_IDLEST_SGX_ST_SGX 0x00000001
52 #define CM_CLKSEL_SGX CM_REG32(0xB40)
53 #define CM_CLKSEL_SGX_MASK 0x0000000f
54 #define CM_CLKSEL_SGX_L3DIV3 0x00000000
55 #define CM_CLKSEL_SGX_L3DIV4 0x00000001
56 #define CM_CLKSEL_SGX_L3DIV6 0x00000002
57 #define CM_CLKSEL_SGX_96M 0x00000003
59 #define CM_SLEEPDEP_SGX CM_REG32(0xB44)
60 #define CM_CLKSTCTRL_SGX CM_REG32(0xB48)
61 #define CM_CLKSTCTRL_SGX_AUTOSTATE 0x00008001
63 #define CM_CLKSTST_SGX CM_REG32(0xB4C)
64 #define CM_CLKSTST_SGX_STATUS_VALID 0x00000001
66 #define RM_RSTST_SGX PRM_REG32(0xB58)
67 #define RM_RSTST_SGX_RST_MASK 0x0000000F
68 #define RM_RSTST_SGX_COREDOMAINWKUP_RST 0x00000008
69 #define RM_RSTST_SGX_DOMAINWKUP_RST 0x00000004
70 #define RM_RSTST_SGX_GLOBALWARM_RST 0x00000002
71 #define RM_RSTST_SGX_GLOBALCOLD_RST 0x00000001
73 #define PM_WKDEP_SGXi PRM_REG32(0xBC8)
74 #define PM_WKDEP_SGX_EN_WAKEUP 0x00000010
75 #define PM_WKDEP_SGX_EN_MPU 0x00000002
76 #define PM_WKDEP_SGX_EN_CORE 0x00000001
78 #define PM_PWSTCTRL_SGX PRM_REG32(0xBE0)
79 #define PM_PWSTCTRL_SGX_POWERSTATE_MASK 0x00000003
80 #define PM_PWSTCTRL_SGX_OFF 0x00000000
81 #define PM_PWSTCTRL_SGX_RETENTION 0x00000001
82 #define PM_PWSTCTRL_SGX_ON 0x00000003
84 #define PM_PWSTST_SGX PRM_REG32(0xBE4)
85 #define PM_PWSTST_SGX_INTRANSITION 0x00100000
86 #define PM_PWSTST_SGX_CLKACTIVITY 0x00080000
87 #define PM_PWSTST_SGX_POWERSTATE_MASK 0x00000003
88 #define PM_PWSTST_SGX_OFF 0x00000003
89 #define PM_PWSTST_SGX_RETENTION 0x00000001
90 #define PM_PWSTST_SGX_ON 0x00000000
92 #define PM_PREPWSTST_SGX PRM_REG32(0xBE8)