18c2ecf20Sopenharmony_ci/* 28c2ecf20Sopenharmony_ci * Copyright 2008 Advanced Micro Devices, Inc. 38c2ecf20Sopenharmony_ci * Copyright 2008 Red Hat Inc. 48c2ecf20Sopenharmony_ci * Copyright 2009 Jerome Glisse. 58c2ecf20Sopenharmony_ci * 68c2ecf20Sopenharmony_ci * Permission is hereby granted, free of charge, to any person obtaining a 78c2ecf20Sopenharmony_ci * copy of this software and associated documentation files (the "Software"), 88c2ecf20Sopenharmony_ci * to deal in the Software without restriction, including without limitation 98c2ecf20Sopenharmony_ci * the rights to use, copy, modify, merge, publish, distribute, sublicense, 108c2ecf20Sopenharmony_ci * and/or sell copies of the Software, and to permit persons to whom the 118c2ecf20Sopenharmony_ci * Software is furnished to do so, subject to the following conditions: 128c2ecf20Sopenharmony_ci * 138c2ecf20Sopenharmony_ci * The above copyright notice and this permission notice shall be included in 148c2ecf20Sopenharmony_ci * all copies or substantial portions of the Software. 158c2ecf20Sopenharmony_ci * 168c2ecf20Sopenharmony_ci * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 178c2ecf20Sopenharmony_ci * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 188c2ecf20Sopenharmony_ci * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 198c2ecf20Sopenharmony_ci * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR 208c2ecf20Sopenharmony_ci * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 218c2ecf20Sopenharmony_ci * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 228c2ecf20Sopenharmony_ci * OTHER DEALINGS IN THE SOFTWARE. 238c2ecf20Sopenharmony_ci * 248c2ecf20Sopenharmony_ci * Authors: Dave Airlie 258c2ecf20Sopenharmony_ci * Alex Deucher 268c2ecf20Sopenharmony_ci * Jerome Glisse 278c2ecf20Sopenharmony_ci */ 288c2ecf20Sopenharmony_ci#ifndef __R300D_H__ 298c2ecf20Sopenharmony_ci#define __R300D_H__ 308c2ecf20Sopenharmony_ci 318c2ecf20Sopenharmony_ci#define CP_PACKET0 0x00000000 328c2ecf20Sopenharmony_ci#define PACKET0_BASE_INDEX_SHIFT 0 338c2ecf20Sopenharmony_ci#define PACKET0_BASE_INDEX_MASK (0x1ffff << 0) 348c2ecf20Sopenharmony_ci#define PACKET0_COUNT_SHIFT 16 358c2ecf20Sopenharmony_ci#define PACKET0_COUNT_MASK (0x3fff << 16) 368c2ecf20Sopenharmony_ci#define CP_PACKET1 0x40000000 378c2ecf20Sopenharmony_ci#define CP_PACKET2 0x80000000 388c2ecf20Sopenharmony_ci#define PACKET2_PAD_SHIFT 0 398c2ecf20Sopenharmony_ci#define PACKET2_PAD_MASK (0x3fffffff << 0) 408c2ecf20Sopenharmony_ci#define CP_PACKET3 0xC0000000 418c2ecf20Sopenharmony_ci#define PACKET3_IT_OPCODE_SHIFT 8 428c2ecf20Sopenharmony_ci#define PACKET3_IT_OPCODE_MASK (0xff << 8) 438c2ecf20Sopenharmony_ci#define PACKET3_COUNT_SHIFT 16 448c2ecf20Sopenharmony_ci#define PACKET3_COUNT_MASK (0x3fff << 16) 458c2ecf20Sopenharmony_ci/* PACKET3 op code */ 468c2ecf20Sopenharmony_ci#define PACKET3_NOP 0x10 478c2ecf20Sopenharmony_ci#define PACKET3_3D_DRAW_VBUF 0x28 488c2ecf20Sopenharmony_ci#define PACKET3_3D_DRAW_IMMD 0x29 498c2ecf20Sopenharmony_ci#define PACKET3_3D_DRAW_INDX 0x2A 508c2ecf20Sopenharmony_ci#define PACKET3_3D_LOAD_VBPNTR 0x2F 518c2ecf20Sopenharmony_ci#define PACKET3_3D_CLEAR_ZMASK 0x32 528c2ecf20Sopenharmony_ci#define PACKET3_INDX_BUFFER 0x33 538c2ecf20Sopenharmony_ci#define PACKET3_3D_DRAW_VBUF_2 0x34 548c2ecf20Sopenharmony_ci#define PACKET3_3D_DRAW_IMMD_2 0x35 558c2ecf20Sopenharmony_ci#define PACKET3_3D_DRAW_INDX_2 0x36 568c2ecf20Sopenharmony_ci#define PACKET3_3D_CLEAR_HIZ 0x37 578c2ecf20Sopenharmony_ci#define PACKET3_3D_CLEAR_CMASK 0x38 588c2ecf20Sopenharmony_ci#define PACKET3_BITBLT_MULTI 0x9B 598c2ecf20Sopenharmony_ci 608c2ecf20Sopenharmony_ci#define PACKET0(reg, n) (CP_PACKET0 | \ 618c2ecf20Sopenharmony_ci REG_SET(PACKET0_BASE_INDEX, (reg) >> 2) | \ 628c2ecf20Sopenharmony_ci REG_SET(PACKET0_COUNT, (n))) 638c2ecf20Sopenharmony_ci#define PACKET2(v) (CP_PACKET2 | REG_SET(PACKET2_PAD, (v))) 648c2ecf20Sopenharmony_ci#define PACKET3(op, n) (CP_PACKET3 | \ 658c2ecf20Sopenharmony_ci REG_SET(PACKET3_IT_OPCODE, (op)) | \ 668c2ecf20Sopenharmony_ci REG_SET(PACKET3_COUNT, (n))) 678c2ecf20Sopenharmony_ci 688c2ecf20Sopenharmony_ci/* Registers */ 698c2ecf20Sopenharmony_ci#define R_000148_MC_FB_LOCATION 0x000148 708c2ecf20Sopenharmony_ci#define S_000148_MC_FB_START(x) (((x) & 0xFFFF) << 0) 718c2ecf20Sopenharmony_ci#define G_000148_MC_FB_START(x) (((x) >> 0) & 0xFFFF) 728c2ecf20Sopenharmony_ci#define C_000148_MC_FB_START 0xFFFF0000 738c2ecf20Sopenharmony_ci#define S_000148_MC_FB_TOP(x) (((x) & 0xFFFF) << 16) 748c2ecf20Sopenharmony_ci#define G_000148_MC_FB_TOP(x) (((x) >> 16) & 0xFFFF) 758c2ecf20Sopenharmony_ci#define C_000148_MC_FB_TOP 0x0000FFFF 768c2ecf20Sopenharmony_ci#define R_00014C_MC_AGP_LOCATION 0x00014C 778c2ecf20Sopenharmony_ci#define S_00014C_MC_AGP_START(x) (((x) & 0xFFFF) << 0) 788c2ecf20Sopenharmony_ci#define G_00014C_MC_AGP_START(x) (((x) >> 0) & 0xFFFF) 798c2ecf20Sopenharmony_ci#define C_00014C_MC_AGP_START 0xFFFF0000 808c2ecf20Sopenharmony_ci#define S_00014C_MC_AGP_TOP(x) (((x) & 0xFFFF) << 16) 818c2ecf20Sopenharmony_ci#define G_00014C_MC_AGP_TOP(x) (((x) >> 16) & 0xFFFF) 828c2ecf20Sopenharmony_ci#define C_00014C_MC_AGP_TOP 0x0000FFFF 838c2ecf20Sopenharmony_ci#define R_00015C_AGP_BASE_2 0x00015C 848c2ecf20Sopenharmony_ci#define S_00015C_AGP_BASE_ADDR_2(x) (((x) & 0xF) << 0) 858c2ecf20Sopenharmony_ci#define G_00015C_AGP_BASE_ADDR_2(x) (((x) >> 0) & 0xF) 868c2ecf20Sopenharmony_ci#define C_00015C_AGP_BASE_ADDR_2 0xFFFFFFF0 878c2ecf20Sopenharmony_ci#define R_000170_AGP_BASE 0x000170 888c2ecf20Sopenharmony_ci#define S_000170_AGP_BASE_ADDR(x) (((x) & 0xFFFFFFFF) << 0) 898c2ecf20Sopenharmony_ci#define G_000170_AGP_BASE_ADDR(x) (((x) >> 0) & 0xFFFFFFFF) 908c2ecf20Sopenharmony_ci#define C_000170_AGP_BASE_ADDR 0x00000000 918c2ecf20Sopenharmony_ci#define R_0007C0_CP_STAT 0x0007C0 928c2ecf20Sopenharmony_ci#define S_0007C0_MRU_BUSY(x) (((x) & 0x1) << 0) 938c2ecf20Sopenharmony_ci#define G_0007C0_MRU_BUSY(x) (((x) >> 0) & 0x1) 948c2ecf20Sopenharmony_ci#define C_0007C0_MRU_BUSY 0xFFFFFFFE 958c2ecf20Sopenharmony_ci#define S_0007C0_MWU_BUSY(x) (((x) & 0x1) << 1) 968c2ecf20Sopenharmony_ci#define G_0007C0_MWU_BUSY(x) (((x) >> 1) & 0x1) 978c2ecf20Sopenharmony_ci#define C_0007C0_MWU_BUSY 0xFFFFFFFD 988c2ecf20Sopenharmony_ci#define S_0007C0_RSIU_BUSY(x) (((x) & 0x1) << 2) 998c2ecf20Sopenharmony_ci#define G_0007C0_RSIU_BUSY(x) (((x) >> 2) & 0x1) 1008c2ecf20Sopenharmony_ci#define C_0007C0_RSIU_BUSY 0xFFFFFFFB 1018c2ecf20Sopenharmony_ci#define S_0007C0_RCIU_BUSY(x) (((x) & 0x1) << 3) 1028c2ecf20Sopenharmony_ci#define G_0007C0_RCIU_BUSY(x) (((x) >> 3) & 0x1) 1038c2ecf20Sopenharmony_ci#define C_0007C0_RCIU_BUSY 0xFFFFFFF7 1048c2ecf20Sopenharmony_ci#define S_0007C0_CSF_PRIMARY_BUSY(x) (((x) & 0x1) << 9) 1058c2ecf20Sopenharmony_ci#define G_0007C0_CSF_PRIMARY_BUSY(x) (((x) >> 9) & 0x1) 1068c2ecf20Sopenharmony_ci#define C_0007C0_CSF_PRIMARY_BUSY 0xFFFFFDFF 1078c2ecf20Sopenharmony_ci#define S_0007C0_CSF_INDIRECT_BUSY(x) (((x) & 0x1) << 10) 1088c2ecf20Sopenharmony_ci#define G_0007C0_CSF_INDIRECT_BUSY(x) (((x) >> 10) & 0x1) 1098c2ecf20Sopenharmony_ci#define C_0007C0_CSF_INDIRECT_BUSY 0xFFFFFBFF 1108c2ecf20Sopenharmony_ci#define S_0007C0_CSQ_PRIMARY_BUSY(x) (((x) & 0x1) << 11) 1118c2ecf20Sopenharmony_ci#define G_0007C0_CSQ_PRIMARY_BUSY(x) (((x) >> 11) & 0x1) 1128c2ecf20Sopenharmony_ci#define C_0007C0_CSQ_PRIMARY_BUSY 0xFFFFF7FF 1138c2ecf20Sopenharmony_ci#define S_0007C0_CSQ_INDIRECT_BUSY(x) (((x) & 0x1) << 12) 1148c2ecf20Sopenharmony_ci#define G_0007C0_CSQ_INDIRECT_BUSY(x) (((x) >> 12) & 0x1) 1158c2ecf20Sopenharmony_ci#define C_0007C0_CSQ_INDIRECT_BUSY 0xFFFFEFFF 1168c2ecf20Sopenharmony_ci#define S_0007C0_CSI_BUSY(x) (((x) & 0x1) << 13) 1178c2ecf20Sopenharmony_ci#define G_0007C0_CSI_BUSY(x) (((x) >> 13) & 0x1) 1188c2ecf20Sopenharmony_ci#define C_0007C0_CSI_BUSY 0xFFFFDFFF 1198c2ecf20Sopenharmony_ci#define S_0007C0_CSF_INDIRECT2_BUSY(x) (((x) & 0x1) << 14) 1208c2ecf20Sopenharmony_ci#define G_0007C0_CSF_INDIRECT2_BUSY(x) (((x) >> 14) & 0x1) 1218c2ecf20Sopenharmony_ci#define C_0007C0_CSF_INDIRECT2_BUSY 0xFFFFBFFF 1228c2ecf20Sopenharmony_ci#define S_0007C0_CSQ_INDIRECT2_BUSY(x) (((x) & 0x1) << 15) 1238c2ecf20Sopenharmony_ci#define G_0007C0_CSQ_INDIRECT2_BUSY(x) (((x) >> 15) & 0x1) 1248c2ecf20Sopenharmony_ci#define C_0007C0_CSQ_INDIRECT2_BUSY 0xFFFF7FFF 1258c2ecf20Sopenharmony_ci#define S_0007C0_GUIDMA_BUSY(x) (((x) & 0x1) << 28) 1268c2ecf20Sopenharmony_ci#define G_0007C0_GUIDMA_BUSY(x) (((x) >> 28) & 0x1) 1278c2ecf20Sopenharmony_ci#define C_0007C0_GUIDMA_BUSY 0xEFFFFFFF 1288c2ecf20Sopenharmony_ci#define S_0007C0_VIDDMA_BUSY(x) (((x) & 0x1) << 29) 1298c2ecf20Sopenharmony_ci#define G_0007C0_VIDDMA_BUSY(x) (((x) >> 29) & 0x1) 1308c2ecf20Sopenharmony_ci#define C_0007C0_VIDDMA_BUSY 0xDFFFFFFF 1318c2ecf20Sopenharmony_ci#define S_0007C0_CMDSTRM_BUSY(x) (((x) & 0x1) << 30) 1328c2ecf20Sopenharmony_ci#define G_0007C0_CMDSTRM_BUSY(x) (((x) >> 30) & 0x1) 1338c2ecf20Sopenharmony_ci#define C_0007C0_CMDSTRM_BUSY 0xBFFFFFFF 1348c2ecf20Sopenharmony_ci#define S_0007C0_CP_BUSY(x) (((x) & 0x1) << 31) 1358c2ecf20Sopenharmony_ci#define G_0007C0_CP_BUSY(x) (((x) >> 31) & 0x1) 1368c2ecf20Sopenharmony_ci#define C_0007C0_CP_BUSY 0x7FFFFFFF 1378c2ecf20Sopenharmony_ci#define R_000E40_RBBM_STATUS 0x000E40 1388c2ecf20Sopenharmony_ci#define S_000E40_CMDFIFO_AVAIL(x) (((x) & 0x7F) << 0) 1398c2ecf20Sopenharmony_ci#define G_000E40_CMDFIFO_AVAIL(x) (((x) >> 0) & 0x7F) 1408c2ecf20Sopenharmony_ci#define C_000E40_CMDFIFO_AVAIL 0xFFFFFF80 1418c2ecf20Sopenharmony_ci#define S_000E40_HIRQ_ON_RBB(x) (((x) & 0x1) << 8) 1428c2ecf20Sopenharmony_ci#define G_000E40_HIRQ_ON_RBB(x) (((x) >> 8) & 0x1) 1438c2ecf20Sopenharmony_ci#define C_000E40_HIRQ_ON_RBB 0xFFFFFEFF 1448c2ecf20Sopenharmony_ci#define S_000E40_CPRQ_ON_RBB(x) (((x) & 0x1) << 9) 1458c2ecf20Sopenharmony_ci#define G_000E40_CPRQ_ON_RBB(x) (((x) >> 9) & 0x1) 1468c2ecf20Sopenharmony_ci#define C_000E40_CPRQ_ON_RBB 0xFFFFFDFF 1478c2ecf20Sopenharmony_ci#define S_000E40_CFRQ_ON_RBB(x) (((x) & 0x1) << 10) 1488c2ecf20Sopenharmony_ci#define G_000E40_CFRQ_ON_RBB(x) (((x) >> 10) & 0x1) 1498c2ecf20Sopenharmony_ci#define C_000E40_CFRQ_ON_RBB 0xFFFFFBFF 1508c2ecf20Sopenharmony_ci#define S_000E40_HIRQ_IN_RTBUF(x) (((x) & 0x1) << 11) 1518c2ecf20Sopenharmony_ci#define G_000E40_HIRQ_IN_RTBUF(x) (((x) >> 11) & 0x1) 1528c2ecf20Sopenharmony_ci#define C_000E40_HIRQ_IN_RTBUF 0xFFFFF7FF 1538c2ecf20Sopenharmony_ci#define S_000E40_CPRQ_IN_RTBUF(x) (((x) & 0x1) << 12) 1548c2ecf20Sopenharmony_ci#define G_000E40_CPRQ_IN_RTBUF(x) (((x) >> 12) & 0x1) 1558c2ecf20Sopenharmony_ci#define C_000E40_CPRQ_IN_RTBUF 0xFFFFEFFF 1568c2ecf20Sopenharmony_ci#define S_000E40_CFRQ_IN_RTBUF(x) (((x) & 0x1) << 13) 1578c2ecf20Sopenharmony_ci#define G_000E40_CFRQ_IN_RTBUF(x) (((x) >> 13) & 0x1) 1588c2ecf20Sopenharmony_ci#define C_000E40_CFRQ_IN_RTBUF 0xFFFFDFFF 1598c2ecf20Sopenharmony_ci#define S_000E40_CF_PIPE_BUSY(x) (((x) & 0x1) << 14) 1608c2ecf20Sopenharmony_ci#define G_000E40_CF_PIPE_BUSY(x) (((x) >> 14) & 0x1) 1618c2ecf20Sopenharmony_ci#define C_000E40_CF_PIPE_BUSY 0xFFFFBFFF 1628c2ecf20Sopenharmony_ci#define S_000E40_ENG_EV_BUSY(x) (((x) & 0x1) << 15) 1638c2ecf20Sopenharmony_ci#define G_000E40_ENG_EV_BUSY(x) (((x) >> 15) & 0x1) 1648c2ecf20Sopenharmony_ci#define C_000E40_ENG_EV_BUSY 0xFFFF7FFF 1658c2ecf20Sopenharmony_ci#define S_000E40_CP_CMDSTRM_BUSY(x) (((x) & 0x1) << 16) 1668c2ecf20Sopenharmony_ci#define G_000E40_CP_CMDSTRM_BUSY(x) (((x) >> 16) & 0x1) 1678c2ecf20Sopenharmony_ci#define C_000E40_CP_CMDSTRM_BUSY 0xFFFEFFFF 1688c2ecf20Sopenharmony_ci#define S_000E40_E2_BUSY(x) (((x) & 0x1) << 17) 1698c2ecf20Sopenharmony_ci#define G_000E40_E2_BUSY(x) (((x) >> 17) & 0x1) 1708c2ecf20Sopenharmony_ci#define C_000E40_E2_BUSY 0xFFFDFFFF 1718c2ecf20Sopenharmony_ci#define S_000E40_RB2D_BUSY(x) (((x) & 0x1) << 18) 1728c2ecf20Sopenharmony_ci#define G_000E40_RB2D_BUSY(x) (((x) >> 18) & 0x1) 1738c2ecf20Sopenharmony_ci#define C_000E40_RB2D_BUSY 0xFFFBFFFF 1748c2ecf20Sopenharmony_ci#define S_000E40_RB3D_BUSY(x) (((x) & 0x1) << 19) 1758c2ecf20Sopenharmony_ci#define G_000E40_RB3D_BUSY(x) (((x) >> 19) & 0x1) 1768c2ecf20Sopenharmony_ci#define C_000E40_RB3D_BUSY 0xFFF7FFFF 1778c2ecf20Sopenharmony_ci#define S_000E40_VAP_BUSY(x) (((x) & 0x1) << 20) 1788c2ecf20Sopenharmony_ci#define G_000E40_VAP_BUSY(x) (((x) >> 20) & 0x1) 1798c2ecf20Sopenharmony_ci#define C_000E40_VAP_BUSY 0xFFEFFFFF 1808c2ecf20Sopenharmony_ci#define S_000E40_RE_BUSY(x) (((x) & 0x1) << 21) 1818c2ecf20Sopenharmony_ci#define G_000E40_RE_BUSY(x) (((x) >> 21) & 0x1) 1828c2ecf20Sopenharmony_ci#define C_000E40_RE_BUSY 0xFFDFFFFF 1838c2ecf20Sopenharmony_ci#define S_000E40_TAM_BUSY(x) (((x) & 0x1) << 22) 1848c2ecf20Sopenharmony_ci#define G_000E40_TAM_BUSY(x) (((x) >> 22) & 0x1) 1858c2ecf20Sopenharmony_ci#define C_000E40_TAM_BUSY 0xFFBFFFFF 1868c2ecf20Sopenharmony_ci#define S_000E40_TDM_BUSY(x) (((x) & 0x1) << 23) 1878c2ecf20Sopenharmony_ci#define G_000E40_TDM_BUSY(x) (((x) >> 23) & 0x1) 1888c2ecf20Sopenharmony_ci#define C_000E40_TDM_BUSY 0xFF7FFFFF 1898c2ecf20Sopenharmony_ci#define S_000E40_PB_BUSY(x) (((x) & 0x1) << 24) 1908c2ecf20Sopenharmony_ci#define G_000E40_PB_BUSY(x) (((x) >> 24) & 0x1) 1918c2ecf20Sopenharmony_ci#define C_000E40_PB_BUSY 0xFEFFFFFF 1928c2ecf20Sopenharmony_ci#define S_000E40_TIM_BUSY(x) (((x) & 0x1) << 25) 1938c2ecf20Sopenharmony_ci#define G_000E40_TIM_BUSY(x) (((x) >> 25) & 0x1) 1948c2ecf20Sopenharmony_ci#define C_000E40_TIM_BUSY 0xFDFFFFFF 1958c2ecf20Sopenharmony_ci#define S_000E40_GA_BUSY(x) (((x) & 0x1) << 26) 1968c2ecf20Sopenharmony_ci#define G_000E40_GA_BUSY(x) (((x) >> 26) & 0x1) 1978c2ecf20Sopenharmony_ci#define C_000E40_GA_BUSY 0xFBFFFFFF 1988c2ecf20Sopenharmony_ci#define S_000E40_CBA2D_BUSY(x) (((x) & 0x1) << 27) 1998c2ecf20Sopenharmony_ci#define G_000E40_CBA2D_BUSY(x) (((x) >> 27) & 0x1) 2008c2ecf20Sopenharmony_ci#define C_000E40_CBA2D_BUSY 0xF7FFFFFF 2018c2ecf20Sopenharmony_ci#define S_000E40_GUI_ACTIVE(x) (((x) & 0x1) << 31) 2028c2ecf20Sopenharmony_ci#define G_000E40_GUI_ACTIVE(x) (((x) >> 31) & 0x1) 2038c2ecf20Sopenharmony_ci#define C_000E40_GUI_ACTIVE 0x7FFFFFFF 2048c2ecf20Sopenharmony_ci#define R_0000F0_RBBM_SOFT_RESET 0x0000F0 2058c2ecf20Sopenharmony_ci#define S_0000F0_SOFT_RESET_CP(x) (((x) & 0x1) << 0) 2068c2ecf20Sopenharmony_ci#define G_0000F0_SOFT_RESET_CP(x) (((x) >> 0) & 0x1) 2078c2ecf20Sopenharmony_ci#define C_0000F0_SOFT_RESET_CP 0xFFFFFFFE 2088c2ecf20Sopenharmony_ci#define S_0000F0_SOFT_RESET_HI(x) (((x) & 0x1) << 1) 2098c2ecf20Sopenharmony_ci#define G_0000F0_SOFT_RESET_HI(x) (((x) >> 1) & 0x1) 2108c2ecf20Sopenharmony_ci#define C_0000F0_SOFT_RESET_HI 0xFFFFFFFD 2118c2ecf20Sopenharmony_ci#define S_0000F0_SOFT_RESET_VAP(x) (((x) & 0x1) << 2) 2128c2ecf20Sopenharmony_ci#define G_0000F0_SOFT_RESET_VAP(x) (((x) >> 2) & 0x1) 2138c2ecf20Sopenharmony_ci#define C_0000F0_SOFT_RESET_VAP 0xFFFFFFFB 2148c2ecf20Sopenharmony_ci#define S_0000F0_SOFT_RESET_RE(x) (((x) & 0x1) << 3) 2158c2ecf20Sopenharmony_ci#define G_0000F0_SOFT_RESET_RE(x) (((x) >> 3) & 0x1) 2168c2ecf20Sopenharmony_ci#define C_0000F0_SOFT_RESET_RE 0xFFFFFFF7 2178c2ecf20Sopenharmony_ci#define S_0000F0_SOFT_RESET_PP(x) (((x) & 0x1) << 4) 2188c2ecf20Sopenharmony_ci#define G_0000F0_SOFT_RESET_PP(x) (((x) >> 4) & 0x1) 2198c2ecf20Sopenharmony_ci#define C_0000F0_SOFT_RESET_PP 0xFFFFFFEF 2208c2ecf20Sopenharmony_ci#define S_0000F0_SOFT_RESET_E2(x) (((x) & 0x1) << 5) 2218c2ecf20Sopenharmony_ci#define G_0000F0_SOFT_RESET_E2(x) (((x) >> 5) & 0x1) 2228c2ecf20Sopenharmony_ci#define C_0000F0_SOFT_RESET_E2 0xFFFFFFDF 2238c2ecf20Sopenharmony_ci#define S_0000F0_SOFT_RESET_RB(x) (((x) & 0x1) << 6) 2248c2ecf20Sopenharmony_ci#define G_0000F0_SOFT_RESET_RB(x) (((x) >> 6) & 0x1) 2258c2ecf20Sopenharmony_ci#define C_0000F0_SOFT_RESET_RB 0xFFFFFFBF 2268c2ecf20Sopenharmony_ci#define S_0000F0_SOFT_RESET_HDP(x) (((x) & 0x1) << 7) 2278c2ecf20Sopenharmony_ci#define G_0000F0_SOFT_RESET_HDP(x) (((x) >> 7) & 0x1) 2288c2ecf20Sopenharmony_ci#define C_0000F0_SOFT_RESET_HDP 0xFFFFFF7F 2298c2ecf20Sopenharmony_ci#define S_0000F0_SOFT_RESET_MC(x) (((x) & 0x1) << 8) 2308c2ecf20Sopenharmony_ci#define G_0000F0_SOFT_RESET_MC(x) (((x) >> 8) & 0x1) 2318c2ecf20Sopenharmony_ci#define C_0000F0_SOFT_RESET_MC 0xFFFFFEFF 2328c2ecf20Sopenharmony_ci#define S_0000F0_SOFT_RESET_AIC(x) (((x) & 0x1) << 9) 2338c2ecf20Sopenharmony_ci#define G_0000F0_SOFT_RESET_AIC(x) (((x) >> 9) & 0x1) 2348c2ecf20Sopenharmony_ci#define C_0000F0_SOFT_RESET_AIC 0xFFFFFDFF 2358c2ecf20Sopenharmony_ci#define S_0000F0_SOFT_RESET_VIP(x) (((x) & 0x1) << 10) 2368c2ecf20Sopenharmony_ci#define G_0000F0_SOFT_RESET_VIP(x) (((x) >> 10) & 0x1) 2378c2ecf20Sopenharmony_ci#define C_0000F0_SOFT_RESET_VIP 0xFFFFFBFF 2388c2ecf20Sopenharmony_ci#define S_0000F0_SOFT_RESET_DISP(x) (((x) & 0x1) << 11) 2398c2ecf20Sopenharmony_ci#define G_0000F0_SOFT_RESET_DISP(x) (((x) >> 11) & 0x1) 2408c2ecf20Sopenharmony_ci#define C_0000F0_SOFT_RESET_DISP 0xFFFFF7FF 2418c2ecf20Sopenharmony_ci#define S_0000F0_SOFT_RESET_CG(x) (((x) & 0x1) << 12) 2428c2ecf20Sopenharmony_ci#define G_0000F0_SOFT_RESET_CG(x) (((x) >> 12) & 0x1) 2438c2ecf20Sopenharmony_ci#define C_0000F0_SOFT_RESET_CG 0xFFFFEFFF 2448c2ecf20Sopenharmony_ci#define S_0000F0_SOFT_RESET_GA(x) (((x) & 0x1) << 13) 2458c2ecf20Sopenharmony_ci#define G_0000F0_SOFT_RESET_GA(x) (((x) >> 13) & 0x1) 2468c2ecf20Sopenharmony_ci#define C_0000F0_SOFT_RESET_GA 0xFFFFDFFF 2478c2ecf20Sopenharmony_ci#define S_0000F0_SOFT_RESET_IDCT(x) (((x) & 0x1) << 14) 2488c2ecf20Sopenharmony_ci#define G_0000F0_SOFT_RESET_IDCT(x) (((x) >> 14) & 0x1) 2498c2ecf20Sopenharmony_ci#define C_0000F0_SOFT_RESET_IDCT 0xFFFFBFFF 2508c2ecf20Sopenharmony_ci 2518c2ecf20Sopenharmony_ci#define R_00000D_SCLK_CNTL 0x00000D 2528c2ecf20Sopenharmony_ci#define S_00000D_SCLK_SRC_SEL(x) (((x) & 0x7) << 0) 2538c2ecf20Sopenharmony_ci#define G_00000D_SCLK_SRC_SEL(x) (((x) >> 0) & 0x7) 2548c2ecf20Sopenharmony_ci#define C_00000D_SCLK_SRC_SEL 0xFFFFFFF8 2558c2ecf20Sopenharmony_ci#define S_00000D_CP_MAX_DYN_STOP_LAT(x) (((x) & 0x1) << 3) 2568c2ecf20Sopenharmony_ci#define G_00000D_CP_MAX_DYN_STOP_LAT(x) (((x) >> 3) & 0x1) 2578c2ecf20Sopenharmony_ci#define C_00000D_CP_MAX_DYN_STOP_LAT 0xFFFFFFF7 2588c2ecf20Sopenharmony_ci#define S_00000D_HDP_MAX_DYN_STOP_LAT(x) (((x) & 0x1) << 4) 2598c2ecf20Sopenharmony_ci#define G_00000D_HDP_MAX_DYN_STOP_LAT(x) (((x) >> 4) & 0x1) 2608c2ecf20Sopenharmony_ci#define C_00000D_HDP_MAX_DYN_STOP_LAT 0xFFFFFFEF 2618c2ecf20Sopenharmony_ci#define S_00000D_TV_MAX_DYN_STOP_LAT(x) (((x) & 0x1) << 5) 2628c2ecf20Sopenharmony_ci#define G_00000D_TV_MAX_DYN_STOP_LAT(x) (((x) >> 5) & 0x1) 2638c2ecf20Sopenharmony_ci#define C_00000D_TV_MAX_DYN_STOP_LAT 0xFFFFFFDF 2648c2ecf20Sopenharmony_ci#define S_00000D_E2_MAX_DYN_STOP_LAT(x) (((x) & 0x1) << 6) 2658c2ecf20Sopenharmony_ci#define G_00000D_E2_MAX_DYN_STOP_LAT(x) (((x) >> 6) & 0x1) 2668c2ecf20Sopenharmony_ci#define C_00000D_E2_MAX_DYN_STOP_LAT 0xFFFFFFBF 2678c2ecf20Sopenharmony_ci#define S_00000D_SE_MAX_DYN_STOP_LAT(x) (((x) & 0x1) << 7) 2688c2ecf20Sopenharmony_ci#define G_00000D_SE_MAX_DYN_STOP_LAT(x) (((x) >> 7) & 0x1) 2698c2ecf20Sopenharmony_ci#define C_00000D_SE_MAX_DYN_STOP_LAT 0xFFFFFF7F 2708c2ecf20Sopenharmony_ci#define S_00000D_IDCT_MAX_DYN_STOP_LAT(x) (((x) & 0x1) << 8) 2718c2ecf20Sopenharmony_ci#define G_00000D_IDCT_MAX_DYN_STOP_LAT(x) (((x) >> 8) & 0x1) 2728c2ecf20Sopenharmony_ci#define C_00000D_IDCT_MAX_DYN_STOP_LAT 0xFFFFFEFF 2738c2ecf20Sopenharmony_ci#define S_00000D_VIP_MAX_DYN_STOP_LAT(x) (((x) & 0x1) << 9) 2748c2ecf20Sopenharmony_ci#define G_00000D_VIP_MAX_DYN_STOP_LAT(x) (((x) >> 9) & 0x1) 2758c2ecf20Sopenharmony_ci#define C_00000D_VIP_MAX_DYN_STOP_LAT 0xFFFFFDFF 2768c2ecf20Sopenharmony_ci#define S_00000D_RE_MAX_DYN_STOP_LAT(x) (((x) & 0x1) << 10) 2778c2ecf20Sopenharmony_ci#define G_00000D_RE_MAX_DYN_STOP_LAT(x) (((x) >> 10) & 0x1) 2788c2ecf20Sopenharmony_ci#define C_00000D_RE_MAX_DYN_STOP_LAT 0xFFFFFBFF 2798c2ecf20Sopenharmony_ci#define S_00000D_PB_MAX_DYN_STOP_LAT(x) (((x) & 0x1) << 11) 2808c2ecf20Sopenharmony_ci#define G_00000D_PB_MAX_DYN_STOP_LAT(x) (((x) >> 11) & 0x1) 2818c2ecf20Sopenharmony_ci#define C_00000D_PB_MAX_DYN_STOP_LAT 0xFFFFF7FF 2828c2ecf20Sopenharmony_ci#define S_00000D_TAM_MAX_DYN_STOP_LAT(x) (((x) & 0x1) << 12) 2838c2ecf20Sopenharmony_ci#define G_00000D_TAM_MAX_DYN_STOP_LAT(x) (((x) >> 12) & 0x1) 2848c2ecf20Sopenharmony_ci#define C_00000D_TAM_MAX_DYN_STOP_LAT 0xFFFFEFFF 2858c2ecf20Sopenharmony_ci#define S_00000D_TDM_MAX_DYN_STOP_LAT(x) (((x) & 0x1) << 13) 2868c2ecf20Sopenharmony_ci#define G_00000D_TDM_MAX_DYN_STOP_LAT(x) (((x) >> 13) & 0x1) 2878c2ecf20Sopenharmony_ci#define C_00000D_TDM_MAX_DYN_STOP_LAT 0xFFFFDFFF 2888c2ecf20Sopenharmony_ci#define S_00000D_RB_MAX_DYN_STOP_LAT(x) (((x) & 0x1) << 14) 2898c2ecf20Sopenharmony_ci#define G_00000D_RB_MAX_DYN_STOP_LAT(x) (((x) >> 14) & 0x1) 2908c2ecf20Sopenharmony_ci#define C_00000D_RB_MAX_DYN_STOP_LAT 0xFFFFBFFF 2918c2ecf20Sopenharmony_ci#define S_00000D_FORCE_DISP2(x) (((x) & 0x1) << 15) 2928c2ecf20Sopenharmony_ci#define G_00000D_FORCE_DISP2(x) (((x) >> 15) & 0x1) 2938c2ecf20Sopenharmony_ci#define C_00000D_FORCE_DISP2 0xFFFF7FFF 2948c2ecf20Sopenharmony_ci#define S_00000D_FORCE_CP(x) (((x) & 0x1) << 16) 2958c2ecf20Sopenharmony_ci#define G_00000D_FORCE_CP(x) (((x) >> 16) & 0x1) 2968c2ecf20Sopenharmony_ci#define C_00000D_FORCE_CP 0xFFFEFFFF 2978c2ecf20Sopenharmony_ci#define S_00000D_FORCE_HDP(x) (((x) & 0x1) << 17) 2988c2ecf20Sopenharmony_ci#define G_00000D_FORCE_HDP(x) (((x) >> 17) & 0x1) 2998c2ecf20Sopenharmony_ci#define C_00000D_FORCE_HDP 0xFFFDFFFF 3008c2ecf20Sopenharmony_ci#define S_00000D_FORCE_DISP1(x) (((x) & 0x1) << 18) 3018c2ecf20Sopenharmony_ci#define G_00000D_FORCE_DISP1(x) (((x) >> 18) & 0x1) 3028c2ecf20Sopenharmony_ci#define C_00000D_FORCE_DISP1 0xFFFBFFFF 3038c2ecf20Sopenharmony_ci#define S_00000D_FORCE_TOP(x) (((x) & 0x1) << 19) 3048c2ecf20Sopenharmony_ci#define G_00000D_FORCE_TOP(x) (((x) >> 19) & 0x1) 3058c2ecf20Sopenharmony_ci#define C_00000D_FORCE_TOP 0xFFF7FFFF 3068c2ecf20Sopenharmony_ci#define S_00000D_FORCE_E2(x) (((x) & 0x1) << 20) 3078c2ecf20Sopenharmony_ci#define G_00000D_FORCE_E2(x) (((x) >> 20) & 0x1) 3088c2ecf20Sopenharmony_ci#define C_00000D_FORCE_E2 0xFFEFFFFF 3098c2ecf20Sopenharmony_ci#define S_00000D_FORCE_SE(x) (((x) & 0x1) << 21) 3108c2ecf20Sopenharmony_ci#define G_00000D_FORCE_SE(x) (((x) >> 21) & 0x1) 3118c2ecf20Sopenharmony_ci#define C_00000D_FORCE_SE 0xFFDFFFFF 3128c2ecf20Sopenharmony_ci#define S_00000D_FORCE_IDCT(x) (((x) & 0x1) << 22) 3138c2ecf20Sopenharmony_ci#define G_00000D_FORCE_IDCT(x) (((x) >> 22) & 0x1) 3148c2ecf20Sopenharmony_ci#define C_00000D_FORCE_IDCT 0xFFBFFFFF 3158c2ecf20Sopenharmony_ci#define S_00000D_FORCE_VIP(x) (((x) & 0x1) << 23) 3168c2ecf20Sopenharmony_ci#define G_00000D_FORCE_VIP(x) (((x) >> 23) & 0x1) 3178c2ecf20Sopenharmony_ci#define C_00000D_FORCE_VIP 0xFF7FFFFF 3188c2ecf20Sopenharmony_ci#define S_00000D_FORCE_RE(x) (((x) & 0x1) << 24) 3198c2ecf20Sopenharmony_ci#define G_00000D_FORCE_RE(x) (((x) >> 24) & 0x1) 3208c2ecf20Sopenharmony_ci#define C_00000D_FORCE_RE 0xFEFFFFFF 3218c2ecf20Sopenharmony_ci#define S_00000D_FORCE_PB(x) (((x) & 0x1) << 25) 3228c2ecf20Sopenharmony_ci#define G_00000D_FORCE_PB(x) (((x) >> 25) & 0x1) 3238c2ecf20Sopenharmony_ci#define C_00000D_FORCE_PB 0xFDFFFFFF 3248c2ecf20Sopenharmony_ci#define S_00000D_FORCE_TAM(x) (((x) & 0x1) << 26) 3258c2ecf20Sopenharmony_ci#define G_00000D_FORCE_TAM(x) (((x) >> 26) & 0x1) 3268c2ecf20Sopenharmony_ci#define C_00000D_FORCE_TAM 0xFBFFFFFF 3278c2ecf20Sopenharmony_ci#define S_00000D_FORCE_TDM(x) (((x) & 0x1) << 27) 3288c2ecf20Sopenharmony_ci#define G_00000D_FORCE_TDM(x) (((x) >> 27) & 0x1) 3298c2ecf20Sopenharmony_ci#define C_00000D_FORCE_TDM 0xF7FFFFFF 3308c2ecf20Sopenharmony_ci#define S_00000D_FORCE_RB(x) (((x) & 0x1) << 28) 3318c2ecf20Sopenharmony_ci#define G_00000D_FORCE_RB(x) (((x) >> 28) & 0x1) 3328c2ecf20Sopenharmony_ci#define C_00000D_FORCE_RB 0xEFFFFFFF 3338c2ecf20Sopenharmony_ci#define S_00000D_FORCE_TV_SCLK(x) (((x) & 0x1) << 29) 3348c2ecf20Sopenharmony_ci#define G_00000D_FORCE_TV_SCLK(x) (((x) >> 29) & 0x1) 3358c2ecf20Sopenharmony_ci#define C_00000D_FORCE_TV_SCLK 0xDFFFFFFF 3368c2ecf20Sopenharmony_ci#define S_00000D_FORCE_SUBPIC(x) (((x) & 0x1) << 30) 3378c2ecf20Sopenharmony_ci#define G_00000D_FORCE_SUBPIC(x) (((x) >> 30) & 0x1) 3388c2ecf20Sopenharmony_ci#define C_00000D_FORCE_SUBPIC 0xBFFFFFFF 3398c2ecf20Sopenharmony_ci#define S_00000D_FORCE_OV0(x) (((x) & 0x1) << 31) 3408c2ecf20Sopenharmony_ci#define G_00000D_FORCE_OV0(x) (((x) >> 31) & 0x1) 3418c2ecf20Sopenharmony_ci#define C_00000D_FORCE_OV0 0x7FFFFFFF 3428c2ecf20Sopenharmony_ci 3438c2ecf20Sopenharmony_ci#endif 344