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 {
36 SYS_DEVICE_FORCE_I16 = 0x7fff
39 #define SYS_DEVICE_COUNT 3
41 #define PRM_REG32(offset) (offset)
42 #define CM_REG32(offset) (offset)
44 #define CM_FCLKEN_SGX CM_REG32(0xB00)
45 #define CM_FCLKEN_SGX_EN_3D 0x00000002
47 #define CM_ICLKEN_SGX CM_REG32(0xB10)
48 #define CM_ICLKEN_SGX_EN_SGX 0x00000001
50 #define CM_IDLEST_SGX CM_REG32(0xB20)
51 #define CM_IDLEST_SGX_ST_SGX 0x00000001
53 #define CM_CLKSEL_SGX CM_REG32(0xB40)
54 #define CM_CLKSEL_SGX_MASK 0x0000000f
55 #define CM_CLKSEL_SGX_L3DIV3 0x00000000
56 #define CM_CLKSEL_SGX_L3DIV4 0x00000001
57 #define CM_CLKSEL_SGX_L3DIV6 0x00000002
58 #define CM_CLKSEL_SGX_96M 0x00000003
60 #define CM_SLEEPDEP_SGX CM_REG32(0xB44)
61 #define CM_CLKSTCTRL_SGX CM_REG32(0xB48)
62 #define CM_CLKSTCTRL_SGX_AUTOSTATE 0x00008001
64 #define CM_CLKSTST_SGX CM_REG32(0xB4C)
65 #define CM_CLKSTST_SGX_STATUS_VALID 0x00000001
67 #define RM_RSTST_SGX PRM_REG32(0xB58)
68 #define RM_RSTST_SGX_RST_MASK 0x0000000F
69 #define RM_RSTST_SGX_COREDOMAINWKUP_RST 0x00000008
70 #define RM_RSTST_SGX_DOMAINWKUP_RST 0x00000004
71 #define RM_RSTST_SGX_GLOBALWARM_RST 0x00000002
72 #define RM_RSTST_SGX_GLOBALCOLD_RST 0x00000001
74 #define PM_WKDEP_SGX PRM_REG32(0xBC8)
75 #define PM_WKDEP_SGX_EN_WAKEUP 0x00000010
76 #define PM_WKDEP_SGX_EN_MPU 0x00000002
77 #define PM_WKDEP_SGX_EN_CORE 0x00000001
79 #define PM_PWSTCTRL_SGX PRM_REG32(0xBE0)
80 #define PM_PWSTCTRL_SGX_POWERSTATE_MASK 0x00000003
81 #define PM_PWSTCTRL_SGX_OFF 0x00000000
82 #define PM_PWSTCTRL_SGX_RETENTION 0x00000001
83 #define PM_PWSTCTRL_SGX_ON 0x00000003
85 #define PM_PWSTST_SGX PRM_REG32(0xBE4)
86 #define PM_PWSTST_SGX_INTRANSITION 0x00100000
87 #define PM_PWSTST_SGX_CLKACTIVITY 0x00080000
88 #define PM_PWSTST_SGX_POWERSTATE_MASK 0x00000003
89 #define PM_PWSTST_SGX_OFF 0x00000003
90 #define PM_PWSTST_SGX_RETENTION 0x00000001
91 #define PM_PWSTST_SGX_ON 0x00000000
93 #define PM_PREPWSTST_SGX PRM_REG32(0xBE8)