18c2ecf20Sopenharmony_ci/***************************************************************************** 28c2ecf20Sopenharmony_ci * * 38c2ecf20Sopenharmony_ci * File: regs.h * 48c2ecf20Sopenharmony_ci * $Revision: 1.8 $ * 58c2ecf20Sopenharmony_ci * $Date: 2005/06/21 18:29:48 $ * 68c2ecf20Sopenharmony_ci * Description: * 78c2ecf20Sopenharmony_ci * part of the Chelsio 10Gb Ethernet Driver. * 88c2ecf20Sopenharmony_ci * * 98c2ecf20Sopenharmony_ci * This program is free software; you can redistribute it and/or modify * 108c2ecf20Sopenharmony_ci * it under the terms of the GNU General Public License, version 2, as * 118c2ecf20Sopenharmony_ci * published by the Free Software Foundation. * 128c2ecf20Sopenharmony_ci * * 138c2ecf20Sopenharmony_ci * You should have received a copy of the GNU General Public License along * 148c2ecf20Sopenharmony_ci * with this program; if not, see <http://www.gnu.org/licenses/>. * 158c2ecf20Sopenharmony_ci * * 168c2ecf20Sopenharmony_ci * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED * 178c2ecf20Sopenharmony_ci * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF * 188c2ecf20Sopenharmony_ci * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. * 198c2ecf20Sopenharmony_ci * * 208c2ecf20Sopenharmony_ci * http://www.chelsio.com * 218c2ecf20Sopenharmony_ci * * 228c2ecf20Sopenharmony_ci * Copyright (c) 2003 - 2005 Chelsio Communications, Inc. * 238c2ecf20Sopenharmony_ci * All rights reserved. * 248c2ecf20Sopenharmony_ci * * 258c2ecf20Sopenharmony_ci * Maintainers: maintainers@chelsio.com * 268c2ecf20Sopenharmony_ci * * 278c2ecf20Sopenharmony_ci * Authors: Dimitrios Michailidis <dm@chelsio.com> * 288c2ecf20Sopenharmony_ci * Tina Yang <tainay@chelsio.com> * 298c2ecf20Sopenharmony_ci * Felix Marti <felix@chelsio.com> * 308c2ecf20Sopenharmony_ci * Scott Bardone <sbardone@chelsio.com> * 318c2ecf20Sopenharmony_ci * Kurt Ottaway <kottaway@chelsio.com> * 328c2ecf20Sopenharmony_ci * Frank DiMambro <frank@chelsio.com> * 338c2ecf20Sopenharmony_ci * * 348c2ecf20Sopenharmony_ci * History: * 358c2ecf20Sopenharmony_ci * * 368c2ecf20Sopenharmony_ci ****************************************************************************/ 378c2ecf20Sopenharmony_ci 388c2ecf20Sopenharmony_ci#ifndef _CXGB_REGS_H_ 398c2ecf20Sopenharmony_ci#define _CXGB_REGS_H_ 408c2ecf20Sopenharmony_ci 418c2ecf20Sopenharmony_ci/* SGE registers */ 428c2ecf20Sopenharmony_ci#define A_SG_CONTROL 0x0 438c2ecf20Sopenharmony_ci 448c2ecf20Sopenharmony_ci#define S_CMDQ0_ENABLE 0 458c2ecf20Sopenharmony_ci#define V_CMDQ0_ENABLE(x) ((x) << S_CMDQ0_ENABLE) 468c2ecf20Sopenharmony_ci#define F_CMDQ0_ENABLE V_CMDQ0_ENABLE(1U) 478c2ecf20Sopenharmony_ci 488c2ecf20Sopenharmony_ci#define S_CMDQ1_ENABLE 1 498c2ecf20Sopenharmony_ci#define V_CMDQ1_ENABLE(x) ((x) << S_CMDQ1_ENABLE) 508c2ecf20Sopenharmony_ci#define F_CMDQ1_ENABLE V_CMDQ1_ENABLE(1U) 518c2ecf20Sopenharmony_ci 528c2ecf20Sopenharmony_ci#define S_FL0_ENABLE 2 538c2ecf20Sopenharmony_ci#define V_FL0_ENABLE(x) ((x) << S_FL0_ENABLE) 548c2ecf20Sopenharmony_ci#define F_FL0_ENABLE V_FL0_ENABLE(1U) 558c2ecf20Sopenharmony_ci 568c2ecf20Sopenharmony_ci#define S_FL1_ENABLE 3 578c2ecf20Sopenharmony_ci#define V_FL1_ENABLE(x) ((x) << S_FL1_ENABLE) 588c2ecf20Sopenharmony_ci#define F_FL1_ENABLE V_FL1_ENABLE(1U) 598c2ecf20Sopenharmony_ci 608c2ecf20Sopenharmony_ci#define S_CPL_ENABLE 4 618c2ecf20Sopenharmony_ci#define V_CPL_ENABLE(x) ((x) << S_CPL_ENABLE) 628c2ecf20Sopenharmony_ci#define F_CPL_ENABLE V_CPL_ENABLE(1U) 638c2ecf20Sopenharmony_ci 648c2ecf20Sopenharmony_ci#define S_RESPONSE_QUEUE_ENABLE 5 658c2ecf20Sopenharmony_ci#define V_RESPONSE_QUEUE_ENABLE(x) ((x) << S_RESPONSE_QUEUE_ENABLE) 668c2ecf20Sopenharmony_ci#define F_RESPONSE_QUEUE_ENABLE V_RESPONSE_QUEUE_ENABLE(1U) 678c2ecf20Sopenharmony_ci 688c2ecf20Sopenharmony_ci#define S_CMDQ_PRIORITY 6 698c2ecf20Sopenharmony_ci#define M_CMDQ_PRIORITY 0x3 708c2ecf20Sopenharmony_ci#define V_CMDQ_PRIORITY(x) ((x) << S_CMDQ_PRIORITY) 718c2ecf20Sopenharmony_ci#define G_CMDQ_PRIORITY(x) (((x) >> S_CMDQ_PRIORITY) & M_CMDQ_PRIORITY) 728c2ecf20Sopenharmony_ci 738c2ecf20Sopenharmony_ci#define S_DISABLE_CMDQ0_GTS 8 748c2ecf20Sopenharmony_ci#define V_DISABLE_CMDQ0_GTS(x) ((x) << S_DISABLE_CMDQ0_GTS) 758c2ecf20Sopenharmony_ci#define F_DISABLE_CMDQ0_GTS V_DISABLE_CMDQ0_GTS(1U) 768c2ecf20Sopenharmony_ci 778c2ecf20Sopenharmony_ci#define S_DISABLE_CMDQ1_GTS 9 788c2ecf20Sopenharmony_ci#define V_DISABLE_CMDQ1_GTS(x) ((x) << S_DISABLE_CMDQ1_GTS) 798c2ecf20Sopenharmony_ci#define F_DISABLE_CMDQ1_GTS V_DISABLE_CMDQ1_GTS(1U) 808c2ecf20Sopenharmony_ci 818c2ecf20Sopenharmony_ci#define S_DISABLE_FL0_GTS 10 828c2ecf20Sopenharmony_ci#define V_DISABLE_FL0_GTS(x) ((x) << S_DISABLE_FL0_GTS) 838c2ecf20Sopenharmony_ci#define F_DISABLE_FL0_GTS V_DISABLE_FL0_GTS(1U) 848c2ecf20Sopenharmony_ci 858c2ecf20Sopenharmony_ci#define S_DISABLE_FL1_GTS 11 868c2ecf20Sopenharmony_ci#define V_DISABLE_FL1_GTS(x) ((x) << S_DISABLE_FL1_GTS) 878c2ecf20Sopenharmony_ci#define F_DISABLE_FL1_GTS V_DISABLE_FL1_GTS(1U) 888c2ecf20Sopenharmony_ci 898c2ecf20Sopenharmony_ci#define S_ENABLE_BIG_ENDIAN 12 908c2ecf20Sopenharmony_ci#define V_ENABLE_BIG_ENDIAN(x) ((x) << S_ENABLE_BIG_ENDIAN) 918c2ecf20Sopenharmony_ci#define F_ENABLE_BIG_ENDIAN V_ENABLE_BIG_ENDIAN(1U) 928c2ecf20Sopenharmony_ci 938c2ecf20Sopenharmony_ci#define S_FL_SELECTION_CRITERIA 13 948c2ecf20Sopenharmony_ci#define V_FL_SELECTION_CRITERIA(x) ((x) << S_FL_SELECTION_CRITERIA) 958c2ecf20Sopenharmony_ci#define F_FL_SELECTION_CRITERIA V_FL_SELECTION_CRITERIA(1U) 968c2ecf20Sopenharmony_ci 978c2ecf20Sopenharmony_ci#define S_ISCSI_COALESCE 14 988c2ecf20Sopenharmony_ci#define V_ISCSI_COALESCE(x) ((x) << S_ISCSI_COALESCE) 998c2ecf20Sopenharmony_ci#define F_ISCSI_COALESCE V_ISCSI_COALESCE(1U) 1008c2ecf20Sopenharmony_ci 1018c2ecf20Sopenharmony_ci#define S_RX_PKT_OFFSET 15 1028c2ecf20Sopenharmony_ci#define M_RX_PKT_OFFSET 0x7 1038c2ecf20Sopenharmony_ci#define V_RX_PKT_OFFSET(x) ((x) << S_RX_PKT_OFFSET) 1048c2ecf20Sopenharmony_ci#define G_RX_PKT_OFFSET(x) (((x) >> S_RX_PKT_OFFSET) & M_RX_PKT_OFFSET) 1058c2ecf20Sopenharmony_ci 1068c2ecf20Sopenharmony_ci#define S_VLAN_XTRACT 18 1078c2ecf20Sopenharmony_ci#define V_VLAN_XTRACT(x) ((x) << S_VLAN_XTRACT) 1088c2ecf20Sopenharmony_ci#define F_VLAN_XTRACT V_VLAN_XTRACT(1U) 1098c2ecf20Sopenharmony_ci 1108c2ecf20Sopenharmony_ci#define A_SG_DOORBELL 0x4 1118c2ecf20Sopenharmony_ci#define A_SG_CMD0BASELWR 0x8 1128c2ecf20Sopenharmony_ci#define A_SG_CMD0BASEUPR 0xc 1138c2ecf20Sopenharmony_ci#define A_SG_CMD1BASELWR 0x10 1148c2ecf20Sopenharmony_ci#define A_SG_CMD1BASEUPR 0x14 1158c2ecf20Sopenharmony_ci#define A_SG_FL0BASELWR 0x18 1168c2ecf20Sopenharmony_ci#define A_SG_FL0BASEUPR 0x1c 1178c2ecf20Sopenharmony_ci#define A_SG_FL1BASELWR 0x20 1188c2ecf20Sopenharmony_ci#define A_SG_FL1BASEUPR 0x24 1198c2ecf20Sopenharmony_ci#define A_SG_CMD0SIZE 0x28 1208c2ecf20Sopenharmony_ci 1218c2ecf20Sopenharmony_ci#define S_CMDQ0_SIZE 0 1228c2ecf20Sopenharmony_ci#define M_CMDQ0_SIZE 0x1ffff 1238c2ecf20Sopenharmony_ci#define V_CMDQ0_SIZE(x) ((x) << S_CMDQ0_SIZE) 1248c2ecf20Sopenharmony_ci#define G_CMDQ0_SIZE(x) (((x) >> S_CMDQ0_SIZE) & M_CMDQ0_SIZE) 1258c2ecf20Sopenharmony_ci 1268c2ecf20Sopenharmony_ci#define A_SG_FL0SIZE 0x2c 1278c2ecf20Sopenharmony_ci 1288c2ecf20Sopenharmony_ci#define S_FL0_SIZE 0 1298c2ecf20Sopenharmony_ci#define M_FL0_SIZE 0x1ffff 1308c2ecf20Sopenharmony_ci#define V_FL0_SIZE(x) ((x) << S_FL0_SIZE) 1318c2ecf20Sopenharmony_ci#define G_FL0_SIZE(x) (((x) >> S_FL0_SIZE) & M_FL0_SIZE) 1328c2ecf20Sopenharmony_ci 1338c2ecf20Sopenharmony_ci#define A_SG_RSPSIZE 0x30 1348c2ecf20Sopenharmony_ci 1358c2ecf20Sopenharmony_ci#define S_RESPQ_SIZE 0 1368c2ecf20Sopenharmony_ci#define M_RESPQ_SIZE 0x1ffff 1378c2ecf20Sopenharmony_ci#define V_RESPQ_SIZE(x) ((x) << S_RESPQ_SIZE) 1388c2ecf20Sopenharmony_ci#define G_RESPQ_SIZE(x) (((x) >> S_RESPQ_SIZE) & M_RESPQ_SIZE) 1398c2ecf20Sopenharmony_ci 1408c2ecf20Sopenharmony_ci#define A_SG_RSPBASELWR 0x34 1418c2ecf20Sopenharmony_ci#define A_SG_RSPBASEUPR 0x38 1428c2ecf20Sopenharmony_ci#define A_SG_FLTHRESHOLD 0x3c 1438c2ecf20Sopenharmony_ci 1448c2ecf20Sopenharmony_ci#define S_FL_THRESHOLD 0 1458c2ecf20Sopenharmony_ci#define M_FL_THRESHOLD 0xffff 1468c2ecf20Sopenharmony_ci#define V_FL_THRESHOLD(x) ((x) << S_FL_THRESHOLD) 1478c2ecf20Sopenharmony_ci#define G_FL_THRESHOLD(x) (((x) >> S_FL_THRESHOLD) & M_FL_THRESHOLD) 1488c2ecf20Sopenharmony_ci 1498c2ecf20Sopenharmony_ci#define A_SG_RSPQUEUECREDIT 0x40 1508c2ecf20Sopenharmony_ci 1518c2ecf20Sopenharmony_ci#define S_RESPQ_CREDIT 0 1528c2ecf20Sopenharmony_ci#define M_RESPQ_CREDIT 0x1ffff 1538c2ecf20Sopenharmony_ci#define V_RESPQ_CREDIT(x) ((x) << S_RESPQ_CREDIT) 1548c2ecf20Sopenharmony_ci#define G_RESPQ_CREDIT(x) (((x) >> S_RESPQ_CREDIT) & M_RESPQ_CREDIT) 1558c2ecf20Sopenharmony_ci 1568c2ecf20Sopenharmony_ci#define A_SG_SLEEPING 0x48 1578c2ecf20Sopenharmony_ci 1588c2ecf20Sopenharmony_ci#define S_SLEEPING 0 1598c2ecf20Sopenharmony_ci#define M_SLEEPING 0xffff 1608c2ecf20Sopenharmony_ci#define V_SLEEPING(x) ((x) << S_SLEEPING) 1618c2ecf20Sopenharmony_ci#define G_SLEEPING(x) (((x) >> S_SLEEPING) & M_SLEEPING) 1628c2ecf20Sopenharmony_ci 1638c2ecf20Sopenharmony_ci#define A_SG_INTRTIMER 0x4c 1648c2ecf20Sopenharmony_ci 1658c2ecf20Sopenharmony_ci#define S_INTERRUPT_TIMER_COUNT 0 1668c2ecf20Sopenharmony_ci#define M_INTERRUPT_TIMER_COUNT 0xffffff 1678c2ecf20Sopenharmony_ci#define V_INTERRUPT_TIMER_COUNT(x) ((x) << S_INTERRUPT_TIMER_COUNT) 1688c2ecf20Sopenharmony_ci#define G_INTERRUPT_TIMER_COUNT(x) (((x) >> S_INTERRUPT_TIMER_COUNT) & M_INTERRUPT_TIMER_COUNT) 1698c2ecf20Sopenharmony_ci 1708c2ecf20Sopenharmony_ci#define A_SG_CMD0PTR 0x50 1718c2ecf20Sopenharmony_ci 1728c2ecf20Sopenharmony_ci#define S_CMDQ0_POINTER 0 1738c2ecf20Sopenharmony_ci#define M_CMDQ0_POINTER 0xffff 1748c2ecf20Sopenharmony_ci#define V_CMDQ0_POINTER(x) ((x) << S_CMDQ0_POINTER) 1758c2ecf20Sopenharmony_ci#define G_CMDQ0_POINTER(x) (((x) >> S_CMDQ0_POINTER) & M_CMDQ0_POINTER) 1768c2ecf20Sopenharmony_ci 1778c2ecf20Sopenharmony_ci#define S_CURRENT_GENERATION_BIT 16 1788c2ecf20Sopenharmony_ci#define V_CURRENT_GENERATION_BIT(x) ((x) << S_CURRENT_GENERATION_BIT) 1798c2ecf20Sopenharmony_ci#define F_CURRENT_GENERATION_BIT V_CURRENT_GENERATION_BIT(1U) 1808c2ecf20Sopenharmony_ci 1818c2ecf20Sopenharmony_ci#define A_SG_CMD1PTR 0x54 1828c2ecf20Sopenharmony_ci 1838c2ecf20Sopenharmony_ci#define S_CMDQ1_POINTER 0 1848c2ecf20Sopenharmony_ci#define M_CMDQ1_POINTER 0xffff 1858c2ecf20Sopenharmony_ci#define V_CMDQ1_POINTER(x) ((x) << S_CMDQ1_POINTER) 1868c2ecf20Sopenharmony_ci#define G_CMDQ1_POINTER(x) (((x) >> S_CMDQ1_POINTER) & M_CMDQ1_POINTER) 1878c2ecf20Sopenharmony_ci 1888c2ecf20Sopenharmony_ci#define A_SG_FL0PTR 0x58 1898c2ecf20Sopenharmony_ci 1908c2ecf20Sopenharmony_ci#define S_FL0_POINTER 0 1918c2ecf20Sopenharmony_ci#define M_FL0_POINTER 0xffff 1928c2ecf20Sopenharmony_ci#define V_FL0_POINTER(x) ((x) << S_FL0_POINTER) 1938c2ecf20Sopenharmony_ci#define G_FL0_POINTER(x) (((x) >> S_FL0_POINTER) & M_FL0_POINTER) 1948c2ecf20Sopenharmony_ci 1958c2ecf20Sopenharmony_ci#define A_SG_FL1PTR 0x5c 1968c2ecf20Sopenharmony_ci 1978c2ecf20Sopenharmony_ci#define S_FL1_POINTER 0 1988c2ecf20Sopenharmony_ci#define M_FL1_POINTER 0xffff 1998c2ecf20Sopenharmony_ci#define V_FL1_POINTER(x) ((x) << S_FL1_POINTER) 2008c2ecf20Sopenharmony_ci#define G_FL1_POINTER(x) (((x) >> S_FL1_POINTER) & M_FL1_POINTER) 2018c2ecf20Sopenharmony_ci 2028c2ecf20Sopenharmony_ci#define A_SG_VERSION 0x6c 2038c2ecf20Sopenharmony_ci 2048c2ecf20Sopenharmony_ci#define S_DAY 0 2058c2ecf20Sopenharmony_ci#define M_DAY 0x1f 2068c2ecf20Sopenharmony_ci#define V_DAY(x) ((x) << S_DAY) 2078c2ecf20Sopenharmony_ci#define G_DAY(x) (((x) >> S_DAY) & M_DAY) 2088c2ecf20Sopenharmony_ci 2098c2ecf20Sopenharmony_ci#define S_MONTH 5 2108c2ecf20Sopenharmony_ci#define M_MONTH 0xf 2118c2ecf20Sopenharmony_ci#define V_MONTH(x) ((x) << S_MONTH) 2128c2ecf20Sopenharmony_ci#define G_MONTH(x) (((x) >> S_MONTH) & M_MONTH) 2138c2ecf20Sopenharmony_ci 2148c2ecf20Sopenharmony_ci#define A_SG_CMD1SIZE 0xb0 2158c2ecf20Sopenharmony_ci 2168c2ecf20Sopenharmony_ci#define S_CMDQ1_SIZE 0 2178c2ecf20Sopenharmony_ci#define M_CMDQ1_SIZE 0x1ffff 2188c2ecf20Sopenharmony_ci#define V_CMDQ1_SIZE(x) ((x) << S_CMDQ1_SIZE) 2198c2ecf20Sopenharmony_ci#define G_CMDQ1_SIZE(x) (((x) >> S_CMDQ1_SIZE) & M_CMDQ1_SIZE) 2208c2ecf20Sopenharmony_ci 2218c2ecf20Sopenharmony_ci#define A_SG_FL1SIZE 0xb4 2228c2ecf20Sopenharmony_ci 2238c2ecf20Sopenharmony_ci#define S_FL1_SIZE 0 2248c2ecf20Sopenharmony_ci#define M_FL1_SIZE 0x1ffff 2258c2ecf20Sopenharmony_ci#define V_FL1_SIZE(x) ((x) << S_FL1_SIZE) 2268c2ecf20Sopenharmony_ci#define G_FL1_SIZE(x) (((x) >> S_FL1_SIZE) & M_FL1_SIZE) 2278c2ecf20Sopenharmony_ci 2288c2ecf20Sopenharmony_ci#define A_SG_INT_ENABLE 0xb8 2298c2ecf20Sopenharmony_ci 2308c2ecf20Sopenharmony_ci#define S_RESPQ_EXHAUSTED 0 2318c2ecf20Sopenharmony_ci#define V_RESPQ_EXHAUSTED(x) ((x) << S_RESPQ_EXHAUSTED) 2328c2ecf20Sopenharmony_ci#define F_RESPQ_EXHAUSTED V_RESPQ_EXHAUSTED(1U) 2338c2ecf20Sopenharmony_ci 2348c2ecf20Sopenharmony_ci#define S_RESPQ_OVERFLOW 1 2358c2ecf20Sopenharmony_ci#define V_RESPQ_OVERFLOW(x) ((x) << S_RESPQ_OVERFLOW) 2368c2ecf20Sopenharmony_ci#define F_RESPQ_OVERFLOW V_RESPQ_OVERFLOW(1U) 2378c2ecf20Sopenharmony_ci 2388c2ecf20Sopenharmony_ci#define S_FL_EXHAUSTED 2 2398c2ecf20Sopenharmony_ci#define V_FL_EXHAUSTED(x) ((x) << S_FL_EXHAUSTED) 2408c2ecf20Sopenharmony_ci#define F_FL_EXHAUSTED V_FL_EXHAUSTED(1U) 2418c2ecf20Sopenharmony_ci 2428c2ecf20Sopenharmony_ci#define S_PACKET_TOO_BIG 3 2438c2ecf20Sopenharmony_ci#define V_PACKET_TOO_BIG(x) ((x) << S_PACKET_TOO_BIG) 2448c2ecf20Sopenharmony_ci#define F_PACKET_TOO_BIG V_PACKET_TOO_BIG(1U) 2458c2ecf20Sopenharmony_ci 2468c2ecf20Sopenharmony_ci#define S_PACKET_MISMATCH 4 2478c2ecf20Sopenharmony_ci#define V_PACKET_MISMATCH(x) ((x) << S_PACKET_MISMATCH) 2488c2ecf20Sopenharmony_ci#define F_PACKET_MISMATCH V_PACKET_MISMATCH(1U) 2498c2ecf20Sopenharmony_ci 2508c2ecf20Sopenharmony_ci#define A_SG_INT_CAUSE 0xbc 2518c2ecf20Sopenharmony_ci#define A_SG_RESPACCUTIMER 0xc0 2528c2ecf20Sopenharmony_ci 2538c2ecf20Sopenharmony_ci/* MC3 registers */ 2548c2ecf20Sopenharmony_ci#define A_MC3_CFG 0x100 2558c2ecf20Sopenharmony_ci 2568c2ecf20Sopenharmony_ci#define S_CLK_ENABLE 0 2578c2ecf20Sopenharmony_ci#define V_CLK_ENABLE(x) ((x) << S_CLK_ENABLE) 2588c2ecf20Sopenharmony_ci#define F_CLK_ENABLE V_CLK_ENABLE(1U) 2598c2ecf20Sopenharmony_ci 2608c2ecf20Sopenharmony_ci#define S_READY 1 2618c2ecf20Sopenharmony_ci#define V_READY(x) ((x) << S_READY) 2628c2ecf20Sopenharmony_ci#define F_READY V_READY(1U) 2638c2ecf20Sopenharmony_ci 2648c2ecf20Sopenharmony_ci#define S_READ_TO_WRITE_DELAY 2 2658c2ecf20Sopenharmony_ci#define M_READ_TO_WRITE_DELAY 0x7 2668c2ecf20Sopenharmony_ci#define V_READ_TO_WRITE_DELAY(x) ((x) << S_READ_TO_WRITE_DELAY) 2678c2ecf20Sopenharmony_ci#define G_READ_TO_WRITE_DELAY(x) (((x) >> S_READ_TO_WRITE_DELAY) & M_READ_TO_WRITE_DELAY) 2688c2ecf20Sopenharmony_ci 2698c2ecf20Sopenharmony_ci#define S_WRITE_TO_READ_DELAY 5 2708c2ecf20Sopenharmony_ci#define M_WRITE_TO_READ_DELAY 0x7 2718c2ecf20Sopenharmony_ci#define V_WRITE_TO_READ_DELAY(x) ((x) << S_WRITE_TO_READ_DELAY) 2728c2ecf20Sopenharmony_ci#define G_WRITE_TO_READ_DELAY(x) (((x) >> S_WRITE_TO_READ_DELAY) & M_WRITE_TO_READ_DELAY) 2738c2ecf20Sopenharmony_ci 2748c2ecf20Sopenharmony_ci#define S_MC3_BANK_CYCLE 8 2758c2ecf20Sopenharmony_ci#define M_MC3_BANK_CYCLE 0xf 2768c2ecf20Sopenharmony_ci#define V_MC3_BANK_CYCLE(x) ((x) << S_MC3_BANK_CYCLE) 2778c2ecf20Sopenharmony_ci#define G_MC3_BANK_CYCLE(x) (((x) >> S_MC3_BANK_CYCLE) & M_MC3_BANK_CYCLE) 2788c2ecf20Sopenharmony_ci 2798c2ecf20Sopenharmony_ci#define S_REFRESH_CYCLE 12 2808c2ecf20Sopenharmony_ci#define M_REFRESH_CYCLE 0xf 2818c2ecf20Sopenharmony_ci#define V_REFRESH_CYCLE(x) ((x) << S_REFRESH_CYCLE) 2828c2ecf20Sopenharmony_ci#define G_REFRESH_CYCLE(x) (((x) >> S_REFRESH_CYCLE) & M_REFRESH_CYCLE) 2838c2ecf20Sopenharmony_ci 2848c2ecf20Sopenharmony_ci#define S_PRECHARGE_CYCLE 16 2858c2ecf20Sopenharmony_ci#define M_PRECHARGE_CYCLE 0x3 2868c2ecf20Sopenharmony_ci#define V_PRECHARGE_CYCLE(x) ((x) << S_PRECHARGE_CYCLE) 2878c2ecf20Sopenharmony_ci#define G_PRECHARGE_CYCLE(x) (((x) >> S_PRECHARGE_CYCLE) & M_PRECHARGE_CYCLE) 2888c2ecf20Sopenharmony_ci 2898c2ecf20Sopenharmony_ci#define S_ACTIVE_TO_READ_WRITE_DELAY 18 2908c2ecf20Sopenharmony_ci#define V_ACTIVE_TO_READ_WRITE_DELAY(x) ((x) << S_ACTIVE_TO_READ_WRITE_DELAY) 2918c2ecf20Sopenharmony_ci#define F_ACTIVE_TO_READ_WRITE_DELAY V_ACTIVE_TO_READ_WRITE_DELAY(1U) 2928c2ecf20Sopenharmony_ci 2938c2ecf20Sopenharmony_ci#define S_ACTIVE_TO_PRECHARGE_DELAY 19 2948c2ecf20Sopenharmony_ci#define M_ACTIVE_TO_PRECHARGE_DELAY 0x7 2958c2ecf20Sopenharmony_ci#define V_ACTIVE_TO_PRECHARGE_DELAY(x) ((x) << S_ACTIVE_TO_PRECHARGE_DELAY) 2968c2ecf20Sopenharmony_ci#define G_ACTIVE_TO_PRECHARGE_DELAY(x) (((x) >> S_ACTIVE_TO_PRECHARGE_DELAY) & M_ACTIVE_TO_PRECHARGE_DELAY) 2978c2ecf20Sopenharmony_ci 2988c2ecf20Sopenharmony_ci#define S_WRITE_RECOVERY_DELAY 22 2998c2ecf20Sopenharmony_ci#define M_WRITE_RECOVERY_DELAY 0x3 3008c2ecf20Sopenharmony_ci#define V_WRITE_RECOVERY_DELAY(x) ((x) << S_WRITE_RECOVERY_DELAY) 3018c2ecf20Sopenharmony_ci#define G_WRITE_RECOVERY_DELAY(x) (((x) >> S_WRITE_RECOVERY_DELAY) & M_WRITE_RECOVERY_DELAY) 3028c2ecf20Sopenharmony_ci 3038c2ecf20Sopenharmony_ci#define S_DENSITY 24 3048c2ecf20Sopenharmony_ci#define M_DENSITY 0x3 3058c2ecf20Sopenharmony_ci#define V_DENSITY(x) ((x) << S_DENSITY) 3068c2ecf20Sopenharmony_ci#define G_DENSITY(x) (((x) >> S_DENSITY) & M_DENSITY) 3078c2ecf20Sopenharmony_ci 3088c2ecf20Sopenharmony_ci#define S_ORGANIZATION 26 3098c2ecf20Sopenharmony_ci#define V_ORGANIZATION(x) ((x) << S_ORGANIZATION) 3108c2ecf20Sopenharmony_ci#define F_ORGANIZATION V_ORGANIZATION(1U) 3118c2ecf20Sopenharmony_ci 3128c2ecf20Sopenharmony_ci#define S_BANKS 27 3138c2ecf20Sopenharmony_ci#define V_BANKS(x) ((x) << S_BANKS) 3148c2ecf20Sopenharmony_ci#define F_BANKS V_BANKS(1U) 3158c2ecf20Sopenharmony_ci 3168c2ecf20Sopenharmony_ci#define S_UNREGISTERED 28 3178c2ecf20Sopenharmony_ci#define V_UNREGISTERED(x) ((x) << S_UNREGISTERED) 3188c2ecf20Sopenharmony_ci#define F_UNREGISTERED V_UNREGISTERED(1U) 3198c2ecf20Sopenharmony_ci 3208c2ecf20Sopenharmony_ci#define S_MC3_WIDTH 29 3218c2ecf20Sopenharmony_ci#define M_MC3_WIDTH 0x3 3228c2ecf20Sopenharmony_ci#define V_MC3_WIDTH(x) ((x) << S_MC3_WIDTH) 3238c2ecf20Sopenharmony_ci#define G_MC3_WIDTH(x) (((x) >> S_MC3_WIDTH) & M_MC3_WIDTH) 3248c2ecf20Sopenharmony_ci 3258c2ecf20Sopenharmony_ci#define S_MC3_SLOW 31 3268c2ecf20Sopenharmony_ci#define V_MC3_SLOW(x) ((x) << S_MC3_SLOW) 3278c2ecf20Sopenharmony_ci#define F_MC3_SLOW V_MC3_SLOW(1U) 3288c2ecf20Sopenharmony_ci 3298c2ecf20Sopenharmony_ci#define A_MC3_MODE 0x104 3308c2ecf20Sopenharmony_ci 3318c2ecf20Sopenharmony_ci#define S_MC3_MODE 0 3328c2ecf20Sopenharmony_ci#define M_MC3_MODE 0x3fff 3338c2ecf20Sopenharmony_ci#define V_MC3_MODE(x) ((x) << S_MC3_MODE) 3348c2ecf20Sopenharmony_ci#define G_MC3_MODE(x) (((x) >> S_MC3_MODE) & M_MC3_MODE) 3358c2ecf20Sopenharmony_ci 3368c2ecf20Sopenharmony_ci#define S_BUSY 31 3378c2ecf20Sopenharmony_ci#define V_BUSY(x) ((x) << S_BUSY) 3388c2ecf20Sopenharmony_ci#define F_BUSY V_BUSY(1U) 3398c2ecf20Sopenharmony_ci 3408c2ecf20Sopenharmony_ci#define A_MC3_EXT_MODE 0x108 3418c2ecf20Sopenharmony_ci 3428c2ecf20Sopenharmony_ci#define S_MC3_EXTENDED_MODE 0 3438c2ecf20Sopenharmony_ci#define M_MC3_EXTENDED_MODE 0x3fff 3448c2ecf20Sopenharmony_ci#define V_MC3_EXTENDED_MODE(x) ((x) << S_MC3_EXTENDED_MODE) 3458c2ecf20Sopenharmony_ci#define G_MC3_EXTENDED_MODE(x) (((x) >> S_MC3_EXTENDED_MODE) & M_MC3_EXTENDED_MODE) 3468c2ecf20Sopenharmony_ci 3478c2ecf20Sopenharmony_ci#define A_MC3_PRECHARG 0x10c 3488c2ecf20Sopenharmony_ci#define A_MC3_REFRESH 0x110 3498c2ecf20Sopenharmony_ci 3508c2ecf20Sopenharmony_ci#define S_REFRESH_ENABLE 0 3518c2ecf20Sopenharmony_ci#define V_REFRESH_ENABLE(x) ((x) << S_REFRESH_ENABLE) 3528c2ecf20Sopenharmony_ci#define F_REFRESH_ENABLE V_REFRESH_ENABLE(1U) 3538c2ecf20Sopenharmony_ci 3548c2ecf20Sopenharmony_ci#define S_REFRESH_DIVISOR 1 3558c2ecf20Sopenharmony_ci#define M_REFRESH_DIVISOR 0x3fff 3568c2ecf20Sopenharmony_ci#define V_REFRESH_DIVISOR(x) ((x) << S_REFRESH_DIVISOR) 3578c2ecf20Sopenharmony_ci#define G_REFRESH_DIVISOR(x) (((x) >> S_REFRESH_DIVISOR) & M_REFRESH_DIVISOR) 3588c2ecf20Sopenharmony_ci 3598c2ecf20Sopenharmony_ci#define A_MC3_STROBE 0x114 3608c2ecf20Sopenharmony_ci 3618c2ecf20Sopenharmony_ci#define S_MASTER_DLL_RESET 0 3628c2ecf20Sopenharmony_ci#define V_MASTER_DLL_RESET(x) ((x) << S_MASTER_DLL_RESET) 3638c2ecf20Sopenharmony_ci#define F_MASTER_DLL_RESET V_MASTER_DLL_RESET(1U) 3648c2ecf20Sopenharmony_ci 3658c2ecf20Sopenharmony_ci#define S_MASTER_DLL_TAP_COUNT 1 3668c2ecf20Sopenharmony_ci#define M_MASTER_DLL_TAP_COUNT 0xff 3678c2ecf20Sopenharmony_ci#define V_MASTER_DLL_TAP_COUNT(x) ((x) << S_MASTER_DLL_TAP_COUNT) 3688c2ecf20Sopenharmony_ci#define G_MASTER_DLL_TAP_COUNT(x) (((x) >> S_MASTER_DLL_TAP_COUNT) & M_MASTER_DLL_TAP_COUNT) 3698c2ecf20Sopenharmony_ci 3708c2ecf20Sopenharmony_ci#define S_MASTER_DLL_LOCKED 9 3718c2ecf20Sopenharmony_ci#define V_MASTER_DLL_LOCKED(x) ((x) << S_MASTER_DLL_LOCKED) 3728c2ecf20Sopenharmony_ci#define F_MASTER_DLL_LOCKED V_MASTER_DLL_LOCKED(1U) 3738c2ecf20Sopenharmony_ci 3748c2ecf20Sopenharmony_ci#define S_MASTER_DLL_MAX_TAP_COUNT 10 3758c2ecf20Sopenharmony_ci#define V_MASTER_DLL_MAX_TAP_COUNT(x) ((x) << S_MASTER_DLL_MAX_TAP_COUNT) 3768c2ecf20Sopenharmony_ci#define F_MASTER_DLL_MAX_TAP_COUNT V_MASTER_DLL_MAX_TAP_COUNT(1U) 3778c2ecf20Sopenharmony_ci 3788c2ecf20Sopenharmony_ci#define S_MASTER_DLL_TAP_COUNT_OFFSET 11 3798c2ecf20Sopenharmony_ci#define M_MASTER_DLL_TAP_COUNT_OFFSET 0x3f 3808c2ecf20Sopenharmony_ci#define V_MASTER_DLL_TAP_COUNT_OFFSET(x) ((x) << S_MASTER_DLL_TAP_COUNT_OFFSET) 3818c2ecf20Sopenharmony_ci#define G_MASTER_DLL_TAP_COUNT_OFFSET(x) (((x) >> S_MASTER_DLL_TAP_COUNT_OFFSET) & M_MASTER_DLL_TAP_COUNT_OFFSET) 3828c2ecf20Sopenharmony_ci 3838c2ecf20Sopenharmony_ci#define S_SLAVE_DLL_RESET 11 3848c2ecf20Sopenharmony_ci#define V_SLAVE_DLL_RESET(x) ((x) << S_SLAVE_DLL_RESET) 3858c2ecf20Sopenharmony_ci#define F_SLAVE_DLL_RESET V_SLAVE_DLL_RESET(1U) 3868c2ecf20Sopenharmony_ci 3878c2ecf20Sopenharmony_ci#define S_SLAVE_DLL_DELTA 12 3888c2ecf20Sopenharmony_ci#define M_SLAVE_DLL_DELTA 0xf 3898c2ecf20Sopenharmony_ci#define V_SLAVE_DLL_DELTA(x) ((x) << S_SLAVE_DLL_DELTA) 3908c2ecf20Sopenharmony_ci#define G_SLAVE_DLL_DELTA(x) (((x) >> S_SLAVE_DLL_DELTA) & M_SLAVE_DLL_DELTA) 3918c2ecf20Sopenharmony_ci 3928c2ecf20Sopenharmony_ci#define S_SLAVE_DELAY_LINE_MANUAL_TAP_COUNT 17 3938c2ecf20Sopenharmony_ci#define M_SLAVE_DELAY_LINE_MANUAL_TAP_COUNT 0x3f 3948c2ecf20Sopenharmony_ci#define V_SLAVE_DELAY_LINE_MANUAL_TAP_COUNT(x) ((x) << S_SLAVE_DELAY_LINE_MANUAL_TAP_COUNT) 3958c2ecf20Sopenharmony_ci#define G_SLAVE_DELAY_LINE_MANUAL_TAP_COUNT(x) (((x) >> S_SLAVE_DELAY_LINE_MANUAL_TAP_COUNT) & M_SLAVE_DELAY_LINE_MANUAL_TAP_COUNT) 3968c2ecf20Sopenharmony_ci 3978c2ecf20Sopenharmony_ci#define S_SLAVE_DELAY_LINE_MANUAL_TAP_COUNT_ENABLE 23 3988c2ecf20Sopenharmony_ci#define V_SLAVE_DELAY_LINE_MANUAL_TAP_COUNT_ENABLE(x) ((x) << S_SLAVE_DELAY_LINE_MANUAL_TAP_COUNT_ENABLE) 3998c2ecf20Sopenharmony_ci#define F_SLAVE_DELAY_LINE_MANUAL_TAP_COUNT_ENABLE V_SLAVE_DELAY_LINE_MANUAL_TAP_COUNT_ENABLE(1U) 4008c2ecf20Sopenharmony_ci 4018c2ecf20Sopenharmony_ci#define S_SLAVE_DELAY_LINE_TAP_COUNT 24 4028c2ecf20Sopenharmony_ci#define M_SLAVE_DELAY_LINE_TAP_COUNT 0x3f 4038c2ecf20Sopenharmony_ci#define V_SLAVE_DELAY_LINE_TAP_COUNT(x) ((x) << S_SLAVE_DELAY_LINE_TAP_COUNT) 4048c2ecf20Sopenharmony_ci#define G_SLAVE_DELAY_LINE_TAP_COUNT(x) (((x) >> S_SLAVE_DELAY_LINE_TAP_COUNT) & M_SLAVE_DELAY_LINE_TAP_COUNT) 4058c2ecf20Sopenharmony_ci 4068c2ecf20Sopenharmony_ci#define A_MC3_ECC_CNTL 0x118 4078c2ecf20Sopenharmony_ci 4088c2ecf20Sopenharmony_ci#define S_ECC_GENERATION_ENABLE 0 4098c2ecf20Sopenharmony_ci#define V_ECC_GENERATION_ENABLE(x) ((x) << S_ECC_GENERATION_ENABLE) 4108c2ecf20Sopenharmony_ci#define F_ECC_GENERATION_ENABLE V_ECC_GENERATION_ENABLE(1U) 4118c2ecf20Sopenharmony_ci 4128c2ecf20Sopenharmony_ci#define S_ECC_CHECK_ENABLE 1 4138c2ecf20Sopenharmony_ci#define V_ECC_CHECK_ENABLE(x) ((x) << S_ECC_CHECK_ENABLE) 4148c2ecf20Sopenharmony_ci#define F_ECC_CHECK_ENABLE V_ECC_CHECK_ENABLE(1U) 4158c2ecf20Sopenharmony_ci 4168c2ecf20Sopenharmony_ci#define S_CORRECTABLE_ERROR_COUNT 2 4178c2ecf20Sopenharmony_ci#define M_CORRECTABLE_ERROR_COUNT 0xff 4188c2ecf20Sopenharmony_ci#define V_CORRECTABLE_ERROR_COUNT(x) ((x) << S_CORRECTABLE_ERROR_COUNT) 4198c2ecf20Sopenharmony_ci#define G_CORRECTABLE_ERROR_COUNT(x) (((x) >> S_CORRECTABLE_ERROR_COUNT) & M_CORRECTABLE_ERROR_COUNT) 4208c2ecf20Sopenharmony_ci 4218c2ecf20Sopenharmony_ci#define S_UNCORRECTABLE_ERROR_COUNT 10 4228c2ecf20Sopenharmony_ci#define M_UNCORRECTABLE_ERROR_COUNT 0xff 4238c2ecf20Sopenharmony_ci#define V_UNCORRECTABLE_ERROR_COUNT(x) ((x) << S_UNCORRECTABLE_ERROR_COUNT) 4248c2ecf20Sopenharmony_ci#define G_UNCORRECTABLE_ERROR_COUNT(x) (((x) >> S_UNCORRECTABLE_ERROR_COUNT) & M_UNCORRECTABLE_ERROR_COUNT) 4258c2ecf20Sopenharmony_ci 4268c2ecf20Sopenharmony_ci#define A_MC3_CE_ADDR 0x11c 4278c2ecf20Sopenharmony_ci 4288c2ecf20Sopenharmony_ci#define S_MC3_CE_ADDR 4 4298c2ecf20Sopenharmony_ci#define M_MC3_CE_ADDR 0xfffffff 4308c2ecf20Sopenharmony_ci#define V_MC3_CE_ADDR(x) ((x) << S_MC3_CE_ADDR) 4318c2ecf20Sopenharmony_ci#define G_MC3_CE_ADDR(x) (((x) >> S_MC3_CE_ADDR) & M_MC3_CE_ADDR) 4328c2ecf20Sopenharmony_ci 4338c2ecf20Sopenharmony_ci#define A_MC3_CE_DATA0 0x120 4348c2ecf20Sopenharmony_ci#define A_MC3_CE_DATA1 0x124 4358c2ecf20Sopenharmony_ci#define A_MC3_CE_DATA2 0x128 4368c2ecf20Sopenharmony_ci#define A_MC3_CE_DATA3 0x12c 4378c2ecf20Sopenharmony_ci#define A_MC3_CE_DATA4 0x130 4388c2ecf20Sopenharmony_ci#define A_MC3_UE_ADDR 0x134 4398c2ecf20Sopenharmony_ci 4408c2ecf20Sopenharmony_ci#define S_MC3_UE_ADDR 4 4418c2ecf20Sopenharmony_ci#define M_MC3_UE_ADDR 0xfffffff 4428c2ecf20Sopenharmony_ci#define V_MC3_UE_ADDR(x) ((x) << S_MC3_UE_ADDR) 4438c2ecf20Sopenharmony_ci#define G_MC3_UE_ADDR(x) (((x) >> S_MC3_UE_ADDR) & M_MC3_UE_ADDR) 4448c2ecf20Sopenharmony_ci 4458c2ecf20Sopenharmony_ci#define A_MC3_UE_DATA0 0x138 4468c2ecf20Sopenharmony_ci#define A_MC3_UE_DATA1 0x13c 4478c2ecf20Sopenharmony_ci#define A_MC3_UE_DATA2 0x140 4488c2ecf20Sopenharmony_ci#define A_MC3_UE_DATA3 0x144 4498c2ecf20Sopenharmony_ci#define A_MC3_UE_DATA4 0x148 4508c2ecf20Sopenharmony_ci#define A_MC3_BD_ADDR 0x14c 4518c2ecf20Sopenharmony_ci#define A_MC3_BD_DATA0 0x150 4528c2ecf20Sopenharmony_ci#define A_MC3_BD_DATA1 0x154 4538c2ecf20Sopenharmony_ci#define A_MC3_BD_DATA2 0x158 4548c2ecf20Sopenharmony_ci#define A_MC3_BD_DATA3 0x15c 4558c2ecf20Sopenharmony_ci#define A_MC3_BD_DATA4 0x160 4568c2ecf20Sopenharmony_ci#define A_MC3_BD_OP 0x164 4578c2ecf20Sopenharmony_ci 4588c2ecf20Sopenharmony_ci#define S_BACK_DOOR_OPERATION 0 4598c2ecf20Sopenharmony_ci#define V_BACK_DOOR_OPERATION(x) ((x) << S_BACK_DOOR_OPERATION) 4608c2ecf20Sopenharmony_ci#define F_BACK_DOOR_OPERATION V_BACK_DOOR_OPERATION(1U) 4618c2ecf20Sopenharmony_ci 4628c2ecf20Sopenharmony_ci#define A_MC3_BIST_ADDR_BEG 0x168 4638c2ecf20Sopenharmony_ci#define A_MC3_BIST_ADDR_END 0x16c 4648c2ecf20Sopenharmony_ci#define A_MC3_BIST_DATA 0x170 4658c2ecf20Sopenharmony_ci#define A_MC3_BIST_OP 0x174 4668c2ecf20Sopenharmony_ci 4678c2ecf20Sopenharmony_ci#define S_OP 0 4688c2ecf20Sopenharmony_ci#define V_OP(x) ((x) << S_OP) 4698c2ecf20Sopenharmony_ci#define F_OP V_OP(1U) 4708c2ecf20Sopenharmony_ci 4718c2ecf20Sopenharmony_ci#define S_DATA_PATTERN 1 4728c2ecf20Sopenharmony_ci#define M_DATA_PATTERN 0x3 4738c2ecf20Sopenharmony_ci#define V_DATA_PATTERN(x) ((x) << S_DATA_PATTERN) 4748c2ecf20Sopenharmony_ci#define G_DATA_PATTERN(x) (((x) >> S_DATA_PATTERN) & M_DATA_PATTERN) 4758c2ecf20Sopenharmony_ci 4768c2ecf20Sopenharmony_ci#define S_CONTINUOUS 3 4778c2ecf20Sopenharmony_ci#define V_CONTINUOUS(x) ((x) << S_CONTINUOUS) 4788c2ecf20Sopenharmony_ci#define F_CONTINUOUS V_CONTINUOUS(1U) 4798c2ecf20Sopenharmony_ci 4808c2ecf20Sopenharmony_ci#define A_MC3_INT_ENABLE 0x178 4818c2ecf20Sopenharmony_ci 4828c2ecf20Sopenharmony_ci#define S_MC3_CORR_ERR 0 4838c2ecf20Sopenharmony_ci#define V_MC3_CORR_ERR(x) ((x) << S_MC3_CORR_ERR) 4848c2ecf20Sopenharmony_ci#define F_MC3_CORR_ERR V_MC3_CORR_ERR(1U) 4858c2ecf20Sopenharmony_ci 4868c2ecf20Sopenharmony_ci#define S_MC3_UNCORR_ERR 1 4878c2ecf20Sopenharmony_ci#define V_MC3_UNCORR_ERR(x) ((x) << S_MC3_UNCORR_ERR) 4888c2ecf20Sopenharmony_ci#define F_MC3_UNCORR_ERR V_MC3_UNCORR_ERR(1U) 4898c2ecf20Sopenharmony_ci 4908c2ecf20Sopenharmony_ci#define S_MC3_PARITY_ERR 2 4918c2ecf20Sopenharmony_ci#define M_MC3_PARITY_ERR 0xff 4928c2ecf20Sopenharmony_ci#define V_MC3_PARITY_ERR(x) ((x) << S_MC3_PARITY_ERR) 4938c2ecf20Sopenharmony_ci#define G_MC3_PARITY_ERR(x) (((x) >> S_MC3_PARITY_ERR) & M_MC3_PARITY_ERR) 4948c2ecf20Sopenharmony_ci 4958c2ecf20Sopenharmony_ci#define S_MC3_ADDR_ERR 10 4968c2ecf20Sopenharmony_ci#define V_MC3_ADDR_ERR(x) ((x) << S_MC3_ADDR_ERR) 4978c2ecf20Sopenharmony_ci#define F_MC3_ADDR_ERR V_MC3_ADDR_ERR(1U) 4988c2ecf20Sopenharmony_ci 4998c2ecf20Sopenharmony_ci#define A_MC3_INT_CAUSE 0x17c 5008c2ecf20Sopenharmony_ci 5018c2ecf20Sopenharmony_ci/* MC4 registers */ 5028c2ecf20Sopenharmony_ci#define A_MC4_CFG 0x180 5038c2ecf20Sopenharmony_ci 5048c2ecf20Sopenharmony_ci#define S_POWER_UP 0 5058c2ecf20Sopenharmony_ci#define V_POWER_UP(x) ((x) << S_POWER_UP) 5068c2ecf20Sopenharmony_ci#define F_POWER_UP V_POWER_UP(1U) 5078c2ecf20Sopenharmony_ci 5088c2ecf20Sopenharmony_ci#define S_MC4_BANK_CYCLE 8 5098c2ecf20Sopenharmony_ci#define M_MC4_BANK_CYCLE 0x7 5108c2ecf20Sopenharmony_ci#define V_MC4_BANK_CYCLE(x) ((x) << S_MC4_BANK_CYCLE) 5118c2ecf20Sopenharmony_ci#define G_MC4_BANK_CYCLE(x) (((x) >> S_MC4_BANK_CYCLE) & M_MC4_BANK_CYCLE) 5128c2ecf20Sopenharmony_ci 5138c2ecf20Sopenharmony_ci#define S_MC4_NARROW 24 5148c2ecf20Sopenharmony_ci#define V_MC4_NARROW(x) ((x) << S_MC4_NARROW) 5158c2ecf20Sopenharmony_ci#define F_MC4_NARROW V_MC4_NARROW(1U) 5168c2ecf20Sopenharmony_ci 5178c2ecf20Sopenharmony_ci#define S_MC4_SLOW 25 5188c2ecf20Sopenharmony_ci#define V_MC4_SLOW(x) ((x) << S_MC4_SLOW) 5198c2ecf20Sopenharmony_ci#define F_MC4_SLOW V_MC4_SLOW(1U) 5208c2ecf20Sopenharmony_ci 5218c2ecf20Sopenharmony_ci#define S_MC4A_WIDTH 24 5228c2ecf20Sopenharmony_ci#define M_MC4A_WIDTH 0x3 5238c2ecf20Sopenharmony_ci#define V_MC4A_WIDTH(x) ((x) << S_MC4A_WIDTH) 5248c2ecf20Sopenharmony_ci#define G_MC4A_WIDTH(x) (((x) >> S_MC4A_WIDTH) & M_MC4A_WIDTH) 5258c2ecf20Sopenharmony_ci 5268c2ecf20Sopenharmony_ci#define S_MC4A_SLOW 26 5278c2ecf20Sopenharmony_ci#define V_MC4A_SLOW(x) ((x) << S_MC4A_SLOW) 5288c2ecf20Sopenharmony_ci#define F_MC4A_SLOW V_MC4A_SLOW(1U) 5298c2ecf20Sopenharmony_ci 5308c2ecf20Sopenharmony_ci#define A_MC4_MODE 0x184 5318c2ecf20Sopenharmony_ci 5328c2ecf20Sopenharmony_ci#define S_MC4_MODE 0 5338c2ecf20Sopenharmony_ci#define M_MC4_MODE 0x7fff 5348c2ecf20Sopenharmony_ci#define V_MC4_MODE(x) ((x) << S_MC4_MODE) 5358c2ecf20Sopenharmony_ci#define G_MC4_MODE(x) (((x) >> S_MC4_MODE) & M_MC4_MODE) 5368c2ecf20Sopenharmony_ci 5378c2ecf20Sopenharmony_ci#define A_MC4_EXT_MODE 0x188 5388c2ecf20Sopenharmony_ci 5398c2ecf20Sopenharmony_ci#define S_MC4_EXTENDED_MODE 0 5408c2ecf20Sopenharmony_ci#define M_MC4_EXTENDED_MODE 0x7fff 5418c2ecf20Sopenharmony_ci#define V_MC4_EXTENDED_MODE(x) ((x) << S_MC4_EXTENDED_MODE) 5428c2ecf20Sopenharmony_ci#define G_MC4_EXTENDED_MODE(x) (((x) >> S_MC4_EXTENDED_MODE) & M_MC4_EXTENDED_MODE) 5438c2ecf20Sopenharmony_ci 5448c2ecf20Sopenharmony_ci#define A_MC4_REFRESH 0x190 5458c2ecf20Sopenharmony_ci#define A_MC4_STROBE 0x194 5468c2ecf20Sopenharmony_ci#define A_MC4_ECC_CNTL 0x198 5478c2ecf20Sopenharmony_ci#define A_MC4_CE_ADDR 0x19c 5488c2ecf20Sopenharmony_ci 5498c2ecf20Sopenharmony_ci#define S_MC4_CE_ADDR 4 5508c2ecf20Sopenharmony_ci#define M_MC4_CE_ADDR 0xffffff 5518c2ecf20Sopenharmony_ci#define V_MC4_CE_ADDR(x) ((x) << S_MC4_CE_ADDR) 5528c2ecf20Sopenharmony_ci#define G_MC4_CE_ADDR(x) (((x) >> S_MC4_CE_ADDR) & M_MC4_CE_ADDR) 5538c2ecf20Sopenharmony_ci 5548c2ecf20Sopenharmony_ci#define A_MC4_CE_DATA0 0x1a0 5558c2ecf20Sopenharmony_ci#define A_MC4_CE_DATA1 0x1a4 5568c2ecf20Sopenharmony_ci#define A_MC4_CE_DATA2 0x1a8 5578c2ecf20Sopenharmony_ci#define A_MC4_CE_DATA3 0x1ac 5588c2ecf20Sopenharmony_ci#define A_MC4_CE_DATA4 0x1b0 5598c2ecf20Sopenharmony_ci#define A_MC4_UE_ADDR 0x1b4 5608c2ecf20Sopenharmony_ci 5618c2ecf20Sopenharmony_ci#define S_MC4_UE_ADDR 4 5628c2ecf20Sopenharmony_ci#define M_MC4_UE_ADDR 0xffffff 5638c2ecf20Sopenharmony_ci#define V_MC4_UE_ADDR(x) ((x) << S_MC4_UE_ADDR) 5648c2ecf20Sopenharmony_ci#define G_MC4_UE_ADDR(x) (((x) >> S_MC4_UE_ADDR) & M_MC4_UE_ADDR) 5658c2ecf20Sopenharmony_ci 5668c2ecf20Sopenharmony_ci#define A_MC4_UE_DATA0 0x1b8 5678c2ecf20Sopenharmony_ci#define A_MC4_UE_DATA1 0x1bc 5688c2ecf20Sopenharmony_ci#define A_MC4_UE_DATA2 0x1c0 5698c2ecf20Sopenharmony_ci#define A_MC4_UE_DATA3 0x1c4 5708c2ecf20Sopenharmony_ci#define A_MC4_UE_DATA4 0x1c8 5718c2ecf20Sopenharmony_ci#define A_MC4_BD_ADDR 0x1cc 5728c2ecf20Sopenharmony_ci 5738c2ecf20Sopenharmony_ci#define S_MC4_BACK_DOOR_ADDR 0 5748c2ecf20Sopenharmony_ci#define M_MC4_BACK_DOOR_ADDR 0xfffffff 5758c2ecf20Sopenharmony_ci#define V_MC4_BACK_DOOR_ADDR(x) ((x) << S_MC4_BACK_DOOR_ADDR) 5768c2ecf20Sopenharmony_ci#define G_MC4_BACK_DOOR_ADDR(x) (((x) >> S_MC4_BACK_DOOR_ADDR) & M_MC4_BACK_DOOR_ADDR) 5778c2ecf20Sopenharmony_ci 5788c2ecf20Sopenharmony_ci#define A_MC4_BD_DATA0 0x1d0 5798c2ecf20Sopenharmony_ci#define A_MC4_BD_DATA1 0x1d4 5808c2ecf20Sopenharmony_ci#define A_MC4_BD_DATA2 0x1d8 5818c2ecf20Sopenharmony_ci#define A_MC4_BD_DATA3 0x1dc 5828c2ecf20Sopenharmony_ci#define A_MC4_BD_DATA4 0x1e0 5838c2ecf20Sopenharmony_ci#define A_MC4_BD_OP 0x1e4 5848c2ecf20Sopenharmony_ci 5858c2ecf20Sopenharmony_ci#define S_OPERATION 0 5868c2ecf20Sopenharmony_ci#define V_OPERATION(x) ((x) << S_OPERATION) 5878c2ecf20Sopenharmony_ci#define F_OPERATION V_OPERATION(1U) 5888c2ecf20Sopenharmony_ci 5898c2ecf20Sopenharmony_ci#define A_MC4_BIST_ADDR_BEG 0x1e8 5908c2ecf20Sopenharmony_ci#define A_MC4_BIST_ADDR_END 0x1ec 5918c2ecf20Sopenharmony_ci#define A_MC4_BIST_DATA 0x1f0 5928c2ecf20Sopenharmony_ci#define A_MC4_BIST_OP 0x1f4 5938c2ecf20Sopenharmony_ci#define A_MC4_INT_ENABLE 0x1f8 5948c2ecf20Sopenharmony_ci 5958c2ecf20Sopenharmony_ci#define S_MC4_CORR_ERR 0 5968c2ecf20Sopenharmony_ci#define V_MC4_CORR_ERR(x) ((x) << S_MC4_CORR_ERR) 5978c2ecf20Sopenharmony_ci#define F_MC4_CORR_ERR V_MC4_CORR_ERR(1U) 5988c2ecf20Sopenharmony_ci 5998c2ecf20Sopenharmony_ci#define S_MC4_UNCORR_ERR 1 6008c2ecf20Sopenharmony_ci#define V_MC4_UNCORR_ERR(x) ((x) << S_MC4_UNCORR_ERR) 6018c2ecf20Sopenharmony_ci#define F_MC4_UNCORR_ERR V_MC4_UNCORR_ERR(1U) 6028c2ecf20Sopenharmony_ci 6038c2ecf20Sopenharmony_ci#define S_MC4_ADDR_ERR 2 6048c2ecf20Sopenharmony_ci#define V_MC4_ADDR_ERR(x) ((x) << S_MC4_ADDR_ERR) 6058c2ecf20Sopenharmony_ci#define F_MC4_ADDR_ERR V_MC4_ADDR_ERR(1U) 6068c2ecf20Sopenharmony_ci 6078c2ecf20Sopenharmony_ci#define A_MC4_INT_CAUSE 0x1fc 6088c2ecf20Sopenharmony_ci 6098c2ecf20Sopenharmony_ci/* TPI registers */ 6108c2ecf20Sopenharmony_ci#define A_TPI_ADDR 0x280 6118c2ecf20Sopenharmony_ci 6128c2ecf20Sopenharmony_ci#define S_TPI_ADDRESS 0 6138c2ecf20Sopenharmony_ci#define M_TPI_ADDRESS 0xffffff 6148c2ecf20Sopenharmony_ci#define V_TPI_ADDRESS(x) ((x) << S_TPI_ADDRESS) 6158c2ecf20Sopenharmony_ci#define G_TPI_ADDRESS(x) (((x) >> S_TPI_ADDRESS) & M_TPI_ADDRESS) 6168c2ecf20Sopenharmony_ci 6178c2ecf20Sopenharmony_ci#define A_TPI_WR_DATA 0x284 6188c2ecf20Sopenharmony_ci#define A_TPI_RD_DATA 0x288 6198c2ecf20Sopenharmony_ci#define A_TPI_CSR 0x28c 6208c2ecf20Sopenharmony_ci 6218c2ecf20Sopenharmony_ci#define S_TPIWR 0 6228c2ecf20Sopenharmony_ci#define V_TPIWR(x) ((x) << S_TPIWR) 6238c2ecf20Sopenharmony_ci#define F_TPIWR V_TPIWR(1U) 6248c2ecf20Sopenharmony_ci 6258c2ecf20Sopenharmony_ci#define S_TPIRDY 1 6268c2ecf20Sopenharmony_ci#define V_TPIRDY(x) ((x) << S_TPIRDY) 6278c2ecf20Sopenharmony_ci#define F_TPIRDY V_TPIRDY(1U) 6288c2ecf20Sopenharmony_ci 6298c2ecf20Sopenharmony_ci#define S_INT_DIR 31 6308c2ecf20Sopenharmony_ci#define V_INT_DIR(x) ((x) << S_INT_DIR) 6318c2ecf20Sopenharmony_ci#define F_INT_DIR V_INT_DIR(1U) 6328c2ecf20Sopenharmony_ci 6338c2ecf20Sopenharmony_ci#define A_TPI_PAR 0x29c 6348c2ecf20Sopenharmony_ci 6358c2ecf20Sopenharmony_ci#define S_TPIPAR 0 6368c2ecf20Sopenharmony_ci#define M_TPIPAR 0x7f 6378c2ecf20Sopenharmony_ci#define V_TPIPAR(x) ((x) << S_TPIPAR) 6388c2ecf20Sopenharmony_ci#define G_TPIPAR(x) (((x) >> S_TPIPAR) & M_TPIPAR) 6398c2ecf20Sopenharmony_ci 6408c2ecf20Sopenharmony_ci 6418c2ecf20Sopenharmony_ci/* TP registers */ 6428c2ecf20Sopenharmony_ci#define A_TP_IN_CONFIG 0x300 6438c2ecf20Sopenharmony_ci 6448c2ecf20Sopenharmony_ci#define S_TP_IN_CSPI_TUNNEL 0 6458c2ecf20Sopenharmony_ci#define V_TP_IN_CSPI_TUNNEL(x) ((x) << S_TP_IN_CSPI_TUNNEL) 6468c2ecf20Sopenharmony_ci#define F_TP_IN_CSPI_TUNNEL V_TP_IN_CSPI_TUNNEL(1U) 6478c2ecf20Sopenharmony_ci 6488c2ecf20Sopenharmony_ci#define S_TP_IN_CSPI_ETHERNET 1 6498c2ecf20Sopenharmony_ci#define V_TP_IN_CSPI_ETHERNET(x) ((x) << S_TP_IN_CSPI_ETHERNET) 6508c2ecf20Sopenharmony_ci#define F_TP_IN_CSPI_ETHERNET V_TP_IN_CSPI_ETHERNET(1U) 6518c2ecf20Sopenharmony_ci 6528c2ecf20Sopenharmony_ci#define S_TP_IN_CSPI_CPL 3 6538c2ecf20Sopenharmony_ci#define V_TP_IN_CSPI_CPL(x) ((x) << S_TP_IN_CSPI_CPL) 6548c2ecf20Sopenharmony_ci#define F_TP_IN_CSPI_CPL V_TP_IN_CSPI_CPL(1U) 6558c2ecf20Sopenharmony_ci 6568c2ecf20Sopenharmony_ci#define S_TP_IN_CSPI_POS 4 6578c2ecf20Sopenharmony_ci#define V_TP_IN_CSPI_POS(x) ((x) << S_TP_IN_CSPI_POS) 6588c2ecf20Sopenharmony_ci#define F_TP_IN_CSPI_POS V_TP_IN_CSPI_POS(1U) 6598c2ecf20Sopenharmony_ci 6608c2ecf20Sopenharmony_ci#define S_TP_IN_CSPI_CHECK_IP_CSUM 5 6618c2ecf20Sopenharmony_ci#define V_TP_IN_CSPI_CHECK_IP_CSUM(x) ((x) << S_TP_IN_CSPI_CHECK_IP_CSUM) 6628c2ecf20Sopenharmony_ci#define F_TP_IN_CSPI_CHECK_IP_CSUM V_TP_IN_CSPI_CHECK_IP_CSUM(1U) 6638c2ecf20Sopenharmony_ci 6648c2ecf20Sopenharmony_ci#define S_TP_IN_CSPI_CHECK_TCP_CSUM 6 6658c2ecf20Sopenharmony_ci#define V_TP_IN_CSPI_CHECK_TCP_CSUM(x) ((x) << S_TP_IN_CSPI_CHECK_TCP_CSUM) 6668c2ecf20Sopenharmony_ci#define F_TP_IN_CSPI_CHECK_TCP_CSUM V_TP_IN_CSPI_CHECK_TCP_CSUM(1U) 6678c2ecf20Sopenharmony_ci 6688c2ecf20Sopenharmony_ci#define S_TP_IN_ESPI_TUNNEL 7 6698c2ecf20Sopenharmony_ci#define V_TP_IN_ESPI_TUNNEL(x) ((x) << S_TP_IN_ESPI_TUNNEL) 6708c2ecf20Sopenharmony_ci#define F_TP_IN_ESPI_TUNNEL V_TP_IN_ESPI_TUNNEL(1U) 6718c2ecf20Sopenharmony_ci 6728c2ecf20Sopenharmony_ci#define S_TP_IN_ESPI_ETHERNET 8 6738c2ecf20Sopenharmony_ci#define V_TP_IN_ESPI_ETHERNET(x) ((x) << S_TP_IN_ESPI_ETHERNET) 6748c2ecf20Sopenharmony_ci#define F_TP_IN_ESPI_ETHERNET V_TP_IN_ESPI_ETHERNET(1U) 6758c2ecf20Sopenharmony_ci 6768c2ecf20Sopenharmony_ci#define S_TP_IN_ESPI_CPL 10 6778c2ecf20Sopenharmony_ci#define V_TP_IN_ESPI_CPL(x) ((x) << S_TP_IN_ESPI_CPL) 6788c2ecf20Sopenharmony_ci#define F_TP_IN_ESPI_CPL V_TP_IN_ESPI_CPL(1U) 6798c2ecf20Sopenharmony_ci 6808c2ecf20Sopenharmony_ci#define S_TP_IN_ESPI_POS 11 6818c2ecf20Sopenharmony_ci#define V_TP_IN_ESPI_POS(x) ((x) << S_TP_IN_ESPI_POS) 6828c2ecf20Sopenharmony_ci#define F_TP_IN_ESPI_POS V_TP_IN_ESPI_POS(1U) 6838c2ecf20Sopenharmony_ci 6848c2ecf20Sopenharmony_ci#define S_TP_IN_ESPI_CHECK_IP_CSUM 12 6858c2ecf20Sopenharmony_ci#define V_TP_IN_ESPI_CHECK_IP_CSUM(x) ((x) << S_TP_IN_ESPI_CHECK_IP_CSUM) 6868c2ecf20Sopenharmony_ci#define F_TP_IN_ESPI_CHECK_IP_CSUM V_TP_IN_ESPI_CHECK_IP_CSUM(1U) 6878c2ecf20Sopenharmony_ci 6888c2ecf20Sopenharmony_ci#define S_TP_IN_ESPI_CHECK_TCP_CSUM 13 6898c2ecf20Sopenharmony_ci#define V_TP_IN_ESPI_CHECK_TCP_CSUM(x) ((x) << S_TP_IN_ESPI_CHECK_TCP_CSUM) 6908c2ecf20Sopenharmony_ci#define F_TP_IN_ESPI_CHECK_TCP_CSUM V_TP_IN_ESPI_CHECK_TCP_CSUM(1U) 6918c2ecf20Sopenharmony_ci 6928c2ecf20Sopenharmony_ci#define S_OFFLOAD_DISABLE 14 6938c2ecf20Sopenharmony_ci#define V_OFFLOAD_DISABLE(x) ((x) << S_OFFLOAD_DISABLE) 6948c2ecf20Sopenharmony_ci#define F_OFFLOAD_DISABLE V_OFFLOAD_DISABLE(1U) 6958c2ecf20Sopenharmony_ci 6968c2ecf20Sopenharmony_ci#define A_TP_OUT_CONFIG 0x304 6978c2ecf20Sopenharmony_ci 6988c2ecf20Sopenharmony_ci#define S_TP_OUT_C_ETH 0 6998c2ecf20Sopenharmony_ci#define V_TP_OUT_C_ETH(x) ((x) << S_TP_OUT_C_ETH) 7008c2ecf20Sopenharmony_ci#define F_TP_OUT_C_ETH V_TP_OUT_C_ETH(1U) 7018c2ecf20Sopenharmony_ci 7028c2ecf20Sopenharmony_ci#define S_TP_OUT_CSPI_CPL 2 7038c2ecf20Sopenharmony_ci#define V_TP_OUT_CSPI_CPL(x) ((x) << S_TP_OUT_CSPI_CPL) 7048c2ecf20Sopenharmony_ci#define F_TP_OUT_CSPI_CPL V_TP_OUT_CSPI_CPL(1U) 7058c2ecf20Sopenharmony_ci 7068c2ecf20Sopenharmony_ci#define S_TP_OUT_CSPI_POS 3 7078c2ecf20Sopenharmony_ci#define V_TP_OUT_CSPI_POS(x) ((x) << S_TP_OUT_CSPI_POS) 7088c2ecf20Sopenharmony_ci#define F_TP_OUT_CSPI_POS V_TP_OUT_CSPI_POS(1U) 7098c2ecf20Sopenharmony_ci 7108c2ecf20Sopenharmony_ci#define S_TP_OUT_CSPI_GENERATE_IP_CSUM 4 7118c2ecf20Sopenharmony_ci#define V_TP_OUT_CSPI_GENERATE_IP_CSUM(x) ((x) << S_TP_OUT_CSPI_GENERATE_IP_CSUM) 7128c2ecf20Sopenharmony_ci#define F_TP_OUT_CSPI_GENERATE_IP_CSUM V_TP_OUT_CSPI_GENERATE_IP_CSUM(1U) 7138c2ecf20Sopenharmony_ci 7148c2ecf20Sopenharmony_ci#define S_TP_OUT_CSPI_GENERATE_TCP_CSUM 5 7158c2ecf20Sopenharmony_ci#define V_TP_OUT_CSPI_GENERATE_TCP_CSUM(x) ((x) << S_TP_OUT_CSPI_GENERATE_TCP_CSUM) 7168c2ecf20Sopenharmony_ci#define F_TP_OUT_CSPI_GENERATE_TCP_CSUM V_TP_OUT_CSPI_GENERATE_TCP_CSUM(1U) 7178c2ecf20Sopenharmony_ci 7188c2ecf20Sopenharmony_ci#define S_TP_OUT_ESPI_ETHERNET 6 7198c2ecf20Sopenharmony_ci#define V_TP_OUT_ESPI_ETHERNET(x) ((x) << S_TP_OUT_ESPI_ETHERNET) 7208c2ecf20Sopenharmony_ci#define F_TP_OUT_ESPI_ETHERNET V_TP_OUT_ESPI_ETHERNET(1U) 7218c2ecf20Sopenharmony_ci 7228c2ecf20Sopenharmony_ci#define S_TP_OUT_ESPI_TAG_ETHERNET 7 7238c2ecf20Sopenharmony_ci#define V_TP_OUT_ESPI_TAG_ETHERNET(x) ((x) << S_TP_OUT_ESPI_TAG_ETHERNET) 7248c2ecf20Sopenharmony_ci#define F_TP_OUT_ESPI_TAG_ETHERNET V_TP_OUT_ESPI_TAG_ETHERNET(1U) 7258c2ecf20Sopenharmony_ci 7268c2ecf20Sopenharmony_ci#define S_TP_OUT_ESPI_CPL 8 7278c2ecf20Sopenharmony_ci#define V_TP_OUT_ESPI_CPL(x) ((x) << S_TP_OUT_ESPI_CPL) 7288c2ecf20Sopenharmony_ci#define F_TP_OUT_ESPI_CPL V_TP_OUT_ESPI_CPL(1U) 7298c2ecf20Sopenharmony_ci 7308c2ecf20Sopenharmony_ci#define S_TP_OUT_ESPI_POS 9 7318c2ecf20Sopenharmony_ci#define V_TP_OUT_ESPI_POS(x) ((x) << S_TP_OUT_ESPI_POS) 7328c2ecf20Sopenharmony_ci#define F_TP_OUT_ESPI_POS V_TP_OUT_ESPI_POS(1U) 7338c2ecf20Sopenharmony_ci 7348c2ecf20Sopenharmony_ci#define S_TP_OUT_ESPI_GENERATE_IP_CSUM 10 7358c2ecf20Sopenharmony_ci#define V_TP_OUT_ESPI_GENERATE_IP_CSUM(x) ((x) << S_TP_OUT_ESPI_GENERATE_IP_CSUM) 7368c2ecf20Sopenharmony_ci#define F_TP_OUT_ESPI_GENERATE_IP_CSUM V_TP_OUT_ESPI_GENERATE_IP_CSUM(1U) 7378c2ecf20Sopenharmony_ci 7388c2ecf20Sopenharmony_ci#define S_TP_OUT_ESPI_GENERATE_TCP_CSUM 11 7398c2ecf20Sopenharmony_ci#define V_TP_OUT_ESPI_GENERATE_TCP_CSUM(x) ((x) << S_TP_OUT_ESPI_GENERATE_TCP_CSUM) 7408c2ecf20Sopenharmony_ci#define F_TP_OUT_ESPI_GENERATE_TCP_CSUM V_TP_OUT_ESPI_GENERATE_TCP_CSUM(1U) 7418c2ecf20Sopenharmony_ci 7428c2ecf20Sopenharmony_ci#define A_TP_GLOBAL_CONFIG 0x308 7438c2ecf20Sopenharmony_ci 7448c2ecf20Sopenharmony_ci#define S_IP_TTL 0 7458c2ecf20Sopenharmony_ci#define M_IP_TTL 0xff 7468c2ecf20Sopenharmony_ci#define V_IP_TTL(x) ((x) << S_IP_TTL) 7478c2ecf20Sopenharmony_ci#define G_IP_TTL(x) (((x) >> S_IP_TTL) & M_IP_TTL) 7488c2ecf20Sopenharmony_ci 7498c2ecf20Sopenharmony_ci#define S_TCAM_SERVER_REGION_USAGE 8 7508c2ecf20Sopenharmony_ci#define M_TCAM_SERVER_REGION_USAGE 0x3 7518c2ecf20Sopenharmony_ci#define V_TCAM_SERVER_REGION_USAGE(x) ((x) << S_TCAM_SERVER_REGION_USAGE) 7528c2ecf20Sopenharmony_ci#define G_TCAM_SERVER_REGION_USAGE(x) (((x) >> S_TCAM_SERVER_REGION_USAGE) & M_TCAM_SERVER_REGION_USAGE) 7538c2ecf20Sopenharmony_ci 7548c2ecf20Sopenharmony_ci#define S_QOS_MAPPING 10 7558c2ecf20Sopenharmony_ci#define V_QOS_MAPPING(x) ((x) << S_QOS_MAPPING) 7568c2ecf20Sopenharmony_ci#define F_QOS_MAPPING V_QOS_MAPPING(1U) 7578c2ecf20Sopenharmony_ci 7588c2ecf20Sopenharmony_ci#define S_TCP_CSUM 11 7598c2ecf20Sopenharmony_ci#define V_TCP_CSUM(x) ((x) << S_TCP_CSUM) 7608c2ecf20Sopenharmony_ci#define F_TCP_CSUM V_TCP_CSUM(1U) 7618c2ecf20Sopenharmony_ci 7628c2ecf20Sopenharmony_ci#define S_UDP_CSUM 12 7638c2ecf20Sopenharmony_ci#define V_UDP_CSUM(x) ((x) << S_UDP_CSUM) 7648c2ecf20Sopenharmony_ci#define F_UDP_CSUM V_UDP_CSUM(1U) 7658c2ecf20Sopenharmony_ci 7668c2ecf20Sopenharmony_ci#define S_IP_CSUM 13 7678c2ecf20Sopenharmony_ci#define V_IP_CSUM(x) ((x) << S_IP_CSUM) 7688c2ecf20Sopenharmony_ci#define F_IP_CSUM V_IP_CSUM(1U) 7698c2ecf20Sopenharmony_ci 7708c2ecf20Sopenharmony_ci#define S_IP_ID_SPLIT 14 7718c2ecf20Sopenharmony_ci#define V_IP_ID_SPLIT(x) ((x) << S_IP_ID_SPLIT) 7728c2ecf20Sopenharmony_ci#define F_IP_ID_SPLIT V_IP_ID_SPLIT(1U) 7738c2ecf20Sopenharmony_ci 7748c2ecf20Sopenharmony_ci#define S_PATH_MTU 15 7758c2ecf20Sopenharmony_ci#define V_PATH_MTU(x) ((x) << S_PATH_MTU) 7768c2ecf20Sopenharmony_ci#define F_PATH_MTU V_PATH_MTU(1U) 7778c2ecf20Sopenharmony_ci 7788c2ecf20Sopenharmony_ci#define S_5TUPLE_LOOKUP 17 7798c2ecf20Sopenharmony_ci#define M_5TUPLE_LOOKUP 0x3 7808c2ecf20Sopenharmony_ci#define V_5TUPLE_LOOKUP(x) ((x) << S_5TUPLE_LOOKUP) 7818c2ecf20Sopenharmony_ci#define G_5TUPLE_LOOKUP(x) (((x) >> S_5TUPLE_LOOKUP) & M_5TUPLE_LOOKUP) 7828c2ecf20Sopenharmony_ci 7838c2ecf20Sopenharmony_ci#define S_IP_FRAGMENT_DROP 19 7848c2ecf20Sopenharmony_ci#define V_IP_FRAGMENT_DROP(x) ((x) << S_IP_FRAGMENT_DROP) 7858c2ecf20Sopenharmony_ci#define F_IP_FRAGMENT_DROP V_IP_FRAGMENT_DROP(1U) 7868c2ecf20Sopenharmony_ci 7878c2ecf20Sopenharmony_ci#define S_PING_DROP 20 7888c2ecf20Sopenharmony_ci#define V_PING_DROP(x) ((x) << S_PING_DROP) 7898c2ecf20Sopenharmony_ci#define F_PING_DROP V_PING_DROP(1U) 7908c2ecf20Sopenharmony_ci 7918c2ecf20Sopenharmony_ci#define S_PROTECT_MODE 21 7928c2ecf20Sopenharmony_ci#define V_PROTECT_MODE(x) ((x) << S_PROTECT_MODE) 7938c2ecf20Sopenharmony_ci#define F_PROTECT_MODE V_PROTECT_MODE(1U) 7948c2ecf20Sopenharmony_ci 7958c2ecf20Sopenharmony_ci#define S_SYN_COOKIE_ALGORITHM 22 7968c2ecf20Sopenharmony_ci#define V_SYN_COOKIE_ALGORITHM(x) ((x) << S_SYN_COOKIE_ALGORITHM) 7978c2ecf20Sopenharmony_ci#define F_SYN_COOKIE_ALGORITHM V_SYN_COOKIE_ALGORITHM(1U) 7988c2ecf20Sopenharmony_ci 7998c2ecf20Sopenharmony_ci#define S_ATTACK_FILTER 23 8008c2ecf20Sopenharmony_ci#define V_ATTACK_FILTER(x) ((x) << S_ATTACK_FILTER) 8018c2ecf20Sopenharmony_ci#define F_ATTACK_FILTER V_ATTACK_FILTER(1U) 8028c2ecf20Sopenharmony_ci 8038c2ecf20Sopenharmony_ci#define S_INTERFACE_TYPE 24 8048c2ecf20Sopenharmony_ci#define V_INTERFACE_TYPE(x) ((x) << S_INTERFACE_TYPE) 8058c2ecf20Sopenharmony_ci#define F_INTERFACE_TYPE V_INTERFACE_TYPE(1U) 8068c2ecf20Sopenharmony_ci 8078c2ecf20Sopenharmony_ci#define S_DISABLE_RX_FLOW_CONTROL 25 8088c2ecf20Sopenharmony_ci#define V_DISABLE_RX_FLOW_CONTROL(x) ((x) << S_DISABLE_RX_FLOW_CONTROL) 8098c2ecf20Sopenharmony_ci#define F_DISABLE_RX_FLOW_CONTROL V_DISABLE_RX_FLOW_CONTROL(1U) 8108c2ecf20Sopenharmony_ci 8118c2ecf20Sopenharmony_ci#define S_SYN_COOKIE_PARAMETER 26 8128c2ecf20Sopenharmony_ci#define M_SYN_COOKIE_PARAMETER 0x3f 8138c2ecf20Sopenharmony_ci#define V_SYN_COOKIE_PARAMETER(x) ((x) << S_SYN_COOKIE_PARAMETER) 8148c2ecf20Sopenharmony_ci#define G_SYN_COOKIE_PARAMETER(x) (((x) >> S_SYN_COOKIE_PARAMETER) & M_SYN_COOKIE_PARAMETER) 8158c2ecf20Sopenharmony_ci 8168c2ecf20Sopenharmony_ci#define A_TP_GLOBAL_RX_CREDITS 0x30c 8178c2ecf20Sopenharmony_ci#define A_TP_CM_SIZE 0x310 8188c2ecf20Sopenharmony_ci#define A_TP_CM_MM_BASE 0x314 8198c2ecf20Sopenharmony_ci 8208c2ecf20Sopenharmony_ci#define S_CM_MEMMGR_BASE 0 8218c2ecf20Sopenharmony_ci#define M_CM_MEMMGR_BASE 0xfffffff 8228c2ecf20Sopenharmony_ci#define V_CM_MEMMGR_BASE(x) ((x) << S_CM_MEMMGR_BASE) 8238c2ecf20Sopenharmony_ci#define G_CM_MEMMGR_BASE(x) (((x) >> S_CM_MEMMGR_BASE) & M_CM_MEMMGR_BASE) 8248c2ecf20Sopenharmony_ci 8258c2ecf20Sopenharmony_ci#define A_TP_CM_TIMER_BASE 0x318 8268c2ecf20Sopenharmony_ci 8278c2ecf20Sopenharmony_ci#define S_CM_TIMER_BASE 0 8288c2ecf20Sopenharmony_ci#define M_CM_TIMER_BASE 0xfffffff 8298c2ecf20Sopenharmony_ci#define V_CM_TIMER_BASE(x) ((x) << S_CM_TIMER_BASE) 8308c2ecf20Sopenharmony_ci#define G_CM_TIMER_BASE(x) (((x) >> S_CM_TIMER_BASE) & M_CM_TIMER_BASE) 8318c2ecf20Sopenharmony_ci 8328c2ecf20Sopenharmony_ci#define A_TP_PM_SIZE 0x31c 8338c2ecf20Sopenharmony_ci#define A_TP_PM_TX_BASE 0x320 8348c2ecf20Sopenharmony_ci#define A_TP_PM_DEFRAG_BASE 0x324 8358c2ecf20Sopenharmony_ci#define A_TP_PM_RX_BASE 0x328 8368c2ecf20Sopenharmony_ci#define A_TP_PM_RX_PG_SIZE 0x32c 8378c2ecf20Sopenharmony_ci#define A_TP_PM_RX_MAX_PGS 0x330 8388c2ecf20Sopenharmony_ci#define A_TP_PM_TX_PG_SIZE 0x334 8398c2ecf20Sopenharmony_ci#define A_TP_PM_TX_MAX_PGS 0x338 8408c2ecf20Sopenharmony_ci#define A_TP_TCP_OPTIONS 0x340 8418c2ecf20Sopenharmony_ci 8428c2ecf20Sopenharmony_ci#define S_TIMESTAMP 0 8438c2ecf20Sopenharmony_ci#define M_TIMESTAMP 0x3 8448c2ecf20Sopenharmony_ci#define V_TIMESTAMP(x) ((x) << S_TIMESTAMP) 8458c2ecf20Sopenharmony_ci#define G_TIMESTAMP(x) (((x) >> S_TIMESTAMP) & M_TIMESTAMP) 8468c2ecf20Sopenharmony_ci 8478c2ecf20Sopenharmony_ci#define S_WINDOW_SCALE 2 8488c2ecf20Sopenharmony_ci#define M_WINDOW_SCALE 0x3 8498c2ecf20Sopenharmony_ci#define V_WINDOW_SCALE(x) ((x) << S_WINDOW_SCALE) 8508c2ecf20Sopenharmony_ci#define G_WINDOW_SCALE(x) (((x) >> S_WINDOW_SCALE) & M_WINDOW_SCALE) 8518c2ecf20Sopenharmony_ci 8528c2ecf20Sopenharmony_ci#define S_SACK 4 8538c2ecf20Sopenharmony_ci#define M_SACK 0x3 8548c2ecf20Sopenharmony_ci#define V_SACK(x) ((x) << S_SACK) 8558c2ecf20Sopenharmony_ci#define G_SACK(x) (((x) >> S_SACK) & M_SACK) 8568c2ecf20Sopenharmony_ci 8578c2ecf20Sopenharmony_ci#define S_ECN 6 8588c2ecf20Sopenharmony_ci#define M_ECN 0x3 8598c2ecf20Sopenharmony_ci#define V_ECN(x) ((x) << S_ECN) 8608c2ecf20Sopenharmony_ci#define G_ECN(x) (((x) >> S_ECN) & M_ECN) 8618c2ecf20Sopenharmony_ci 8628c2ecf20Sopenharmony_ci#define S_SACK_ALGORITHM 8 8638c2ecf20Sopenharmony_ci#define M_SACK_ALGORITHM 0x3 8648c2ecf20Sopenharmony_ci#define V_SACK_ALGORITHM(x) ((x) << S_SACK_ALGORITHM) 8658c2ecf20Sopenharmony_ci#define G_SACK_ALGORITHM(x) (((x) >> S_SACK_ALGORITHM) & M_SACK_ALGORITHM) 8668c2ecf20Sopenharmony_ci 8678c2ecf20Sopenharmony_ci#define S_MSS 10 8688c2ecf20Sopenharmony_ci#define V_MSS(x) ((x) << S_MSS) 8698c2ecf20Sopenharmony_ci#define F_MSS V_MSS(1U) 8708c2ecf20Sopenharmony_ci 8718c2ecf20Sopenharmony_ci#define S_DEFAULT_PEER_MSS 16 8728c2ecf20Sopenharmony_ci#define M_DEFAULT_PEER_MSS 0xffff 8738c2ecf20Sopenharmony_ci#define V_DEFAULT_PEER_MSS(x) ((x) << S_DEFAULT_PEER_MSS) 8748c2ecf20Sopenharmony_ci#define G_DEFAULT_PEER_MSS(x) (((x) >> S_DEFAULT_PEER_MSS) & M_DEFAULT_PEER_MSS) 8758c2ecf20Sopenharmony_ci 8768c2ecf20Sopenharmony_ci#define A_TP_DACK_CONFIG 0x344 8778c2ecf20Sopenharmony_ci 8788c2ecf20Sopenharmony_ci#define S_DACK_MODE 0 8798c2ecf20Sopenharmony_ci#define V_DACK_MODE(x) ((x) << S_DACK_MODE) 8808c2ecf20Sopenharmony_ci#define F_DACK_MODE V_DACK_MODE(1U) 8818c2ecf20Sopenharmony_ci 8828c2ecf20Sopenharmony_ci#define S_DACK_AUTO_MGMT 1 8838c2ecf20Sopenharmony_ci#define V_DACK_AUTO_MGMT(x) ((x) << S_DACK_AUTO_MGMT) 8848c2ecf20Sopenharmony_ci#define F_DACK_AUTO_MGMT V_DACK_AUTO_MGMT(1U) 8858c2ecf20Sopenharmony_ci 8868c2ecf20Sopenharmony_ci#define S_DACK_AUTO_CAREFUL 2 8878c2ecf20Sopenharmony_ci#define V_DACK_AUTO_CAREFUL(x) ((x) << S_DACK_AUTO_CAREFUL) 8888c2ecf20Sopenharmony_ci#define F_DACK_AUTO_CAREFUL V_DACK_AUTO_CAREFUL(1U) 8898c2ecf20Sopenharmony_ci 8908c2ecf20Sopenharmony_ci#define S_DACK_MSS_SELECTOR 3 8918c2ecf20Sopenharmony_ci#define M_DACK_MSS_SELECTOR 0x3 8928c2ecf20Sopenharmony_ci#define V_DACK_MSS_SELECTOR(x) ((x) << S_DACK_MSS_SELECTOR) 8938c2ecf20Sopenharmony_ci#define G_DACK_MSS_SELECTOR(x) (((x) >> S_DACK_MSS_SELECTOR) & M_DACK_MSS_SELECTOR) 8948c2ecf20Sopenharmony_ci 8958c2ecf20Sopenharmony_ci#define S_DACK_BYTE_THRESHOLD 5 8968c2ecf20Sopenharmony_ci#define M_DACK_BYTE_THRESHOLD 0xfffff 8978c2ecf20Sopenharmony_ci#define V_DACK_BYTE_THRESHOLD(x) ((x) << S_DACK_BYTE_THRESHOLD) 8988c2ecf20Sopenharmony_ci#define G_DACK_BYTE_THRESHOLD(x) (((x) >> S_DACK_BYTE_THRESHOLD) & M_DACK_BYTE_THRESHOLD) 8998c2ecf20Sopenharmony_ci 9008c2ecf20Sopenharmony_ci#define A_TP_PC_CONFIG 0x348 9018c2ecf20Sopenharmony_ci 9028c2ecf20Sopenharmony_ci#define S_TP_ACCESS_LATENCY 0 9038c2ecf20Sopenharmony_ci#define M_TP_ACCESS_LATENCY 0xf 9048c2ecf20Sopenharmony_ci#define V_TP_ACCESS_LATENCY(x) ((x) << S_TP_ACCESS_LATENCY) 9058c2ecf20Sopenharmony_ci#define G_TP_ACCESS_LATENCY(x) (((x) >> S_TP_ACCESS_LATENCY) & M_TP_ACCESS_LATENCY) 9068c2ecf20Sopenharmony_ci 9078c2ecf20Sopenharmony_ci#define S_HELD_FIN_DISABLE 4 9088c2ecf20Sopenharmony_ci#define V_HELD_FIN_DISABLE(x) ((x) << S_HELD_FIN_DISABLE) 9098c2ecf20Sopenharmony_ci#define F_HELD_FIN_DISABLE V_HELD_FIN_DISABLE(1U) 9108c2ecf20Sopenharmony_ci 9118c2ecf20Sopenharmony_ci#define S_DDP_FC_ENABLE 5 9128c2ecf20Sopenharmony_ci#define V_DDP_FC_ENABLE(x) ((x) << S_DDP_FC_ENABLE) 9138c2ecf20Sopenharmony_ci#define F_DDP_FC_ENABLE V_DDP_FC_ENABLE(1U) 9148c2ecf20Sopenharmony_ci 9158c2ecf20Sopenharmony_ci#define S_RDMA_ERR_ENABLE 6 9168c2ecf20Sopenharmony_ci#define V_RDMA_ERR_ENABLE(x) ((x) << S_RDMA_ERR_ENABLE) 9178c2ecf20Sopenharmony_ci#define F_RDMA_ERR_ENABLE V_RDMA_ERR_ENABLE(1U) 9188c2ecf20Sopenharmony_ci 9198c2ecf20Sopenharmony_ci#define S_FAST_PDU_DELIVERY 7 9208c2ecf20Sopenharmony_ci#define V_FAST_PDU_DELIVERY(x) ((x) << S_FAST_PDU_DELIVERY) 9218c2ecf20Sopenharmony_ci#define F_FAST_PDU_DELIVERY V_FAST_PDU_DELIVERY(1U) 9228c2ecf20Sopenharmony_ci 9238c2ecf20Sopenharmony_ci#define S_CLEAR_FIN 8 9248c2ecf20Sopenharmony_ci#define V_CLEAR_FIN(x) ((x) << S_CLEAR_FIN) 9258c2ecf20Sopenharmony_ci#define F_CLEAR_FIN V_CLEAR_FIN(1U) 9268c2ecf20Sopenharmony_ci 9278c2ecf20Sopenharmony_ci#define S_DIS_TX_FILL_WIN_PUSH 12 9288c2ecf20Sopenharmony_ci#define V_DIS_TX_FILL_WIN_PUSH(x) ((x) << S_DIS_TX_FILL_WIN_PUSH) 9298c2ecf20Sopenharmony_ci#define F_DIS_TX_FILL_WIN_PUSH V_DIS_TX_FILL_WIN_PUSH(1U) 9308c2ecf20Sopenharmony_ci 9318c2ecf20Sopenharmony_ci#define S_TP_PC_REV 30 9328c2ecf20Sopenharmony_ci#define M_TP_PC_REV 0x3 9338c2ecf20Sopenharmony_ci#define V_TP_PC_REV(x) ((x) << S_TP_PC_REV) 9348c2ecf20Sopenharmony_ci#define G_TP_PC_REV(x) (((x) >> S_TP_PC_REV) & M_TP_PC_REV) 9358c2ecf20Sopenharmony_ci 9368c2ecf20Sopenharmony_ci#define A_TP_BACKOFF0 0x350 9378c2ecf20Sopenharmony_ci 9388c2ecf20Sopenharmony_ci#define S_ELEMENT0 0 9398c2ecf20Sopenharmony_ci#define M_ELEMENT0 0xff 9408c2ecf20Sopenharmony_ci#define V_ELEMENT0(x) ((x) << S_ELEMENT0) 9418c2ecf20Sopenharmony_ci#define G_ELEMENT0(x) (((x) >> S_ELEMENT0) & M_ELEMENT0) 9428c2ecf20Sopenharmony_ci 9438c2ecf20Sopenharmony_ci#define S_ELEMENT1 8 9448c2ecf20Sopenharmony_ci#define M_ELEMENT1 0xff 9458c2ecf20Sopenharmony_ci#define V_ELEMENT1(x) ((x) << S_ELEMENT1) 9468c2ecf20Sopenharmony_ci#define G_ELEMENT1(x) (((x) >> S_ELEMENT1) & M_ELEMENT1) 9478c2ecf20Sopenharmony_ci 9488c2ecf20Sopenharmony_ci#define S_ELEMENT2 16 9498c2ecf20Sopenharmony_ci#define M_ELEMENT2 0xff 9508c2ecf20Sopenharmony_ci#define V_ELEMENT2(x) ((x) << S_ELEMENT2) 9518c2ecf20Sopenharmony_ci#define G_ELEMENT2(x) (((x) >> S_ELEMENT2) & M_ELEMENT2) 9528c2ecf20Sopenharmony_ci 9538c2ecf20Sopenharmony_ci#define S_ELEMENT3 24 9548c2ecf20Sopenharmony_ci#define M_ELEMENT3 0xff 9558c2ecf20Sopenharmony_ci#define V_ELEMENT3(x) ((x) << S_ELEMENT3) 9568c2ecf20Sopenharmony_ci#define G_ELEMENT3(x) (((x) >> S_ELEMENT3) & M_ELEMENT3) 9578c2ecf20Sopenharmony_ci 9588c2ecf20Sopenharmony_ci#define A_TP_BACKOFF1 0x354 9598c2ecf20Sopenharmony_ci#define A_TP_BACKOFF2 0x358 9608c2ecf20Sopenharmony_ci#define A_TP_BACKOFF3 0x35c 9618c2ecf20Sopenharmony_ci#define A_TP_PARA_REG0 0x360 9628c2ecf20Sopenharmony_ci 9638c2ecf20Sopenharmony_ci#define S_VAR_MULT 0 9648c2ecf20Sopenharmony_ci#define M_VAR_MULT 0xf 9658c2ecf20Sopenharmony_ci#define V_VAR_MULT(x) ((x) << S_VAR_MULT) 9668c2ecf20Sopenharmony_ci#define G_VAR_MULT(x) (((x) >> S_VAR_MULT) & M_VAR_MULT) 9678c2ecf20Sopenharmony_ci 9688c2ecf20Sopenharmony_ci#define S_VAR_GAIN 4 9698c2ecf20Sopenharmony_ci#define M_VAR_GAIN 0xf 9708c2ecf20Sopenharmony_ci#define V_VAR_GAIN(x) ((x) << S_VAR_GAIN) 9718c2ecf20Sopenharmony_ci#define G_VAR_GAIN(x) (((x) >> S_VAR_GAIN) & M_VAR_GAIN) 9728c2ecf20Sopenharmony_ci 9738c2ecf20Sopenharmony_ci#define S_SRTT_GAIN 8 9748c2ecf20Sopenharmony_ci#define M_SRTT_GAIN 0xf 9758c2ecf20Sopenharmony_ci#define V_SRTT_GAIN(x) ((x) << S_SRTT_GAIN) 9768c2ecf20Sopenharmony_ci#define G_SRTT_GAIN(x) (((x) >> S_SRTT_GAIN) & M_SRTT_GAIN) 9778c2ecf20Sopenharmony_ci 9788c2ecf20Sopenharmony_ci#define S_RTTVAR_INIT 12 9798c2ecf20Sopenharmony_ci#define M_RTTVAR_INIT 0xf 9808c2ecf20Sopenharmony_ci#define V_RTTVAR_INIT(x) ((x) << S_RTTVAR_INIT) 9818c2ecf20Sopenharmony_ci#define G_RTTVAR_INIT(x) (((x) >> S_RTTVAR_INIT) & M_RTTVAR_INIT) 9828c2ecf20Sopenharmony_ci 9838c2ecf20Sopenharmony_ci#define S_DUP_THRESH 20 9848c2ecf20Sopenharmony_ci#define M_DUP_THRESH 0xf 9858c2ecf20Sopenharmony_ci#define V_DUP_THRESH(x) ((x) << S_DUP_THRESH) 9868c2ecf20Sopenharmony_ci#define G_DUP_THRESH(x) (((x) >> S_DUP_THRESH) & M_DUP_THRESH) 9878c2ecf20Sopenharmony_ci 9888c2ecf20Sopenharmony_ci#define S_INIT_CONG_WIN 24 9898c2ecf20Sopenharmony_ci#define M_INIT_CONG_WIN 0x7 9908c2ecf20Sopenharmony_ci#define V_INIT_CONG_WIN(x) ((x) << S_INIT_CONG_WIN) 9918c2ecf20Sopenharmony_ci#define G_INIT_CONG_WIN(x) (((x) >> S_INIT_CONG_WIN) & M_INIT_CONG_WIN) 9928c2ecf20Sopenharmony_ci 9938c2ecf20Sopenharmony_ci#define A_TP_PARA_REG1 0x364 9948c2ecf20Sopenharmony_ci 9958c2ecf20Sopenharmony_ci#define S_INITIAL_SLOW_START_THRESHOLD 0 9968c2ecf20Sopenharmony_ci#define M_INITIAL_SLOW_START_THRESHOLD 0xffff 9978c2ecf20Sopenharmony_ci#define V_INITIAL_SLOW_START_THRESHOLD(x) ((x) << S_INITIAL_SLOW_START_THRESHOLD) 9988c2ecf20Sopenharmony_ci#define G_INITIAL_SLOW_START_THRESHOLD(x) (((x) >> S_INITIAL_SLOW_START_THRESHOLD) & M_INITIAL_SLOW_START_THRESHOLD) 9998c2ecf20Sopenharmony_ci 10008c2ecf20Sopenharmony_ci#define S_RECEIVE_BUFFER_SIZE 16 10018c2ecf20Sopenharmony_ci#define M_RECEIVE_BUFFER_SIZE 0xffff 10028c2ecf20Sopenharmony_ci#define V_RECEIVE_BUFFER_SIZE(x) ((x) << S_RECEIVE_BUFFER_SIZE) 10038c2ecf20Sopenharmony_ci#define G_RECEIVE_BUFFER_SIZE(x) (((x) >> S_RECEIVE_BUFFER_SIZE) & M_RECEIVE_BUFFER_SIZE) 10048c2ecf20Sopenharmony_ci 10058c2ecf20Sopenharmony_ci#define A_TP_PARA_REG2 0x368 10068c2ecf20Sopenharmony_ci 10078c2ecf20Sopenharmony_ci#define S_RX_COALESCE_SIZE 0 10088c2ecf20Sopenharmony_ci#define M_RX_COALESCE_SIZE 0xffff 10098c2ecf20Sopenharmony_ci#define V_RX_COALESCE_SIZE(x) ((x) << S_RX_COALESCE_SIZE) 10108c2ecf20Sopenharmony_ci#define G_RX_COALESCE_SIZE(x) (((x) >> S_RX_COALESCE_SIZE) & M_RX_COALESCE_SIZE) 10118c2ecf20Sopenharmony_ci 10128c2ecf20Sopenharmony_ci#define S_MAX_RX_SIZE 16 10138c2ecf20Sopenharmony_ci#define M_MAX_RX_SIZE 0xffff 10148c2ecf20Sopenharmony_ci#define V_MAX_RX_SIZE(x) ((x) << S_MAX_RX_SIZE) 10158c2ecf20Sopenharmony_ci#define G_MAX_RX_SIZE(x) (((x) >> S_MAX_RX_SIZE) & M_MAX_RX_SIZE) 10168c2ecf20Sopenharmony_ci 10178c2ecf20Sopenharmony_ci#define A_TP_PARA_REG3 0x36c 10188c2ecf20Sopenharmony_ci 10198c2ecf20Sopenharmony_ci#define S_RX_COALESCING_PSH_DELIVER 0 10208c2ecf20Sopenharmony_ci#define V_RX_COALESCING_PSH_DELIVER(x) ((x) << S_RX_COALESCING_PSH_DELIVER) 10218c2ecf20Sopenharmony_ci#define F_RX_COALESCING_PSH_DELIVER V_RX_COALESCING_PSH_DELIVER(1U) 10228c2ecf20Sopenharmony_ci 10238c2ecf20Sopenharmony_ci#define S_RX_COALESCING_ENABLE 1 10248c2ecf20Sopenharmony_ci#define V_RX_COALESCING_ENABLE(x) ((x) << S_RX_COALESCING_ENABLE) 10258c2ecf20Sopenharmony_ci#define F_RX_COALESCING_ENABLE V_RX_COALESCING_ENABLE(1U) 10268c2ecf20Sopenharmony_ci 10278c2ecf20Sopenharmony_ci#define S_TAHOE_ENABLE 2 10288c2ecf20Sopenharmony_ci#define V_TAHOE_ENABLE(x) ((x) << S_TAHOE_ENABLE) 10298c2ecf20Sopenharmony_ci#define F_TAHOE_ENABLE V_TAHOE_ENABLE(1U) 10308c2ecf20Sopenharmony_ci 10318c2ecf20Sopenharmony_ci#define S_MAX_REORDER_FRAGMENTS 12 10328c2ecf20Sopenharmony_ci#define M_MAX_REORDER_FRAGMENTS 0x7 10338c2ecf20Sopenharmony_ci#define V_MAX_REORDER_FRAGMENTS(x) ((x) << S_MAX_REORDER_FRAGMENTS) 10348c2ecf20Sopenharmony_ci#define G_MAX_REORDER_FRAGMENTS(x) (((x) >> S_MAX_REORDER_FRAGMENTS) & M_MAX_REORDER_FRAGMENTS) 10358c2ecf20Sopenharmony_ci 10368c2ecf20Sopenharmony_ci#define A_TP_TIMER_RESOLUTION 0x390 10378c2ecf20Sopenharmony_ci 10388c2ecf20Sopenharmony_ci#define S_DELAYED_ACK_TIMER_RESOLUTION 0 10398c2ecf20Sopenharmony_ci#define M_DELAYED_ACK_TIMER_RESOLUTION 0x3f 10408c2ecf20Sopenharmony_ci#define V_DELAYED_ACK_TIMER_RESOLUTION(x) ((x) << S_DELAYED_ACK_TIMER_RESOLUTION) 10418c2ecf20Sopenharmony_ci#define G_DELAYED_ACK_TIMER_RESOLUTION(x) (((x) >> S_DELAYED_ACK_TIMER_RESOLUTION) & M_DELAYED_ACK_TIMER_RESOLUTION) 10428c2ecf20Sopenharmony_ci 10438c2ecf20Sopenharmony_ci#define S_GENERIC_TIMER_RESOLUTION 16 10448c2ecf20Sopenharmony_ci#define M_GENERIC_TIMER_RESOLUTION 0x3f 10458c2ecf20Sopenharmony_ci#define V_GENERIC_TIMER_RESOLUTION(x) ((x) << S_GENERIC_TIMER_RESOLUTION) 10468c2ecf20Sopenharmony_ci#define G_GENERIC_TIMER_RESOLUTION(x) (((x) >> S_GENERIC_TIMER_RESOLUTION) & M_GENERIC_TIMER_RESOLUTION) 10478c2ecf20Sopenharmony_ci 10488c2ecf20Sopenharmony_ci#define A_TP_2MSL 0x394 10498c2ecf20Sopenharmony_ci 10508c2ecf20Sopenharmony_ci#define S_2MSL 0 10518c2ecf20Sopenharmony_ci#define M_2MSL 0x3fffffff 10528c2ecf20Sopenharmony_ci#define V_2MSL(x) ((x) << S_2MSL) 10538c2ecf20Sopenharmony_ci#define G_2MSL(x) (((x) >> S_2MSL) & M_2MSL) 10548c2ecf20Sopenharmony_ci 10558c2ecf20Sopenharmony_ci#define A_TP_RXT_MIN 0x398 10568c2ecf20Sopenharmony_ci 10578c2ecf20Sopenharmony_ci#define S_RETRANSMIT_TIMER_MIN 0 10588c2ecf20Sopenharmony_ci#define M_RETRANSMIT_TIMER_MIN 0xffff 10598c2ecf20Sopenharmony_ci#define V_RETRANSMIT_TIMER_MIN(x) ((x) << S_RETRANSMIT_TIMER_MIN) 10608c2ecf20Sopenharmony_ci#define G_RETRANSMIT_TIMER_MIN(x) (((x) >> S_RETRANSMIT_TIMER_MIN) & M_RETRANSMIT_TIMER_MIN) 10618c2ecf20Sopenharmony_ci 10628c2ecf20Sopenharmony_ci#define A_TP_RXT_MAX 0x39c 10638c2ecf20Sopenharmony_ci 10648c2ecf20Sopenharmony_ci#define S_RETRANSMIT_TIMER_MAX 0 10658c2ecf20Sopenharmony_ci#define M_RETRANSMIT_TIMER_MAX 0x3fffffff 10668c2ecf20Sopenharmony_ci#define V_RETRANSMIT_TIMER_MAX(x) ((x) << S_RETRANSMIT_TIMER_MAX) 10678c2ecf20Sopenharmony_ci#define G_RETRANSMIT_TIMER_MAX(x) (((x) >> S_RETRANSMIT_TIMER_MAX) & M_RETRANSMIT_TIMER_MAX) 10688c2ecf20Sopenharmony_ci 10698c2ecf20Sopenharmony_ci#define A_TP_PERS_MIN 0x3a0 10708c2ecf20Sopenharmony_ci 10718c2ecf20Sopenharmony_ci#define S_PERSIST_TIMER_MIN 0 10728c2ecf20Sopenharmony_ci#define M_PERSIST_TIMER_MIN 0xffff 10738c2ecf20Sopenharmony_ci#define V_PERSIST_TIMER_MIN(x) ((x) << S_PERSIST_TIMER_MIN) 10748c2ecf20Sopenharmony_ci#define G_PERSIST_TIMER_MIN(x) (((x) >> S_PERSIST_TIMER_MIN) & M_PERSIST_TIMER_MIN) 10758c2ecf20Sopenharmony_ci 10768c2ecf20Sopenharmony_ci#define A_TP_PERS_MAX 0x3a4 10778c2ecf20Sopenharmony_ci 10788c2ecf20Sopenharmony_ci#define S_PERSIST_TIMER_MAX 0 10798c2ecf20Sopenharmony_ci#define M_PERSIST_TIMER_MAX 0x3fffffff 10808c2ecf20Sopenharmony_ci#define V_PERSIST_TIMER_MAX(x) ((x) << S_PERSIST_TIMER_MAX) 10818c2ecf20Sopenharmony_ci#define G_PERSIST_TIMER_MAX(x) (((x) >> S_PERSIST_TIMER_MAX) & M_PERSIST_TIMER_MAX) 10828c2ecf20Sopenharmony_ci 10838c2ecf20Sopenharmony_ci#define A_TP_KEEP_IDLE 0x3ac 10848c2ecf20Sopenharmony_ci 10858c2ecf20Sopenharmony_ci#define S_KEEP_ALIVE_IDLE_TIME 0 10868c2ecf20Sopenharmony_ci#define M_KEEP_ALIVE_IDLE_TIME 0x3fffffff 10878c2ecf20Sopenharmony_ci#define V_KEEP_ALIVE_IDLE_TIME(x) ((x) << S_KEEP_ALIVE_IDLE_TIME) 10888c2ecf20Sopenharmony_ci#define G_KEEP_ALIVE_IDLE_TIME(x) (((x) >> S_KEEP_ALIVE_IDLE_TIME) & M_KEEP_ALIVE_IDLE_TIME) 10898c2ecf20Sopenharmony_ci 10908c2ecf20Sopenharmony_ci#define A_TP_KEEP_INTVL 0x3b0 10918c2ecf20Sopenharmony_ci 10928c2ecf20Sopenharmony_ci#define S_KEEP_ALIVE_INTERVAL_TIME 0 10938c2ecf20Sopenharmony_ci#define M_KEEP_ALIVE_INTERVAL_TIME 0x3fffffff 10948c2ecf20Sopenharmony_ci#define V_KEEP_ALIVE_INTERVAL_TIME(x) ((x) << S_KEEP_ALIVE_INTERVAL_TIME) 10958c2ecf20Sopenharmony_ci#define G_KEEP_ALIVE_INTERVAL_TIME(x) (((x) >> S_KEEP_ALIVE_INTERVAL_TIME) & M_KEEP_ALIVE_INTERVAL_TIME) 10968c2ecf20Sopenharmony_ci 10978c2ecf20Sopenharmony_ci#define A_TP_INIT_SRTT 0x3b4 10988c2ecf20Sopenharmony_ci 10998c2ecf20Sopenharmony_ci#define S_INITIAL_SRTT 0 11008c2ecf20Sopenharmony_ci#define M_INITIAL_SRTT 0xffff 11018c2ecf20Sopenharmony_ci#define V_INITIAL_SRTT(x) ((x) << S_INITIAL_SRTT) 11028c2ecf20Sopenharmony_ci#define G_INITIAL_SRTT(x) (((x) >> S_INITIAL_SRTT) & M_INITIAL_SRTT) 11038c2ecf20Sopenharmony_ci 11048c2ecf20Sopenharmony_ci#define A_TP_DACK_TIME 0x3b8 11058c2ecf20Sopenharmony_ci 11068c2ecf20Sopenharmony_ci#define S_DELAYED_ACK_TIME 0 11078c2ecf20Sopenharmony_ci#define M_DELAYED_ACK_TIME 0x7ff 11088c2ecf20Sopenharmony_ci#define V_DELAYED_ACK_TIME(x) ((x) << S_DELAYED_ACK_TIME) 11098c2ecf20Sopenharmony_ci#define G_DELAYED_ACK_TIME(x) (((x) >> S_DELAYED_ACK_TIME) & M_DELAYED_ACK_TIME) 11108c2ecf20Sopenharmony_ci 11118c2ecf20Sopenharmony_ci#define A_TP_FINWAIT2_TIME 0x3bc 11128c2ecf20Sopenharmony_ci 11138c2ecf20Sopenharmony_ci#define S_FINWAIT2_TIME 0 11148c2ecf20Sopenharmony_ci#define M_FINWAIT2_TIME 0x3fffffff 11158c2ecf20Sopenharmony_ci#define V_FINWAIT2_TIME(x) ((x) << S_FINWAIT2_TIME) 11168c2ecf20Sopenharmony_ci#define G_FINWAIT2_TIME(x) (((x) >> S_FINWAIT2_TIME) & M_FINWAIT2_TIME) 11178c2ecf20Sopenharmony_ci 11188c2ecf20Sopenharmony_ci#define A_TP_FAST_FINWAIT2_TIME 0x3c0 11198c2ecf20Sopenharmony_ci 11208c2ecf20Sopenharmony_ci#define S_FAST_FINWAIT2_TIME 0 11218c2ecf20Sopenharmony_ci#define M_FAST_FINWAIT2_TIME 0x3fffffff 11228c2ecf20Sopenharmony_ci#define V_FAST_FINWAIT2_TIME(x) ((x) << S_FAST_FINWAIT2_TIME) 11238c2ecf20Sopenharmony_ci#define G_FAST_FINWAIT2_TIME(x) (((x) >> S_FAST_FINWAIT2_TIME) & M_FAST_FINWAIT2_TIME) 11248c2ecf20Sopenharmony_ci 11258c2ecf20Sopenharmony_ci#define A_TP_SHIFT_CNT 0x3c4 11268c2ecf20Sopenharmony_ci 11278c2ecf20Sopenharmony_ci#define S_KEEPALIVE_MAX 0 11288c2ecf20Sopenharmony_ci#define M_KEEPALIVE_MAX 0xff 11298c2ecf20Sopenharmony_ci#define V_KEEPALIVE_MAX(x) ((x) << S_KEEPALIVE_MAX) 11308c2ecf20Sopenharmony_ci#define G_KEEPALIVE_MAX(x) (((x) >> S_KEEPALIVE_MAX) & M_KEEPALIVE_MAX) 11318c2ecf20Sopenharmony_ci 11328c2ecf20Sopenharmony_ci#define S_WINDOWPROBE_MAX 8 11338c2ecf20Sopenharmony_ci#define M_WINDOWPROBE_MAX 0xff 11348c2ecf20Sopenharmony_ci#define V_WINDOWPROBE_MAX(x) ((x) << S_WINDOWPROBE_MAX) 11358c2ecf20Sopenharmony_ci#define G_WINDOWPROBE_MAX(x) (((x) >> S_WINDOWPROBE_MAX) & M_WINDOWPROBE_MAX) 11368c2ecf20Sopenharmony_ci 11378c2ecf20Sopenharmony_ci#define S_RETRANSMISSION_MAX 16 11388c2ecf20Sopenharmony_ci#define M_RETRANSMISSION_MAX 0xff 11398c2ecf20Sopenharmony_ci#define V_RETRANSMISSION_MAX(x) ((x) << S_RETRANSMISSION_MAX) 11408c2ecf20Sopenharmony_ci#define G_RETRANSMISSION_MAX(x) (((x) >> S_RETRANSMISSION_MAX) & M_RETRANSMISSION_MAX) 11418c2ecf20Sopenharmony_ci 11428c2ecf20Sopenharmony_ci#define S_SYN_MAX 24 11438c2ecf20Sopenharmony_ci#define M_SYN_MAX 0xff 11448c2ecf20Sopenharmony_ci#define V_SYN_MAX(x) ((x) << S_SYN_MAX) 11458c2ecf20Sopenharmony_ci#define G_SYN_MAX(x) (((x) >> S_SYN_MAX) & M_SYN_MAX) 11468c2ecf20Sopenharmony_ci 11478c2ecf20Sopenharmony_ci#define A_TP_QOS_REG0 0x3e0 11488c2ecf20Sopenharmony_ci 11498c2ecf20Sopenharmony_ci#define S_L3_VALUE 0 11508c2ecf20Sopenharmony_ci#define M_L3_VALUE 0x3f 11518c2ecf20Sopenharmony_ci#define V_L3_VALUE(x) ((x) << S_L3_VALUE) 11528c2ecf20Sopenharmony_ci#define G_L3_VALUE(x) (((x) >> S_L3_VALUE) & M_L3_VALUE) 11538c2ecf20Sopenharmony_ci 11548c2ecf20Sopenharmony_ci#define A_TP_QOS_REG1 0x3e4 11558c2ecf20Sopenharmony_ci#define A_TP_QOS_REG2 0x3e8 11568c2ecf20Sopenharmony_ci#define A_TP_QOS_REG3 0x3ec 11578c2ecf20Sopenharmony_ci#define A_TP_QOS_REG4 0x3f0 11588c2ecf20Sopenharmony_ci#define A_TP_QOS_REG5 0x3f4 11598c2ecf20Sopenharmony_ci#define A_TP_QOS_REG6 0x3f8 11608c2ecf20Sopenharmony_ci#define A_TP_QOS_REG7 0x3fc 11618c2ecf20Sopenharmony_ci#define A_TP_MTU_REG0 0x404 11628c2ecf20Sopenharmony_ci#define A_TP_MTU_REG1 0x408 11638c2ecf20Sopenharmony_ci#define A_TP_MTU_REG2 0x40c 11648c2ecf20Sopenharmony_ci#define A_TP_MTU_REG3 0x410 11658c2ecf20Sopenharmony_ci#define A_TP_MTU_REG4 0x414 11668c2ecf20Sopenharmony_ci#define A_TP_MTU_REG5 0x418 11678c2ecf20Sopenharmony_ci#define A_TP_MTU_REG6 0x41c 11688c2ecf20Sopenharmony_ci#define A_TP_MTU_REG7 0x420 11698c2ecf20Sopenharmony_ci#define A_TP_RESET 0x44c 11708c2ecf20Sopenharmony_ci 11718c2ecf20Sopenharmony_ci#define S_TP_RESET 0 11728c2ecf20Sopenharmony_ci#define V_TP_RESET(x) ((x) << S_TP_RESET) 11738c2ecf20Sopenharmony_ci#define F_TP_RESET V_TP_RESET(1U) 11748c2ecf20Sopenharmony_ci 11758c2ecf20Sopenharmony_ci#define S_CM_MEMMGR_INIT 1 11768c2ecf20Sopenharmony_ci#define V_CM_MEMMGR_INIT(x) ((x) << S_CM_MEMMGR_INIT) 11778c2ecf20Sopenharmony_ci#define F_CM_MEMMGR_INIT V_CM_MEMMGR_INIT(1U) 11788c2ecf20Sopenharmony_ci 11798c2ecf20Sopenharmony_ci#define A_TP_MIB_INDEX 0x450 11808c2ecf20Sopenharmony_ci#define A_TP_MIB_DATA 0x454 11818c2ecf20Sopenharmony_ci#define A_TP_SYNC_TIME_HI 0x458 11828c2ecf20Sopenharmony_ci#define A_TP_SYNC_TIME_LO 0x45c 11838c2ecf20Sopenharmony_ci#define A_TP_CM_MM_RX_FLST_BASE 0x460 11848c2ecf20Sopenharmony_ci 11858c2ecf20Sopenharmony_ci#define S_CM_MEMMGR_RX_FREE_LIST_BASE 0 11868c2ecf20Sopenharmony_ci#define M_CM_MEMMGR_RX_FREE_LIST_BASE 0xfffffff 11878c2ecf20Sopenharmony_ci#define V_CM_MEMMGR_RX_FREE_LIST_BASE(x) ((x) << S_CM_MEMMGR_RX_FREE_LIST_BASE) 11888c2ecf20Sopenharmony_ci#define G_CM_MEMMGR_RX_FREE_LIST_BASE(x) (((x) >> S_CM_MEMMGR_RX_FREE_LIST_BASE) & M_CM_MEMMGR_RX_FREE_LIST_BASE) 11898c2ecf20Sopenharmony_ci 11908c2ecf20Sopenharmony_ci#define A_TP_CM_MM_TX_FLST_BASE 0x464 11918c2ecf20Sopenharmony_ci 11928c2ecf20Sopenharmony_ci#define S_CM_MEMMGR_TX_FREE_LIST_BASE 0 11938c2ecf20Sopenharmony_ci#define M_CM_MEMMGR_TX_FREE_LIST_BASE 0xfffffff 11948c2ecf20Sopenharmony_ci#define V_CM_MEMMGR_TX_FREE_LIST_BASE(x) ((x) << S_CM_MEMMGR_TX_FREE_LIST_BASE) 11958c2ecf20Sopenharmony_ci#define G_CM_MEMMGR_TX_FREE_LIST_BASE(x) (((x) >> S_CM_MEMMGR_TX_FREE_LIST_BASE) & M_CM_MEMMGR_TX_FREE_LIST_BASE) 11968c2ecf20Sopenharmony_ci 11978c2ecf20Sopenharmony_ci#define A_TP_CM_MM_P_FLST_BASE 0x468 11988c2ecf20Sopenharmony_ci 11998c2ecf20Sopenharmony_ci#define S_CM_MEMMGR_PSTRUCT_FREE_LIST_BASE 0 12008c2ecf20Sopenharmony_ci#define M_CM_MEMMGR_PSTRUCT_FREE_LIST_BASE 0xfffffff 12018c2ecf20Sopenharmony_ci#define V_CM_MEMMGR_PSTRUCT_FREE_LIST_BASE(x) ((x) << S_CM_MEMMGR_PSTRUCT_FREE_LIST_BASE) 12028c2ecf20Sopenharmony_ci#define G_CM_MEMMGR_PSTRUCT_FREE_LIST_BASE(x) (((x) >> S_CM_MEMMGR_PSTRUCT_FREE_LIST_BASE) & M_CM_MEMMGR_PSTRUCT_FREE_LIST_BASE) 12038c2ecf20Sopenharmony_ci 12048c2ecf20Sopenharmony_ci#define A_TP_CM_MM_MAX_P 0x46c 12058c2ecf20Sopenharmony_ci 12068c2ecf20Sopenharmony_ci#define S_CM_MEMMGR_MAX_PSTRUCT 0 12078c2ecf20Sopenharmony_ci#define M_CM_MEMMGR_MAX_PSTRUCT 0xfffffff 12088c2ecf20Sopenharmony_ci#define V_CM_MEMMGR_MAX_PSTRUCT(x) ((x) << S_CM_MEMMGR_MAX_PSTRUCT) 12098c2ecf20Sopenharmony_ci#define G_CM_MEMMGR_MAX_PSTRUCT(x) (((x) >> S_CM_MEMMGR_MAX_PSTRUCT) & M_CM_MEMMGR_MAX_PSTRUCT) 12108c2ecf20Sopenharmony_ci 12118c2ecf20Sopenharmony_ci#define A_TP_INT_ENABLE 0x470 12128c2ecf20Sopenharmony_ci 12138c2ecf20Sopenharmony_ci#define S_TX_FREE_LIST_EMPTY 0 12148c2ecf20Sopenharmony_ci#define V_TX_FREE_LIST_EMPTY(x) ((x) << S_TX_FREE_LIST_EMPTY) 12158c2ecf20Sopenharmony_ci#define F_TX_FREE_LIST_EMPTY V_TX_FREE_LIST_EMPTY(1U) 12168c2ecf20Sopenharmony_ci 12178c2ecf20Sopenharmony_ci#define S_RX_FREE_LIST_EMPTY 1 12188c2ecf20Sopenharmony_ci#define V_RX_FREE_LIST_EMPTY(x) ((x) << S_RX_FREE_LIST_EMPTY) 12198c2ecf20Sopenharmony_ci#define F_RX_FREE_LIST_EMPTY V_RX_FREE_LIST_EMPTY(1U) 12208c2ecf20Sopenharmony_ci 12218c2ecf20Sopenharmony_ci#define A_TP_INT_CAUSE 0x474 12228c2ecf20Sopenharmony_ci#define A_TP_TIMER_SEPARATOR 0x4a4 12238c2ecf20Sopenharmony_ci 12248c2ecf20Sopenharmony_ci#define S_DISABLE_PAST_TIMER_INSERTION 0 12258c2ecf20Sopenharmony_ci#define V_DISABLE_PAST_TIMER_INSERTION(x) ((x) << S_DISABLE_PAST_TIMER_INSERTION) 12268c2ecf20Sopenharmony_ci#define F_DISABLE_PAST_TIMER_INSERTION V_DISABLE_PAST_TIMER_INSERTION(1U) 12278c2ecf20Sopenharmony_ci 12288c2ecf20Sopenharmony_ci#define S_MODULATION_TIMER_SEPARATOR 1 12298c2ecf20Sopenharmony_ci#define M_MODULATION_TIMER_SEPARATOR 0x7fff 12308c2ecf20Sopenharmony_ci#define V_MODULATION_TIMER_SEPARATOR(x) ((x) << S_MODULATION_TIMER_SEPARATOR) 12318c2ecf20Sopenharmony_ci#define G_MODULATION_TIMER_SEPARATOR(x) (((x) >> S_MODULATION_TIMER_SEPARATOR) & M_MODULATION_TIMER_SEPARATOR) 12328c2ecf20Sopenharmony_ci 12338c2ecf20Sopenharmony_ci#define S_GLOBAL_TIMER_SEPARATOR 16 12348c2ecf20Sopenharmony_ci#define M_GLOBAL_TIMER_SEPARATOR 0xffff 12358c2ecf20Sopenharmony_ci#define V_GLOBAL_TIMER_SEPARATOR(x) ((x) << S_GLOBAL_TIMER_SEPARATOR) 12368c2ecf20Sopenharmony_ci#define G_GLOBAL_TIMER_SEPARATOR(x) (((x) >> S_GLOBAL_TIMER_SEPARATOR) & M_GLOBAL_TIMER_SEPARATOR) 12378c2ecf20Sopenharmony_ci 12388c2ecf20Sopenharmony_ci#define A_TP_CM_FC_MODE 0x4b0 12398c2ecf20Sopenharmony_ci#define A_TP_PC_CONGESTION_CNTL 0x4b4 12408c2ecf20Sopenharmony_ci#define A_TP_TX_DROP_CONFIG 0x4b8 12418c2ecf20Sopenharmony_ci 12428c2ecf20Sopenharmony_ci#define S_ENABLE_TX_DROP 31 12438c2ecf20Sopenharmony_ci#define V_ENABLE_TX_DROP(x) ((x) << S_ENABLE_TX_DROP) 12448c2ecf20Sopenharmony_ci#define F_ENABLE_TX_DROP V_ENABLE_TX_DROP(1U) 12458c2ecf20Sopenharmony_ci 12468c2ecf20Sopenharmony_ci#define S_ENABLE_TX_ERROR 30 12478c2ecf20Sopenharmony_ci#define V_ENABLE_TX_ERROR(x) ((x) << S_ENABLE_TX_ERROR) 12488c2ecf20Sopenharmony_ci#define F_ENABLE_TX_ERROR V_ENABLE_TX_ERROR(1U) 12498c2ecf20Sopenharmony_ci 12508c2ecf20Sopenharmony_ci#define S_DROP_TICKS_CNT 4 12518c2ecf20Sopenharmony_ci#define M_DROP_TICKS_CNT 0x3ffffff 12528c2ecf20Sopenharmony_ci#define V_DROP_TICKS_CNT(x) ((x) << S_DROP_TICKS_CNT) 12538c2ecf20Sopenharmony_ci#define G_DROP_TICKS_CNT(x) (((x) >> S_DROP_TICKS_CNT) & M_DROP_TICKS_CNT) 12548c2ecf20Sopenharmony_ci 12558c2ecf20Sopenharmony_ci#define S_NUM_PKTS_DROPPED 0 12568c2ecf20Sopenharmony_ci#define M_NUM_PKTS_DROPPED 0xf 12578c2ecf20Sopenharmony_ci#define V_NUM_PKTS_DROPPED(x) ((x) << S_NUM_PKTS_DROPPED) 12588c2ecf20Sopenharmony_ci#define G_NUM_PKTS_DROPPED(x) (((x) >> S_NUM_PKTS_DROPPED) & M_NUM_PKTS_DROPPED) 12598c2ecf20Sopenharmony_ci 12608c2ecf20Sopenharmony_ci#define A_TP_TX_DROP_COUNT 0x4bc 12618c2ecf20Sopenharmony_ci 12628c2ecf20Sopenharmony_ci/* RAT registers */ 12638c2ecf20Sopenharmony_ci#define A_RAT_ROUTE_CONTROL 0x580 12648c2ecf20Sopenharmony_ci 12658c2ecf20Sopenharmony_ci#define S_USE_ROUTE_TABLE 0 12668c2ecf20Sopenharmony_ci#define V_USE_ROUTE_TABLE(x) ((x) << S_USE_ROUTE_TABLE) 12678c2ecf20Sopenharmony_ci#define F_USE_ROUTE_TABLE V_USE_ROUTE_TABLE(1U) 12688c2ecf20Sopenharmony_ci 12698c2ecf20Sopenharmony_ci#define S_ENABLE_CSPI 1 12708c2ecf20Sopenharmony_ci#define V_ENABLE_CSPI(x) ((x) << S_ENABLE_CSPI) 12718c2ecf20Sopenharmony_ci#define F_ENABLE_CSPI V_ENABLE_CSPI(1U) 12728c2ecf20Sopenharmony_ci 12738c2ecf20Sopenharmony_ci#define S_ENABLE_PCIX 2 12748c2ecf20Sopenharmony_ci#define V_ENABLE_PCIX(x) ((x) << S_ENABLE_PCIX) 12758c2ecf20Sopenharmony_ci#define F_ENABLE_PCIX V_ENABLE_PCIX(1U) 12768c2ecf20Sopenharmony_ci 12778c2ecf20Sopenharmony_ci#define A_RAT_ROUTE_TABLE_INDEX 0x584 12788c2ecf20Sopenharmony_ci 12798c2ecf20Sopenharmony_ci#define S_ROUTE_TABLE_INDEX 0 12808c2ecf20Sopenharmony_ci#define M_ROUTE_TABLE_INDEX 0xf 12818c2ecf20Sopenharmony_ci#define V_ROUTE_TABLE_INDEX(x) ((x) << S_ROUTE_TABLE_INDEX) 12828c2ecf20Sopenharmony_ci#define G_ROUTE_TABLE_INDEX(x) (((x) >> S_ROUTE_TABLE_INDEX) & M_ROUTE_TABLE_INDEX) 12838c2ecf20Sopenharmony_ci 12848c2ecf20Sopenharmony_ci#define A_RAT_ROUTE_TABLE_DATA 0x588 12858c2ecf20Sopenharmony_ci#define A_RAT_NO_ROUTE 0x58c 12868c2ecf20Sopenharmony_ci 12878c2ecf20Sopenharmony_ci#define S_CPL_OPCODE 0 12888c2ecf20Sopenharmony_ci#define M_CPL_OPCODE 0xff 12898c2ecf20Sopenharmony_ci#define V_CPL_OPCODE(x) ((x) << S_CPL_OPCODE) 12908c2ecf20Sopenharmony_ci#define G_CPL_OPCODE(x) (((x) >> S_CPL_OPCODE) & M_CPL_OPCODE) 12918c2ecf20Sopenharmony_ci 12928c2ecf20Sopenharmony_ci#define A_RAT_INTR_ENABLE 0x590 12938c2ecf20Sopenharmony_ci 12948c2ecf20Sopenharmony_ci#define S_ZEROROUTEERROR 0 12958c2ecf20Sopenharmony_ci#define V_ZEROROUTEERROR(x) ((x) << S_ZEROROUTEERROR) 12968c2ecf20Sopenharmony_ci#define F_ZEROROUTEERROR V_ZEROROUTEERROR(1U) 12978c2ecf20Sopenharmony_ci 12988c2ecf20Sopenharmony_ci#define S_CSPIFRAMINGERROR 1 12998c2ecf20Sopenharmony_ci#define V_CSPIFRAMINGERROR(x) ((x) << S_CSPIFRAMINGERROR) 13008c2ecf20Sopenharmony_ci#define F_CSPIFRAMINGERROR V_CSPIFRAMINGERROR(1U) 13018c2ecf20Sopenharmony_ci 13028c2ecf20Sopenharmony_ci#define S_SGEFRAMINGERROR 2 13038c2ecf20Sopenharmony_ci#define V_SGEFRAMINGERROR(x) ((x) << S_SGEFRAMINGERROR) 13048c2ecf20Sopenharmony_ci#define F_SGEFRAMINGERROR V_SGEFRAMINGERROR(1U) 13058c2ecf20Sopenharmony_ci 13068c2ecf20Sopenharmony_ci#define S_TPFRAMINGERROR 3 13078c2ecf20Sopenharmony_ci#define V_TPFRAMINGERROR(x) ((x) << S_TPFRAMINGERROR) 13088c2ecf20Sopenharmony_ci#define F_TPFRAMINGERROR V_TPFRAMINGERROR(1U) 13098c2ecf20Sopenharmony_ci 13108c2ecf20Sopenharmony_ci#define A_RAT_INTR_CAUSE 0x594 13118c2ecf20Sopenharmony_ci 13128c2ecf20Sopenharmony_ci/* CSPI registers */ 13138c2ecf20Sopenharmony_ci#define A_CSPI_RX_AE_WM 0x810 13148c2ecf20Sopenharmony_ci#define A_CSPI_RX_AF_WM 0x814 13158c2ecf20Sopenharmony_ci#define A_CSPI_CALENDAR_LEN 0x818 13168c2ecf20Sopenharmony_ci 13178c2ecf20Sopenharmony_ci#define S_CALENDARLENGTH 0 13188c2ecf20Sopenharmony_ci#define M_CALENDARLENGTH 0xffff 13198c2ecf20Sopenharmony_ci#define V_CALENDARLENGTH(x) ((x) << S_CALENDARLENGTH) 13208c2ecf20Sopenharmony_ci#define G_CALENDARLENGTH(x) (((x) >> S_CALENDARLENGTH) & M_CALENDARLENGTH) 13218c2ecf20Sopenharmony_ci 13228c2ecf20Sopenharmony_ci#define A_CSPI_FIFO_STATUS_ENABLE 0x820 13238c2ecf20Sopenharmony_ci 13248c2ecf20Sopenharmony_ci#define S_FIFOSTATUSENABLE 0 13258c2ecf20Sopenharmony_ci#define V_FIFOSTATUSENABLE(x) ((x) << S_FIFOSTATUSENABLE) 13268c2ecf20Sopenharmony_ci#define F_FIFOSTATUSENABLE V_FIFOSTATUSENABLE(1U) 13278c2ecf20Sopenharmony_ci 13288c2ecf20Sopenharmony_ci#define A_CSPI_MAXBURST1_MAXBURST2 0x828 13298c2ecf20Sopenharmony_ci 13308c2ecf20Sopenharmony_ci#define S_MAXBURST1 0 13318c2ecf20Sopenharmony_ci#define M_MAXBURST1 0xffff 13328c2ecf20Sopenharmony_ci#define V_MAXBURST1(x) ((x) << S_MAXBURST1) 13338c2ecf20Sopenharmony_ci#define G_MAXBURST1(x) (((x) >> S_MAXBURST1) & M_MAXBURST1) 13348c2ecf20Sopenharmony_ci 13358c2ecf20Sopenharmony_ci#define S_MAXBURST2 16 13368c2ecf20Sopenharmony_ci#define M_MAXBURST2 0xffff 13378c2ecf20Sopenharmony_ci#define V_MAXBURST2(x) ((x) << S_MAXBURST2) 13388c2ecf20Sopenharmony_ci#define G_MAXBURST2(x) (((x) >> S_MAXBURST2) & M_MAXBURST2) 13398c2ecf20Sopenharmony_ci 13408c2ecf20Sopenharmony_ci#define A_CSPI_TRAIN 0x82c 13418c2ecf20Sopenharmony_ci 13428c2ecf20Sopenharmony_ci#define S_CSPI_TRAIN_ALPHA 0 13438c2ecf20Sopenharmony_ci#define M_CSPI_TRAIN_ALPHA 0xffff 13448c2ecf20Sopenharmony_ci#define V_CSPI_TRAIN_ALPHA(x) ((x) << S_CSPI_TRAIN_ALPHA) 13458c2ecf20Sopenharmony_ci#define G_CSPI_TRAIN_ALPHA(x) (((x) >> S_CSPI_TRAIN_ALPHA) & M_CSPI_TRAIN_ALPHA) 13468c2ecf20Sopenharmony_ci 13478c2ecf20Sopenharmony_ci#define S_CSPI_TRAIN_DATA_MAXT 16 13488c2ecf20Sopenharmony_ci#define M_CSPI_TRAIN_DATA_MAXT 0xffff 13498c2ecf20Sopenharmony_ci#define V_CSPI_TRAIN_DATA_MAXT(x) ((x) << S_CSPI_TRAIN_DATA_MAXT) 13508c2ecf20Sopenharmony_ci#define G_CSPI_TRAIN_DATA_MAXT(x) (((x) >> S_CSPI_TRAIN_DATA_MAXT) & M_CSPI_TRAIN_DATA_MAXT) 13518c2ecf20Sopenharmony_ci 13528c2ecf20Sopenharmony_ci#define A_CSPI_INTR_STATUS 0x848 13538c2ecf20Sopenharmony_ci 13548c2ecf20Sopenharmony_ci#define S_DIP4ERR 0 13558c2ecf20Sopenharmony_ci#define V_DIP4ERR(x) ((x) << S_DIP4ERR) 13568c2ecf20Sopenharmony_ci#define F_DIP4ERR V_DIP4ERR(1U) 13578c2ecf20Sopenharmony_ci 13588c2ecf20Sopenharmony_ci#define S_RXDROP 1 13598c2ecf20Sopenharmony_ci#define V_RXDROP(x) ((x) << S_RXDROP) 13608c2ecf20Sopenharmony_ci#define F_RXDROP V_RXDROP(1U) 13618c2ecf20Sopenharmony_ci 13628c2ecf20Sopenharmony_ci#define S_TXDROP 2 13638c2ecf20Sopenharmony_ci#define V_TXDROP(x) ((x) << S_TXDROP) 13648c2ecf20Sopenharmony_ci#define F_TXDROP V_TXDROP(1U) 13658c2ecf20Sopenharmony_ci 13668c2ecf20Sopenharmony_ci#define S_RXOVERFLOW 3 13678c2ecf20Sopenharmony_ci#define V_RXOVERFLOW(x) ((x) << S_RXOVERFLOW) 13688c2ecf20Sopenharmony_ci#define F_RXOVERFLOW V_RXOVERFLOW(1U) 13698c2ecf20Sopenharmony_ci 13708c2ecf20Sopenharmony_ci#define S_RAMPARITYERR 4 13718c2ecf20Sopenharmony_ci#define V_RAMPARITYERR(x) ((x) << S_RAMPARITYERR) 13728c2ecf20Sopenharmony_ci#define F_RAMPARITYERR V_RAMPARITYERR(1U) 13738c2ecf20Sopenharmony_ci 13748c2ecf20Sopenharmony_ci#define A_CSPI_INTR_ENABLE 0x84c 13758c2ecf20Sopenharmony_ci 13768c2ecf20Sopenharmony_ci/* ESPI registers */ 13778c2ecf20Sopenharmony_ci#define A_ESPI_SCH_TOKEN0 0x880 13788c2ecf20Sopenharmony_ci 13798c2ecf20Sopenharmony_ci#define S_SCHTOKEN0 0 13808c2ecf20Sopenharmony_ci#define M_SCHTOKEN0 0xffff 13818c2ecf20Sopenharmony_ci#define V_SCHTOKEN0(x) ((x) << S_SCHTOKEN0) 13828c2ecf20Sopenharmony_ci#define G_SCHTOKEN0(x) (((x) >> S_SCHTOKEN0) & M_SCHTOKEN0) 13838c2ecf20Sopenharmony_ci 13848c2ecf20Sopenharmony_ci#define A_ESPI_SCH_TOKEN1 0x884 13858c2ecf20Sopenharmony_ci 13868c2ecf20Sopenharmony_ci#define S_SCHTOKEN1 0 13878c2ecf20Sopenharmony_ci#define M_SCHTOKEN1 0xffff 13888c2ecf20Sopenharmony_ci#define V_SCHTOKEN1(x) ((x) << S_SCHTOKEN1) 13898c2ecf20Sopenharmony_ci#define G_SCHTOKEN1(x) (((x) >> S_SCHTOKEN1) & M_SCHTOKEN1) 13908c2ecf20Sopenharmony_ci 13918c2ecf20Sopenharmony_ci#define A_ESPI_SCH_TOKEN2 0x888 13928c2ecf20Sopenharmony_ci 13938c2ecf20Sopenharmony_ci#define S_SCHTOKEN2 0 13948c2ecf20Sopenharmony_ci#define M_SCHTOKEN2 0xffff 13958c2ecf20Sopenharmony_ci#define V_SCHTOKEN2(x) ((x) << S_SCHTOKEN2) 13968c2ecf20Sopenharmony_ci#define G_SCHTOKEN2(x) (((x) >> S_SCHTOKEN2) & M_SCHTOKEN2) 13978c2ecf20Sopenharmony_ci 13988c2ecf20Sopenharmony_ci#define A_ESPI_SCH_TOKEN3 0x88c 13998c2ecf20Sopenharmony_ci 14008c2ecf20Sopenharmony_ci#define S_SCHTOKEN3 0 14018c2ecf20Sopenharmony_ci#define M_SCHTOKEN3 0xffff 14028c2ecf20Sopenharmony_ci#define V_SCHTOKEN3(x) ((x) << S_SCHTOKEN3) 14038c2ecf20Sopenharmony_ci#define G_SCHTOKEN3(x) (((x) >> S_SCHTOKEN3) & M_SCHTOKEN3) 14048c2ecf20Sopenharmony_ci 14058c2ecf20Sopenharmony_ci#define A_ESPI_RX_FIFO_ALMOST_EMPTY_WATERMARK 0x890 14068c2ecf20Sopenharmony_ci 14078c2ecf20Sopenharmony_ci#define S_ALMOSTEMPTY 0 14088c2ecf20Sopenharmony_ci#define M_ALMOSTEMPTY 0xffff 14098c2ecf20Sopenharmony_ci#define V_ALMOSTEMPTY(x) ((x) << S_ALMOSTEMPTY) 14108c2ecf20Sopenharmony_ci#define G_ALMOSTEMPTY(x) (((x) >> S_ALMOSTEMPTY) & M_ALMOSTEMPTY) 14118c2ecf20Sopenharmony_ci 14128c2ecf20Sopenharmony_ci#define A_ESPI_RX_FIFO_ALMOST_FULL_WATERMARK 0x894 14138c2ecf20Sopenharmony_ci 14148c2ecf20Sopenharmony_ci#define S_ALMOSTFULL 0 14158c2ecf20Sopenharmony_ci#define M_ALMOSTFULL 0xffff 14168c2ecf20Sopenharmony_ci#define V_ALMOSTFULL(x) ((x) << S_ALMOSTFULL) 14178c2ecf20Sopenharmony_ci#define G_ALMOSTFULL(x) (((x) >> S_ALMOSTFULL) & M_ALMOSTFULL) 14188c2ecf20Sopenharmony_ci 14198c2ecf20Sopenharmony_ci#define A_ESPI_CALENDAR_LENGTH 0x898 14208c2ecf20Sopenharmony_ci#define A_PORT_CONFIG 0x89c 14218c2ecf20Sopenharmony_ci 14228c2ecf20Sopenharmony_ci#define S_RX_NPORTS 0 14238c2ecf20Sopenharmony_ci#define M_RX_NPORTS 0xff 14248c2ecf20Sopenharmony_ci#define V_RX_NPORTS(x) ((x) << S_RX_NPORTS) 14258c2ecf20Sopenharmony_ci#define G_RX_NPORTS(x) (((x) >> S_RX_NPORTS) & M_RX_NPORTS) 14268c2ecf20Sopenharmony_ci 14278c2ecf20Sopenharmony_ci#define S_TX_NPORTS 8 14288c2ecf20Sopenharmony_ci#define M_TX_NPORTS 0xff 14298c2ecf20Sopenharmony_ci#define V_TX_NPORTS(x) ((x) << S_TX_NPORTS) 14308c2ecf20Sopenharmony_ci#define G_TX_NPORTS(x) (((x) >> S_TX_NPORTS) & M_TX_NPORTS) 14318c2ecf20Sopenharmony_ci 14328c2ecf20Sopenharmony_ci#define A_ESPI_FIFO_STATUS_ENABLE 0x8a0 14338c2ecf20Sopenharmony_ci 14348c2ecf20Sopenharmony_ci#define S_RXSTATUSENABLE 0 14358c2ecf20Sopenharmony_ci#define V_RXSTATUSENABLE(x) ((x) << S_RXSTATUSENABLE) 14368c2ecf20Sopenharmony_ci#define F_RXSTATUSENABLE V_RXSTATUSENABLE(1U) 14378c2ecf20Sopenharmony_ci 14388c2ecf20Sopenharmony_ci#define S_TXDROPENABLE 1 14398c2ecf20Sopenharmony_ci#define V_TXDROPENABLE(x) ((x) << S_TXDROPENABLE) 14408c2ecf20Sopenharmony_ci#define F_TXDROPENABLE V_TXDROPENABLE(1U) 14418c2ecf20Sopenharmony_ci 14428c2ecf20Sopenharmony_ci#define S_RXENDIANMODE 2 14438c2ecf20Sopenharmony_ci#define V_RXENDIANMODE(x) ((x) << S_RXENDIANMODE) 14448c2ecf20Sopenharmony_ci#define F_RXENDIANMODE V_RXENDIANMODE(1U) 14458c2ecf20Sopenharmony_ci 14468c2ecf20Sopenharmony_ci#define S_TXENDIANMODE 3 14478c2ecf20Sopenharmony_ci#define V_TXENDIANMODE(x) ((x) << S_TXENDIANMODE) 14488c2ecf20Sopenharmony_ci#define F_TXENDIANMODE V_TXENDIANMODE(1U) 14498c2ecf20Sopenharmony_ci 14508c2ecf20Sopenharmony_ci#define S_INTEL1010MODE 4 14518c2ecf20Sopenharmony_ci#define V_INTEL1010MODE(x) ((x) << S_INTEL1010MODE) 14528c2ecf20Sopenharmony_ci#define F_INTEL1010MODE V_INTEL1010MODE(1U) 14538c2ecf20Sopenharmony_ci 14548c2ecf20Sopenharmony_ci#define A_ESPI_MAXBURST1_MAXBURST2 0x8a8 14558c2ecf20Sopenharmony_ci#define A_ESPI_TRAIN 0x8ac 14568c2ecf20Sopenharmony_ci 14578c2ecf20Sopenharmony_ci#define S_MAXTRAINALPHA 0 14588c2ecf20Sopenharmony_ci#define M_MAXTRAINALPHA 0xffff 14598c2ecf20Sopenharmony_ci#define V_MAXTRAINALPHA(x) ((x) << S_MAXTRAINALPHA) 14608c2ecf20Sopenharmony_ci#define G_MAXTRAINALPHA(x) (((x) >> S_MAXTRAINALPHA) & M_MAXTRAINALPHA) 14618c2ecf20Sopenharmony_ci 14628c2ecf20Sopenharmony_ci#define S_MAXTRAINDATA 16 14638c2ecf20Sopenharmony_ci#define M_MAXTRAINDATA 0xffff 14648c2ecf20Sopenharmony_ci#define V_MAXTRAINDATA(x) ((x) << S_MAXTRAINDATA) 14658c2ecf20Sopenharmony_ci#define G_MAXTRAINDATA(x) (((x) >> S_MAXTRAINDATA) & M_MAXTRAINDATA) 14668c2ecf20Sopenharmony_ci 14678c2ecf20Sopenharmony_ci#define A_RAM_STATUS 0x8b0 14688c2ecf20Sopenharmony_ci 14698c2ecf20Sopenharmony_ci#define S_RXFIFOPARITYERROR 0 14708c2ecf20Sopenharmony_ci#define M_RXFIFOPARITYERROR 0x3ff 14718c2ecf20Sopenharmony_ci#define V_RXFIFOPARITYERROR(x) ((x) << S_RXFIFOPARITYERROR) 14728c2ecf20Sopenharmony_ci#define G_RXFIFOPARITYERROR(x) (((x) >> S_RXFIFOPARITYERROR) & M_RXFIFOPARITYERROR) 14738c2ecf20Sopenharmony_ci 14748c2ecf20Sopenharmony_ci#define S_TXFIFOPARITYERROR 10 14758c2ecf20Sopenharmony_ci#define M_TXFIFOPARITYERROR 0x3ff 14768c2ecf20Sopenharmony_ci#define V_TXFIFOPARITYERROR(x) ((x) << S_TXFIFOPARITYERROR) 14778c2ecf20Sopenharmony_ci#define G_TXFIFOPARITYERROR(x) (((x) >> S_TXFIFOPARITYERROR) & M_TXFIFOPARITYERROR) 14788c2ecf20Sopenharmony_ci 14798c2ecf20Sopenharmony_ci#define S_RXFIFOOVERFLOW 20 14808c2ecf20Sopenharmony_ci#define M_RXFIFOOVERFLOW 0x3ff 14818c2ecf20Sopenharmony_ci#define V_RXFIFOOVERFLOW(x) ((x) << S_RXFIFOOVERFLOW) 14828c2ecf20Sopenharmony_ci#define G_RXFIFOOVERFLOW(x) (((x) >> S_RXFIFOOVERFLOW) & M_RXFIFOOVERFLOW) 14838c2ecf20Sopenharmony_ci 14848c2ecf20Sopenharmony_ci#define A_TX_DROP_COUNT0 0x8b4 14858c2ecf20Sopenharmony_ci 14868c2ecf20Sopenharmony_ci#define S_TXPORT0DROPCNT 0 14878c2ecf20Sopenharmony_ci#define M_TXPORT0DROPCNT 0xffff 14888c2ecf20Sopenharmony_ci#define V_TXPORT0DROPCNT(x) ((x) << S_TXPORT0DROPCNT) 14898c2ecf20Sopenharmony_ci#define G_TXPORT0DROPCNT(x) (((x) >> S_TXPORT0DROPCNT) & M_TXPORT0DROPCNT) 14908c2ecf20Sopenharmony_ci 14918c2ecf20Sopenharmony_ci#define S_TXPORT1DROPCNT 16 14928c2ecf20Sopenharmony_ci#define M_TXPORT1DROPCNT 0xffff 14938c2ecf20Sopenharmony_ci#define V_TXPORT1DROPCNT(x) ((x) << S_TXPORT1DROPCNT) 14948c2ecf20Sopenharmony_ci#define G_TXPORT1DROPCNT(x) (((x) >> S_TXPORT1DROPCNT) & M_TXPORT1DROPCNT) 14958c2ecf20Sopenharmony_ci 14968c2ecf20Sopenharmony_ci#define A_TX_DROP_COUNT1 0x8b8 14978c2ecf20Sopenharmony_ci 14988c2ecf20Sopenharmony_ci#define S_TXPORT2DROPCNT 0 14998c2ecf20Sopenharmony_ci#define M_TXPORT2DROPCNT 0xffff 15008c2ecf20Sopenharmony_ci#define V_TXPORT2DROPCNT(x) ((x) << S_TXPORT2DROPCNT) 15018c2ecf20Sopenharmony_ci#define G_TXPORT2DROPCNT(x) (((x) >> S_TXPORT2DROPCNT) & M_TXPORT2DROPCNT) 15028c2ecf20Sopenharmony_ci 15038c2ecf20Sopenharmony_ci#define S_TXPORT3DROPCNT 16 15048c2ecf20Sopenharmony_ci#define M_TXPORT3DROPCNT 0xffff 15058c2ecf20Sopenharmony_ci#define V_TXPORT3DROPCNT(x) ((x) << S_TXPORT3DROPCNT) 15068c2ecf20Sopenharmony_ci#define G_TXPORT3DROPCNT(x) (((x) >> S_TXPORT3DROPCNT) & M_TXPORT3DROPCNT) 15078c2ecf20Sopenharmony_ci 15088c2ecf20Sopenharmony_ci#define A_RX_DROP_COUNT0 0x8bc 15098c2ecf20Sopenharmony_ci 15108c2ecf20Sopenharmony_ci#define S_RXPORT0DROPCNT 0 15118c2ecf20Sopenharmony_ci#define M_RXPORT0DROPCNT 0xffff 15128c2ecf20Sopenharmony_ci#define V_RXPORT0DROPCNT(x) ((x) << S_RXPORT0DROPCNT) 15138c2ecf20Sopenharmony_ci#define G_RXPORT0DROPCNT(x) (((x) >> S_RXPORT0DROPCNT) & M_RXPORT0DROPCNT) 15148c2ecf20Sopenharmony_ci 15158c2ecf20Sopenharmony_ci#define S_RXPORT1DROPCNT 16 15168c2ecf20Sopenharmony_ci#define M_RXPORT1DROPCNT 0xffff 15178c2ecf20Sopenharmony_ci#define V_RXPORT1DROPCNT(x) ((x) << S_RXPORT1DROPCNT) 15188c2ecf20Sopenharmony_ci#define G_RXPORT1DROPCNT(x) (((x) >> S_RXPORT1DROPCNT) & M_RXPORT1DROPCNT) 15198c2ecf20Sopenharmony_ci 15208c2ecf20Sopenharmony_ci#define A_RX_DROP_COUNT1 0x8c0 15218c2ecf20Sopenharmony_ci 15228c2ecf20Sopenharmony_ci#define S_RXPORT2DROPCNT 0 15238c2ecf20Sopenharmony_ci#define M_RXPORT2DROPCNT 0xffff 15248c2ecf20Sopenharmony_ci#define V_RXPORT2DROPCNT(x) ((x) << S_RXPORT2DROPCNT) 15258c2ecf20Sopenharmony_ci#define G_RXPORT2DROPCNT(x) (((x) >> S_RXPORT2DROPCNT) & M_RXPORT2DROPCNT) 15268c2ecf20Sopenharmony_ci 15278c2ecf20Sopenharmony_ci#define S_RXPORT3DROPCNT 16 15288c2ecf20Sopenharmony_ci#define M_RXPORT3DROPCNT 0xffff 15298c2ecf20Sopenharmony_ci#define V_RXPORT3DROPCNT(x) ((x) << S_RXPORT3DROPCNT) 15308c2ecf20Sopenharmony_ci#define G_RXPORT3DROPCNT(x) (((x) >> S_RXPORT3DROPCNT) & M_RXPORT3DROPCNT) 15318c2ecf20Sopenharmony_ci 15328c2ecf20Sopenharmony_ci#define A_DIP4_ERROR_COUNT 0x8c4 15338c2ecf20Sopenharmony_ci 15348c2ecf20Sopenharmony_ci#define S_DIP4ERRORCNT 0 15358c2ecf20Sopenharmony_ci#define M_DIP4ERRORCNT 0xfff 15368c2ecf20Sopenharmony_ci#define V_DIP4ERRORCNT(x) ((x) << S_DIP4ERRORCNT) 15378c2ecf20Sopenharmony_ci#define G_DIP4ERRORCNT(x) (((x) >> S_DIP4ERRORCNT) & M_DIP4ERRORCNT) 15388c2ecf20Sopenharmony_ci 15398c2ecf20Sopenharmony_ci#define S_DIP4ERRORCNTSHADOW 12 15408c2ecf20Sopenharmony_ci#define M_DIP4ERRORCNTSHADOW 0xfff 15418c2ecf20Sopenharmony_ci#define V_DIP4ERRORCNTSHADOW(x) ((x) << S_DIP4ERRORCNTSHADOW) 15428c2ecf20Sopenharmony_ci#define G_DIP4ERRORCNTSHADOW(x) (((x) >> S_DIP4ERRORCNTSHADOW) & M_DIP4ERRORCNTSHADOW) 15438c2ecf20Sopenharmony_ci 15448c2ecf20Sopenharmony_ci#define S_TRICN_RX_TRAIN_ERR 24 15458c2ecf20Sopenharmony_ci#define V_TRICN_RX_TRAIN_ERR(x) ((x) << S_TRICN_RX_TRAIN_ERR) 15468c2ecf20Sopenharmony_ci#define F_TRICN_RX_TRAIN_ERR V_TRICN_RX_TRAIN_ERR(1U) 15478c2ecf20Sopenharmony_ci 15488c2ecf20Sopenharmony_ci#define S_TRICN_RX_TRAINING 25 15498c2ecf20Sopenharmony_ci#define V_TRICN_RX_TRAINING(x) ((x) << S_TRICN_RX_TRAINING) 15508c2ecf20Sopenharmony_ci#define F_TRICN_RX_TRAINING V_TRICN_RX_TRAINING(1U) 15518c2ecf20Sopenharmony_ci 15528c2ecf20Sopenharmony_ci#define S_TRICN_RX_TRAIN_OK 26 15538c2ecf20Sopenharmony_ci#define V_TRICN_RX_TRAIN_OK(x) ((x) << S_TRICN_RX_TRAIN_OK) 15548c2ecf20Sopenharmony_ci#define F_TRICN_RX_TRAIN_OK V_TRICN_RX_TRAIN_OK(1U) 15558c2ecf20Sopenharmony_ci 15568c2ecf20Sopenharmony_ci#define A_ESPI_INTR_STATUS 0x8c8 15578c2ecf20Sopenharmony_ci 15588c2ecf20Sopenharmony_ci#define S_DIP2PARITYERR 5 15598c2ecf20Sopenharmony_ci#define V_DIP2PARITYERR(x) ((x) << S_DIP2PARITYERR) 15608c2ecf20Sopenharmony_ci#define F_DIP2PARITYERR V_DIP2PARITYERR(1U) 15618c2ecf20Sopenharmony_ci 15628c2ecf20Sopenharmony_ci#define A_ESPI_INTR_ENABLE 0x8cc 15638c2ecf20Sopenharmony_ci#define A_RX_DROP_THRESHOLD 0x8d0 15648c2ecf20Sopenharmony_ci#define A_ESPI_RX_RESET 0x8ec 15658c2ecf20Sopenharmony_ci 15668c2ecf20Sopenharmony_ci#define S_ESPI_RX_LNK_RST 0 15678c2ecf20Sopenharmony_ci#define V_ESPI_RX_LNK_RST(x) ((x) << S_ESPI_RX_LNK_RST) 15688c2ecf20Sopenharmony_ci#define F_ESPI_RX_LNK_RST V_ESPI_RX_LNK_RST(1U) 15698c2ecf20Sopenharmony_ci 15708c2ecf20Sopenharmony_ci#define S_ESPI_RX_CORE_RST 1 15718c2ecf20Sopenharmony_ci#define V_ESPI_RX_CORE_RST(x) ((x) << S_ESPI_RX_CORE_RST) 15728c2ecf20Sopenharmony_ci#define F_ESPI_RX_CORE_RST V_ESPI_RX_CORE_RST(1U) 15738c2ecf20Sopenharmony_ci 15748c2ecf20Sopenharmony_ci#define S_RX_CLK_STATUS 2 15758c2ecf20Sopenharmony_ci#define V_RX_CLK_STATUS(x) ((x) << S_RX_CLK_STATUS) 15768c2ecf20Sopenharmony_ci#define F_RX_CLK_STATUS V_RX_CLK_STATUS(1U) 15778c2ecf20Sopenharmony_ci 15788c2ecf20Sopenharmony_ci#define A_ESPI_MISC_CONTROL 0x8f0 15798c2ecf20Sopenharmony_ci 15808c2ecf20Sopenharmony_ci#define S_OUT_OF_SYNC_COUNT 0 15818c2ecf20Sopenharmony_ci#define M_OUT_OF_SYNC_COUNT 0xf 15828c2ecf20Sopenharmony_ci#define V_OUT_OF_SYNC_COUNT(x) ((x) << S_OUT_OF_SYNC_COUNT) 15838c2ecf20Sopenharmony_ci#define G_OUT_OF_SYNC_COUNT(x) (((x) >> S_OUT_OF_SYNC_COUNT) & M_OUT_OF_SYNC_COUNT) 15848c2ecf20Sopenharmony_ci 15858c2ecf20Sopenharmony_ci#define S_DIP2_COUNT_MODE_ENABLE 4 15868c2ecf20Sopenharmony_ci#define V_DIP2_COUNT_MODE_ENABLE(x) ((x) << S_DIP2_COUNT_MODE_ENABLE) 15878c2ecf20Sopenharmony_ci#define F_DIP2_COUNT_MODE_ENABLE V_DIP2_COUNT_MODE_ENABLE(1U) 15888c2ecf20Sopenharmony_ci 15898c2ecf20Sopenharmony_ci#define S_DIP2_PARITY_ERR_THRES 5 15908c2ecf20Sopenharmony_ci#define M_DIP2_PARITY_ERR_THRES 0xf 15918c2ecf20Sopenharmony_ci#define V_DIP2_PARITY_ERR_THRES(x) ((x) << S_DIP2_PARITY_ERR_THRES) 15928c2ecf20Sopenharmony_ci#define G_DIP2_PARITY_ERR_THRES(x) (((x) >> S_DIP2_PARITY_ERR_THRES) & M_DIP2_PARITY_ERR_THRES) 15938c2ecf20Sopenharmony_ci 15948c2ecf20Sopenharmony_ci#define S_DIP4_THRES 9 15958c2ecf20Sopenharmony_ci#define M_DIP4_THRES 0xfff 15968c2ecf20Sopenharmony_ci#define V_DIP4_THRES(x) ((x) << S_DIP4_THRES) 15978c2ecf20Sopenharmony_ci#define G_DIP4_THRES(x) (((x) >> S_DIP4_THRES) & M_DIP4_THRES) 15988c2ecf20Sopenharmony_ci 15998c2ecf20Sopenharmony_ci#define S_DIP4_THRES_ENABLE 21 16008c2ecf20Sopenharmony_ci#define V_DIP4_THRES_ENABLE(x) ((x) << S_DIP4_THRES_ENABLE) 16018c2ecf20Sopenharmony_ci#define F_DIP4_THRES_ENABLE V_DIP4_THRES_ENABLE(1U) 16028c2ecf20Sopenharmony_ci 16038c2ecf20Sopenharmony_ci#define S_FORCE_DISABLE_STATUS 22 16048c2ecf20Sopenharmony_ci#define V_FORCE_DISABLE_STATUS(x) ((x) << S_FORCE_DISABLE_STATUS) 16058c2ecf20Sopenharmony_ci#define F_FORCE_DISABLE_STATUS V_FORCE_DISABLE_STATUS(1U) 16068c2ecf20Sopenharmony_ci 16078c2ecf20Sopenharmony_ci#define S_DYNAMIC_DESKEW 23 16088c2ecf20Sopenharmony_ci#define V_DYNAMIC_DESKEW(x) ((x) << S_DYNAMIC_DESKEW) 16098c2ecf20Sopenharmony_ci#define F_DYNAMIC_DESKEW V_DYNAMIC_DESKEW(1U) 16108c2ecf20Sopenharmony_ci 16118c2ecf20Sopenharmony_ci#define S_MONITORED_PORT_NUM 25 16128c2ecf20Sopenharmony_ci#define M_MONITORED_PORT_NUM 0x3 16138c2ecf20Sopenharmony_ci#define V_MONITORED_PORT_NUM(x) ((x) << S_MONITORED_PORT_NUM) 16148c2ecf20Sopenharmony_ci#define G_MONITORED_PORT_NUM(x) (((x) >> S_MONITORED_PORT_NUM) & M_MONITORED_PORT_NUM) 16158c2ecf20Sopenharmony_ci 16168c2ecf20Sopenharmony_ci#define S_MONITORED_DIRECTION 27 16178c2ecf20Sopenharmony_ci#define V_MONITORED_DIRECTION(x) ((x) << S_MONITORED_DIRECTION) 16188c2ecf20Sopenharmony_ci#define F_MONITORED_DIRECTION V_MONITORED_DIRECTION(1U) 16198c2ecf20Sopenharmony_ci 16208c2ecf20Sopenharmony_ci#define S_MONITORED_INTERFACE 28 16218c2ecf20Sopenharmony_ci#define V_MONITORED_INTERFACE(x) ((x) << S_MONITORED_INTERFACE) 16228c2ecf20Sopenharmony_ci#define F_MONITORED_INTERFACE V_MONITORED_INTERFACE(1U) 16238c2ecf20Sopenharmony_ci 16248c2ecf20Sopenharmony_ci#define A_ESPI_DIP2_ERR_COUNT 0x8f4 16258c2ecf20Sopenharmony_ci 16268c2ecf20Sopenharmony_ci#define S_DIP2_ERR_CNT 0 16278c2ecf20Sopenharmony_ci#define M_DIP2_ERR_CNT 0xf 16288c2ecf20Sopenharmony_ci#define V_DIP2_ERR_CNT(x) ((x) << S_DIP2_ERR_CNT) 16298c2ecf20Sopenharmony_ci#define G_DIP2_ERR_CNT(x) (((x) >> S_DIP2_ERR_CNT) & M_DIP2_ERR_CNT) 16308c2ecf20Sopenharmony_ci 16318c2ecf20Sopenharmony_ci#define A_ESPI_CMD_ADDR 0x8f8 16328c2ecf20Sopenharmony_ci 16338c2ecf20Sopenharmony_ci#define S_WRITE_DATA 0 16348c2ecf20Sopenharmony_ci#define M_WRITE_DATA 0xff 16358c2ecf20Sopenharmony_ci#define V_WRITE_DATA(x) ((x) << S_WRITE_DATA) 16368c2ecf20Sopenharmony_ci#define G_WRITE_DATA(x) (((x) >> S_WRITE_DATA) & M_WRITE_DATA) 16378c2ecf20Sopenharmony_ci 16388c2ecf20Sopenharmony_ci#define S_REGISTER_OFFSET 8 16398c2ecf20Sopenharmony_ci#define M_REGISTER_OFFSET 0xf 16408c2ecf20Sopenharmony_ci#define V_REGISTER_OFFSET(x) ((x) << S_REGISTER_OFFSET) 16418c2ecf20Sopenharmony_ci#define G_REGISTER_OFFSET(x) (((x) >> S_REGISTER_OFFSET) & M_REGISTER_OFFSET) 16428c2ecf20Sopenharmony_ci 16438c2ecf20Sopenharmony_ci#define S_CHANNEL_ADDR 12 16448c2ecf20Sopenharmony_ci#define M_CHANNEL_ADDR 0xf 16458c2ecf20Sopenharmony_ci#define V_CHANNEL_ADDR(x) ((x) << S_CHANNEL_ADDR) 16468c2ecf20Sopenharmony_ci#define G_CHANNEL_ADDR(x) (((x) >> S_CHANNEL_ADDR) & M_CHANNEL_ADDR) 16478c2ecf20Sopenharmony_ci 16488c2ecf20Sopenharmony_ci#define S_MODULE_ADDR 16 16498c2ecf20Sopenharmony_ci#define M_MODULE_ADDR 0x3 16508c2ecf20Sopenharmony_ci#define V_MODULE_ADDR(x) ((x) << S_MODULE_ADDR) 16518c2ecf20Sopenharmony_ci#define G_MODULE_ADDR(x) (((x) >> S_MODULE_ADDR) & M_MODULE_ADDR) 16528c2ecf20Sopenharmony_ci 16538c2ecf20Sopenharmony_ci#define S_BUNDLE_ADDR 20 16548c2ecf20Sopenharmony_ci#define M_BUNDLE_ADDR 0x3 16558c2ecf20Sopenharmony_ci#define V_BUNDLE_ADDR(x) ((x) << S_BUNDLE_ADDR) 16568c2ecf20Sopenharmony_ci#define G_BUNDLE_ADDR(x) (((x) >> S_BUNDLE_ADDR) & M_BUNDLE_ADDR) 16578c2ecf20Sopenharmony_ci 16588c2ecf20Sopenharmony_ci#define S_SPI4_COMMAND 24 16598c2ecf20Sopenharmony_ci#define M_SPI4_COMMAND 0xff 16608c2ecf20Sopenharmony_ci#define V_SPI4_COMMAND(x) ((x) << S_SPI4_COMMAND) 16618c2ecf20Sopenharmony_ci#define G_SPI4_COMMAND(x) (((x) >> S_SPI4_COMMAND) & M_SPI4_COMMAND) 16628c2ecf20Sopenharmony_ci 16638c2ecf20Sopenharmony_ci#define A_ESPI_GOSTAT 0x8fc 16648c2ecf20Sopenharmony_ci 16658c2ecf20Sopenharmony_ci#define S_READ_DATA 0 16668c2ecf20Sopenharmony_ci#define M_READ_DATA 0xff 16678c2ecf20Sopenharmony_ci#define V_READ_DATA(x) ((x) << S_READ_DATA) 16688c2ecf20Sopenharmony_ci#define G_READ_DATA(x) (((x) >> S_READ_DATA) & M_READ_DATA) 16698c2ecf20Sopenharmony_ci 16708c2ecf20Sopenharmony_ci#define S_ESPI_CMD_BUSY 8 16718c2ecf20Sopenharmony_ci#define V_ESPI_CMD_BUSY(x) ((x) << S_ESPI_CMD_BUSY) 16728c2ecf20Sopenharmony_ci#define F_ESPI_CMD_BUSY V_ESPI_CMD_BUSY(1U) 16738c2ecf20Sopenharmony_ci 16748c2ecf20Sopenharmony_ci#define S_ERROR_ACK 9 16758c2ecf20Sopenharmony_ci#define V_ERROR_ACK(x) ((x) << S_ERROR_ACK) 16768c2ecf20Sopenharmony_ci#define F_ERROR_ACK V_ERROR_ACK(1U) 16778c2ecf20Sopenharmony_ci 16788c2ecf20Sopenharmony_ci#define S_UNMAPPED_ERR 10 16798c2ecf20Sopenharmony_ci#define V_UNMAPPED_ERR(x) ((x) << S_UNMAPPED_ERR) 16808c2ecf20Sopenharmony_ci#define F_UNMAPPED_ERR V_UNMAPPED_ERR(1U) 16818c2ecf20Sopenharmony_ci 16828c2ecf20Sopenharmony_ci#define S_TRANSACTION_TIMER 16 16838c2ecf20Sopenharmony_ci#define M_TRANSACTION_TIMER 0xff 16848c2ecf20Sopenharmony_ci#define V_TRANSACTION_TIMER(x) ((x) << S_TRANSACTION_TIMER) 16858c2ecf20Sopenharmony_ci#define G_TRANSACTION_TIMER(x) (((x) >> S_TRANSACTION_TIMER) & M_TRANSACTION_TIMER) 16868c2ecf20Sopenharmony_ci 16878c2ecf20Sopenharmony_ci 16888c2ecf20Sopenharmony_ci/* ULP registers */ 16898c2ecf20Sopenharmony_ci#define A_ULP_ULIMIT 0x980 16908c2ecf20Sopenharmony_ci#define A_ULP_TAGMASK 0x984 16918c2ecf20Sopenharmony_ci#define A_ULP_HREG_INDEX 0x988 16928c2ecf20Sopenharmony_ci#define A_ULP_HREG_DATA 0x98c 16938c2ecf20Sopenharmony_ci#define A_ULP_INT_ENABLE 0x990 16948c2ecf20Sopenharmony_ci#define A_ULP_INT_CAUSE 0x994 16958c2ecf20Sopenharmony_ci 16968c2ecf20Sopenharmony_ci#define S_HREG_PAR_ERR 0 16978c2ecf20Sopenharmony_ci#define V_HREG_PAR_ERR(x) ((x) << S_HREG_PAR_ERR) 16988c2ecf20Sopenharmony_ci#define F_HREG_PAR_ERR V_HREG_PAR_ERR(1U) 16998c2ecf20Sopenharmony_ci 17008c2ecf20Sopenharmony_ci#define S_EGRS_DATA_PAR_ERR 1 17018c2ecf20Sopenharmony_ci#define V_EGRS_DATA_PAR_ERR(x) ((x) << S_EGRS_DATA_PAR_ERR) 17028c2ecf20Sopenharmony_ci#define F_EGRS_DATA_PAR_ERR V_EGRS_DATA_PAR_ERR(1U) 17038c2ecf20Sopenharmony_ci 17048c2ecf20Sopenharmony_ci#define S_INGRS_DATA_PAR_ERR 2 17058c2ecf20Sopenharmony_ci#define V_INGRS_DATA_PAR_ERR(x) ((x) << S_INGRS_DATA_PAR_ERR) 17068c2ecf20Sopenharmony_ci#define F_INGRS_DATA_PAR_ERR V_INGRS_DATA_PAR_ERR(1U) 17078c2ecf20Sopenharmony_ci 17088c2ecf20Sopenharmony_ci#define S_PM_INTR 3 17098c2ecf20Sopenharmony_ci#define V_PM_INTR(x) ((x) << S_PM_INTR) 17108c2ecf20Sopenharmony_ci#define F_PM_INTR V_PM_INTR(1U) 17118c2ecf20Sopenharmony_ci 17128c2ecf20Sopenharmony_ci#define S_PM_E2C_SYNC_ERR 4 17138c2ecf20Sopenharmony_ci#define V_PM_E2C_SYNC_ERR(x) ((x) << S_PM_E2C_SYNC_ERR) 17148c2ecf20Sopenharmony_ci#define F_PM_E2C_SYNC_ERR V_PM_E2C_SYNC_ERR(1U) 17158c2ecf20Sopenharmony_ci 17168c2ecf20Sopenharmony_ci#define S_PM_C2E_SYNC_ERR 5 17178c2ecf20Sopenharmony_ci#define V_PM_C2E_SYNC_ERR(x) ((x) << S_PM_C2E_SYNC_ERR) 17188c2ecf20Sopenharmony_ci#define F_PM_C2E_SYNC_ERR V_PM_C2E_SYNC_ERR(1U) 17198c2ecf20Sopenharmony_ci 17208c2ecf20Sopenharmony_ci#define S_PM_E2C_EMPTY_ERR 6 17218c2ecf20Sopenharmony_ci#define V_PM_E2C_EMPTY_ERR(x) ((x) << S_PM_E2C_EMPTY_ERR) 17228c2ecf20Sopenharmony_ci#define F_PM_E2C_EMPTY_ERR V_PM_E2C_EMPTY_ERR(1U) 17238c2ecf20Sopenharmony_ci 17248c2ecf20Sopenharmony_ci#define S_PM_C2E_EMPTY_ERR 7 17258c2ecf20Sopenharmony_ci#define V_PM_C2E_EMPTY_ERR(x) ((x) << S_PM_C2E_EMPTY_ERR) 17268c2ecf20Sopenharmony_ci#define F_PM_C2E_EMPTY_ERR V_PM_C2E_EMPTY_ERR(1U) 17278c2ecf20Sopenharmony_ci 17288c2ecf20Sopenharmony_ci#define S_PM_PAR_ERR 8 17298c2ecf20Sopenharmony_ci#define M_PM_PAR_ERR 0xffff 17308c2ecf20Sopenharmony_ci#define V_PM_PAR_ERR(x) ((x) << S_PM_PAR_ERR) 17318c2ecf20Sopenharmony_ci#define G_PM_PAR_ERR(x) (((x) >> S_PM_PAR_ERR) & M_PM_PAR_ERR) 17328c2ecf20Sopenharmony_ci 17338c2ecf20Sopenharmony_ci#define S_PM_E2C_WRT_FULL 24 17348c2ecf20Sopenharmony_ci#define V_PM_E2C_WRT_FULL(x) ((x) << S_PM_E2C_WRT_FULL) 17358c2ecf20Sopenharmony_ci#define F_PM_E2C_WRT_FULL V_PM_E2C_WRT_FULL(1U) 17368c2ecf20Sopenharmony_ci 17378c2ecf20Sopenharmony_ci#define S_PM_C2E_WRT_FULL 25 17388c2ecf20Sopenharmony_ci#define V_PM_C2E_WRT_FULL(x) ((x) << S_PM_C2E_WRT_FULL) 17398c2ecf20Sopenharmony_ci#define F_PM_C2E_WRT_FULL V_PM_C2E_WRT_FULL(1U) 17408c2ecf20Sopenharmony_ci 17418c2ecf20Sopenharmony_ci#define A_ULP_PIO_CTRL 0x998 17428c2ecf20Sopenharmony_ci 17438c2ecf20Sopenharmony_ci/* PL registers */ 17448c2ecf20Sopenharmony_ci#define A_PL_ENABLE 0xa00 17458c2ecf20Sopenharmony_ci 17468c2ecf20Sopenharmony_ci#define S_PL_INTR_SGE_ERR 0 17478c2ecf20Sopenharmony_ci#define V_PL_INTR_SGE_ERR(x) ((x) << S_PL_INTR_SGE_ERR) 17488c2ecf20Sopenharmony_ci#define F_PL_INTR_SGE_ERR V_PL_INTR_SGE_ERR(1U) 17498c2ecf20Sopenharmony_ci 17508c2ecf20Sopenharmony_ci#define S_PL_INTR_SGE_DATA 1 17518c2ecf20Sopenharmony_ci#define V_PL_INTR_SGE_DATA(x) ((x) << S_PL_INTR_SGE_DATA) 17528c2ecf20Sopenharmony_ci#define F_PL_INTR_SGE_DATA V_PL_INTR_SGE_DATA(1U) 17538c2ecf20Sopenharmony_ci 17548c2ecf20Sopenharmony_ci#define S_PL_INTR_MC3 2 17558c2ecf20Sopenharmony_ci#define V_PL_INTR_MC3(x) ((x) << S_PL_INTR_MC3) 17568c2ecf20Sopenharmony_ci#define F_PL_INTR_MC3 V_PL_INTR_MC3(1U) 17578c2ecf20Sopenharmony_ci 17588c2ecf20Sopenharmony_ci#define S_PL_INTR_MC4 3 17598c2ecf20Sopenharmony_ci#define V_PL_INTR_MC4(x) ((x) << S_PL_INTR_MC4) 17608c2ecf20Sopenharmony_ci#define F_PL_INTR_MC4 V_PL_INTR_MC4(1U) 17618c2ecf20Sopenharmony_ci 17628c2ecf20Sopenharmony_ci#define S_PL_INTR_MC5 4 17638c2ecf20Sopenharmony_ci#define V_PL_INTR_MC5(x) ((x) << S_PL_INTR_MC5) 17648c2ecf20Sopenharmony_ci#define F_PL_INTR_MC5 V_PL_INTR_MC5(1U) 17658c2ecf20Sopenharmony_ci 17668c2ecf20Sopenharmony_ci#define S_PL_INTR_RAT 5 17678c2ecf20Sopenharmony_ci#define V_PL_INTR_RAT(x) ((x) << S_PL_INTR_RAT) 17688c2ecf20Sopenharmony_ci#define F_PL_INTR_RAT V_PL_INTR_RAT(1U) 17698c2ecf20Sopenharmony_ci 17708c2ecf20Sopenharmony_ci#define S_PL_INTR_TP 6 17718c2ecf20Sopenharmony_ci#define V_PL_INTR_TP(x) ((x) << S_PL_INTR_TP) 17728c2ecf20Sopenharmony_ci#define F_PL_INTR_TP V_PL_INTR_TP(1U) 17738c2ecf20Sopenharmony_ci 17748c2ecf20Sopenharmony_ci#define S_PL_INTR_ULP 7 17758c2ecf20Sopenharmony_ci#define V_PL_INTR_ULP(x) ((x) << S_PL_INTR_ULP) 17768c2ecf20Sopenharmony_ci#define F_PL_INTR_ULP V_PL_INTR_ULP(1U) 17778c2ecf20Sopenharmony_ci 17788c2ecf20Sopenharmony_ci#define S_PL_INTR_ESPI 8 17798c2ecf20Sopenharmony_ci#define V_PL_INTR_ESPI(x) ((x) << S_PL_INTR_ESPI) 17808c2ecf20Sopenharmony_ci#define F_PL_INTR_ESPI V_PL_INTR_ESPI(1U) 17818c2ecf20Sopenharmony_ci 17828c2ecf20Sopenharmony_ci#define S_PL_INTR_CSPI 9 17838c2ecf20Sopenharmony_ci#define V_PL_INTR_CSPI(x) ((x) << S_PL_INTR_CSPI) 17848c2ecf20Sopenharmony_ci#define F_PL_INTR_CSPI V_PL_INTR_CSPI(1U) 17858c2ecf20Sopenharmony_ci 17868c2ecf20Sopenharmony_ci#define S_PL_INTR_PCIX 10 17878c2ecf20Sopenharmony_ci#define V_PL_INTR_PCIX(x) ((x) << S_PL_INTR_PCIX) 17888c2ecf20Sopenharmony_ci#define F_PL_INTR_PCIX V_PL_INTR_PCIX(1U) 17898c2ecf20Sopenharmony_ci 17908c2ecf20Sopenharmony_ci#define S_PL_INTR_EXT 11 17918c2ecf20Sopenharmony_ci#define V_PL_INTR_EXT(x) ((x) << S_PL_INTR_EXT) 17928c2ecf20Sopenharmony_ci#define F_PL_INTR_EXT V_PL_INTR_EXT(1U) 17938c2ecf20Sopenharmony_ci 17948c2ecf20Sopenharmony_ci#define A_PL_CAUSE 0xa04 17958c2ecf20Sopenharmony_ci 17968c2ecf20Sopenharmony_ci/* MC5 registers */ 17978c2ecf20Sopenharmony_ci#define A_MC5_CONFIG 0xc04 17988c2ecf20Sopenharmony_ci 17998c2ecf20Sopenharmony_ci#define S_MODE 0 18008c2ecf20Sopenharmony_ci#define V_MODE(x) ((x) << S_MODE) 18018c2ecf20Sopenharmony_ci#define F_MODE V_MODE(1U) 18028c2ecf20Sopenharmony_ci 18038c2ecf20Sopenharmony_ci#define S_TCAM_RESET 1 18048c2ecf20Sopenharmony_ci#define V_TCAM_RESET(x) ((x) << S_TCAM_RESET) 18058c2ecf20Sopenharmony_ci#define F_TCAM_RESET V_TCAM_RESET(1U) 18068c2ecf20Sopenharmony_ci 18078c2ecf20Sopenharmony_ci#define S_TCAM_READY 2 18088c2ecf20Sopenharmony_ci#define V_TCAM_READY(x) ((x) << S_TCAM_READY) 18098c2ecf20Sopenharmony_ci#define F_TCAM_READY V_TCAM_READY(1U) 18108c2ecf20Sopenharmony_ci 18118c2ecf20Sopenharmony_ci#define S_DBGI_ENABLE 4 18128c2ecf20Sopenharmony_ci#define V_DBGI_ENABLE(x) ((x) << S_DBGI_ENABLE) 18138c2ecf20Sopenharmony_ci#define F_DBGI_ENABLE V_DBGI_ENABLE(1U) 18148c2ecf20Sopenharmony_ci 18158c2ecf20Sopenharmony_ci#define S_M_BUS_ENABLE 5 18168c2ecf20Sopenharmony_ci#define V_M_BUS_ENABLE(x) ((x) << S_M_BUS_ENABLE) 18178c2ecf20Sopenharmony_ci#define F_M_BUS_ENABLE V_M_BUS_ENABLE(1U) 18188c2ecf20Sopenharmony_ci 18198c2ecf20Sopenharmony_ci#define S_PARITY_ENABLE 6 18208c2ecf20Sopenharmony_ci#define V_PARITY_ENABLE(x) ((x) << S_PARITY_ENABLE) 18218c2ecf20Sopenharmony_ci#define F_PARITY_ENABLE V_PARITY_ENABLE(1U) 18228c2ecf20Sopenharmony_ci 18238c2ecf20Sopenharmony_ci#define S_SYN_ISSUE_MODE 7 18248c2ecf20Sopenharmony_ci#define M_SYN_ISSUE_MODE 0x3 18258c2ecf20Sopenharmony_ci#define V_SYN_ISSUE_MODE(x) ((x) << S_SYN_ISSUE_MODE) 18268c2ecf20Sopenharmony_ci#define G_SYN_ISSUE_MODE(x) (((x) >> S_SYN_ISSUE_MODE) & M_SYN_ISSUE_MODE) 18278c2ecf20Sopenharmony_ci 18288c2ecf20Sopenharmony_ci#define S_BUILD 16 18298c2ecf20Sopenharmony_ci#define V_BUILD(x) ((x) << S_BUILD) 18308c2ecf20Sopenharmony_ci#define F_BUILD V_BUILD(1U) 18318c2ecf20Sopenharmony_ci 18328c2ecf20Sopenharmony_ci#define S_COMPRESSION_ENABLE 17 18338c2ecf20Sopenharmony_ci#define V_COMPRESSION_ENABLE(x) ((x) << S_COMPRESSION_ENABLE) 18348c2ecf20Sopenharmony_ci#define F_COMPRESSION_ENABLE V_COMPRESSION_ENABLE(1U) 18358c2ecf20Sopenharmony_ci 18368c2ecf20Sopenharmony_ci#define S_NUM_LIP 18 18378c2ecf20Sopenharmony_ci#define M_NUM_LIP 0x3f 18388c2ecf20Sopenharmony_ci#define V_NUM_LIP(x) ((x) << S_NUM_LIP) 18398c2ecf20Sopenharmony_ci#define G_NUM_LIP(x) (((x) >> S_NUM_LIP) & M_NUM_LIP) 18408c2ecf20Sopenharmony_ci 18418c2ecf20Sopenharmony_ci#define S_TCAM_PART_CNT 24 18428c2ecf20Sopenharmony_ci#define M_TCAM_PART_CNT 0x3 18438c2ecf20Sopenharmony_ci#define V_TCAM_PART_CNT(x) ((x) << S_TCAM_PART_CNT) 18448c2ecf20Sopenharmony_ci#define G_TCAM_PART_CNT(x) (((x) >> S_TCAM_PART_CNT) & M_TCAM_PART_CNT) 18458c2ecf20Sopenharmony_ci 18468c2ecf20Sopenharmony_ci#define S_TCAM_PART_TYPE 26 18478c2ecf20Sopenharmony_ci#define M_TCAM_PART_TYPE 0x3 18488c2ecf20Sopenharmony_ci#define V_TCAM_PART_TYPE(x) ((x) << S_TCAM_PART_TYPE) 18498c2ecf20Sopenharmony_ci#define G_TCAM_PART_TYPE(x) (((x) >> S_TCAM_PART_TYPE) & M_TCAM_PART_TYPE) 18508c2ecf20Sopenharmony_ci 18518c2ecf20Sopenharmony_ci#define S_TCAM_PART_SIZE 28 18528c2ecf20Sopenharmony_ci#define M_TCAM_PART_SIZE 0x3 18538c2ecf20Sopenharmony_ci#define V_TCAM_PART_SIZE(x) ((x) << S_TCAM_PART_SIZE) 18548c2ecf20Sopenharmony_ci#define G_TCAM_PART_SIZE(x) (((x) >> S_TCAM_PART_SIZE) & M_TCAM_PART_SIZE) 18558c2ecf20Sopenharmony_ci 18568c2ecf20Sopenharmony_ci#define S_TCAM_PART_TYPE_HI 30 18578c2ecf20Sopenharmony_ci#define V_TCAM_PART_TYPE_HI(x) ((x) << S_TCAM_PART_TYPE_HI) 18588c2ecf20Sopenharmony_ci#define F_TCAM_PART_TYPE_HI V_TCAM_PART_TYPE_HI(1U) 18598c2ecf20Sopenharmony_ci 18608c2ecf20Sopenharmony_ci#define A_MC5_SIZE 0xc08 18618c2ecf20Sopenharmony_ci 18628c2ecf20Sopenharmony_ci#define S_SIZE 0 18638c2ecf20Sopenharmony_ci#define M_SIZE 0x3fffff 18648c2ecf20Sopenharmony_ci#define V_SIZE(x) ((x) << S_SIZE) 18658c2ecf20Sopenharmony_ci#define G_SIZE(x) (((x) >> S_SIZE) & M_SIZE) 18668c2ecf20Sopenharmony_ci 18678c2ecf20Sopenharmony_ci#define A_MC5_ROUTING_TABLE_INDEX 0xc0c 18688c2ecf20Sopenharmony_ci 18698c2ecf20Sopenharmony_ci#define S_START_OF_ROUTING_TABLE 0 18708c2ecf20Sopenharmony_ci#define M_START_OF_ROUTING_TABLE 0x3fffff 18718c2ecf20Sopenharmony_ci#define V_START_OF_ROUTING_TABLE(x) ((x) << S_START_OF_ROUTING_TABLE) 18728c2ecf20Sopenharmony_ci#define G_START_OF_ROUTING_TABLE(x) (((x) >> S_START_OF_ROUTING_TABLE) & M_START_OF_ROUTING_TABLE) 18738c2ecf20Sopenharmony_ci 18748c2ecf20Sopenharmony_ci#define A_MC5_SERVER_INDEX 0xc14 18758c2ecf20Sopenharmony_ci 18768c2ecf20Sopenharmony_ci#define S_START_OF_SERVER_INDEX 0 18778c2ecf20Sopenharmony_ci#define M_START_OF_SERVER_INDEX 0x3fffff 18788c2ecf20Sopenharmony_ci#define V_START_OF_SERVER_INDEX(x) ((x) << S_START_OF_SERVER_INDEX) 18798c2ecf20Sopenharmony_ci#define G_START_OF_SERVER_INDEX(x) (((x) >> S_START_OF_SERVER_INDEX) & M_START_OF_SERVER_INDEX) 18808c2ecf20Sopenharmony_ci 18818c2ecf20Sopenharmony_ci#define A_MC5_LIP_RAM_ADDR 0xc18 18828c2ecf20Sopenharmony_ci 18838c2ecf20Sopenharmony_ci#define S_LOCAL_IP_RAM_ADDR 0 18848c2ecf20Sopenharmony_ci#define M_LOCAL_IP_RAM_ADDR 0x3f 18858c2ecf20Sopenharmony_ci#define V_LOCAL_IP_RAM_ADDR(x) ((x) << S_LOCAL_IP_RAM_ADDR) 18868c2ecf20Sopenharmony_ci#define G_LOCAL_IP_RAM_ADDR(x) (((x) >> S_LOCAL_IP_RAM_ADDR) & M_LOCAL_IP_RAM_ADDR) 18878c2ecf20Sopenharmony_ci 18888c2ecf20Sopenharmony_ci#define S_RAM_WRITE_ENABLE 8 18898c2ecf20Sopenharmony_ci#define V_RAM_WRITE_ENABLE(x) ((x) << S_RAM_WRITE_ENABLE) 18908c2ecf20Sopenharmony_ci#define F_RAM_WRITE_ENABLE V_RAM_WRITE_ENABLE(1U) 18918c2ecf20Sopenharmony_ci 18928c2ecf20Sopenharmony_ci#define A_MC5_LIP_RAM_DATA 0xc1c 18938c2ecf20Sopenharmony_ci#define A_MC5_RSP_LATENCY 0xc20 18948c2ecf20Sopenharmony_ci 18958c2ecf20Sopenharmony_ci#define S_SEARCH_RESPONSE_LATENCY 0 18968c2ecf20Sopenharmony_ci#define M_SEARCH_RESPONSE_LATENCY 0x1f 18978c2ecf20Sopenharmony_ci#define V_SEARCH_RESPONSE_LATENCY(x) ((x) << S_SEARCH_RESPONSE_LATENCY) 18988c2ecf20Sopenharmony_ci#define G_SEARCH_RESPONSE_LATENCY(x) (((x) >> S_SEARCH_RESPONSE_LATENCY) & M_SEARCH_RESPONSE_LATENCY) 18998c2ecf20Sopenharmony_ci 19008c2ecf20Sopenharmony_ci#define S_LEARN_RESPONSE_LATENCY 8 19018c2ecf20Sopenharmony_ci#define M_LEARN_RESPONSE_LATENCY 0x1f 19028c2ecf20Sopenharmony_ci#define V_LEARN_RESPONSE_LATENCY(x) ((x) << S_LEARN_RESPONSE_LATENCY) 19038c2ecf20Sopenharmony_ci#define G_LEARN_RESPONSE_LATENCY(x) (((x) >> S_LEARN_RESPONSE_LATENCY) & M_LEARN_RESPONSE_LATENCY) 19048c2ecf20Sopenharmony_ci 19058c2ecf20Sopenharmony_ci#define A_MC5_PARITY_LATENCY 0xc24 19068c2ecf20Sopenharmony_ci 19078c2ecf20Sopenharmony_ci#define S_SRCHLAT 0 19088c2ecf20Sopenharmony_ci#define M_SRCHLAT 0x1f 19098c2ecf20Sopenharmony_ci#define V_SRCHLAT(x) ((x) << S_SRCHLAT) 19108c2ecf20Sopenharmony_ci#define G_SRCHLAT(x) (((x) >> S_SRCHLAT) & M_SRCHLAT) 19118c2ecf20Sopenharmony_ci 19128c2ecf20Sopenharmony_ci#define S_PARLAT 8 19138c2ecf20Sopenharmony_ci#define M_PARLAT 0x1f 19148c2ecf20Sopenharmony_ci#define V_PARLAT(x) ((x) << S_PARLAT) 19158c2ecf20Sopenharmony_ci#define G_PARLAT(x) (((x) >> S_PARLAT) & M_PARLAT) 19168c2ecf20Sopenharmony_ci 19178c2ecf20Sopenharmony_ci#define A_MC5_WR_LRN_VERIFY 0xc28 19188c2ecf20Sopenharmony_ci 19198c2ecf20Sopenharmony_ci#define S_POVEREN 0 19208c2ecf20Sopenharmony_ci#define V_POVEREN(x) ((x) << S_POVEREN) 19218c2ecf20Sopenharmony_ci#define F_POVEREN V_POVEREN(1U) 19228c2ecf20Sopenharmony_ci 19238c2ecf20Sopenharmony_ci#define S_LRNVEREN 1 19248c2ecf20Sopenharmony_ci#define V_LRNVEREN(x) ((x) << S_LRNVEREN) 19258c2ecf20Sopenharmony_ci#define F_LRNVEREN V_LRNVEREN(1U) 19268c2ecf20Sopenharmony_ci 19278c2ecf20Sopenharmony_ci#define S_VWVEREN 2 19288c2ecf20Sopenharmony_ci#define V_VWVEREN(x) ((x) << S_VWVEREN) 19298c2ecf20Sopenharmony_ci#define F_VWVEREN V_VWVEREN(1U) 19308c2ecf20Sopenharmony_ci 19318c2ecf20Sopenharmony_ci#define A_MC5_PART_ID_INDEX 0xc2c 19328c2ecf20Sopenharmony_ci 19338c2ecf20Sopenharmony_ci#define S_IDINDEX 0 19348c2ecf20Sopenharmony_ci#define M_IDINDEX 0xf 19358c2ecf20Sopenharmony_ci#define V_IDINDEX(x) ((x) << S_IDINDEX) 19368c2ecf20Sopenharmony_ci#define G_IDINDEX(x) (((x) >> S_IDINDEX) & M_IDINDEX) 19378c2ecf20Sopenharmony_ci 19388c2ecf20Sopenharmony_ci#define A_MC5_RESET_MAX 0xc30 19398c2ecf20Sopenharmony_ci 19408c2ecf20Sopenharmony_ci#define S_RSTMAX 0 19418c2ecf20Sopenharmony_ci#define M_RSTMAX 0x1ff 19428c2ecf20Sopenharmony_ci#define V_RSTMAX(x) ((x) << S_RSTMAX) 19438c2ecf20Sopenharmony_ci#define G_RSTMAX(x) (((x) >> S_RSTMAX) & M_RSTMAX) 19448c2ecf20Sopenharmony_ci 19458c2ecf20Sopenharmony_ci#define A_MC5_INT_ENABLE 0xc40 19468c2ecf20Sopenharmony_ci 19478c2ecf20Sopenharmony_ci#define S_MC5_INT_HIT_OUT_ACTIVE_REGION_ERR 0 19488c2ecf20Sopenharmony_ci#define V_MC5_INT_HIT_OUT_ACTIVE_REGION_ERR(x) ((x) << S_MC5_INT_HIT_OUT_ACTIVE_REGION_ERR) 19498c2ecf20Sopenharmony_ci#define F_MC5_INT_HIT_OUT_ACTIVE_REGION_ERR V_MC5_INT_HIT_OUT_ACTIVE_REGION_ERR(1U) 19508c2ecf20Sopenharmony_ci 19518c2ecf20Sopenharmony_ci#define S_MC5_INT_HIT_IN_ACTIVE_REGION_ERR 1 19528c2ecf20Sopenharmony_ci#define V_MC5_INT_HIT_IN_ACTIVE_REGION_ERR(x) ((x) << S_MC5_INT_HIT_IN_ACTIVE_REGION_ERR) 19538c2ecf20Sopenharmony_ci#define F_MC5_INT_HIT_IN_ACTIVE_REGION_ERR V_MC5_INT_HIT_IN_ACTIVE_REGION_ERR(1U) 19548c2ecf20Sopenharmony_ci 19558c2ecf20Sopenharmony_ci#define S_MC5_INT_HIT_IN_RT_REGION_ERR 2 19568c2ecf20Sopenharmony_ci#define V_MC5_INT_HIT_IN_RT_REGION_ERR(x) ((x) << S_MC5_INT_HIT_IN_RT_REGION_ERR) 19578c2ecf20Sopenharmony_ci#define F_MC5_INT_HIT_IN_RT_REGION_ERR V_MC5_INT_HIT_IN_RT_REGION_ERR(1U) 19588c2ecf20Sopenharmony_ci 19598c2ecf20Sopenharmony_ci#define S_MC5_INT_MISS_ERR 3 19608c2ecf20Sopenharmony_ci#define V_MC5_INT_MISS_ERR(x) ((x) << S_MC5_INT_MISS_ERR) 19618c2ecf20Sopenharmony_ci#define F_MC5_INT_MISS_ERR V_MC5_INT_MISS_ERR(1U) 19628c2ecf20Sopenharmony_ci 19638c2ecf20Sopenharmony_ci#define S_MC5_INT_LIP0_ERR 4 19648c2ecf20Sopenharmony_ci#define V_MC5_INT_LIP0_ERR(x) ((x) << S_MC5_INT_LIP0_ERR) 19658c2ecf20Sopenharmony_ci#define F_MC5_INT_LIP0_ERR V_MC5_INT_LIP0_ERR(1U) 19668c2ecf20Sopenharmony_ci 19678c2ecf20Sopenharmony_ci#define S_MC5_INT_LIP_MISS_ERR 5 19688c2ecf20Sopenharmony_ci#define V_MC5_INT_LIP_MISS_ERR(x) ((x) << S_MC5_INT_LIP_MISS_ERR) 19698c2ecf20Sopenharmony_ci#define F_MC5_INT_LIP_MISS_ERR V_MC5_INT_LIP_MISS_ERR(1U) 19708c2ecf20Sopenharmony_ci 19718c2ecf20Sopenharmony_ci#define S_MC5_INT_PARITY_ERR 6 19728c2ecf20Sopenharmony_ci#define V_MC5_INT_PARITY_ERR(x) ((x) << S_MC5_INT_PARITY_ERR) 19738c2ecf20Sopenharmony_ci#define F_MC5_INT_PARITY_ERR V_MC5_INT_PARITY_ERR(1U) 19748c2ecf20Sopenharmony_ci 19758c2ecf20Sopenharmony_ci#define S_MC5_INT_ACTIVE_REGION_FULL 7 19768c2ecf20Sopenharmony_ci#define V_MC5_INT_ACTIVE_REGION_FULL(x) ((x) << S_MC5_INT_ACTIVE_REGION_FULL) 19778c2ecf20Sopenharmony_ci#define F_MC5_INT_ACTIVE_REGION_FULL V_MC5_INT_ACTIVE_REGION_FULL(1U) 19788c2ecf20Sopenharmony_ci 19798c2ecf20Sopenharmony_ci#define S_MC5_INT_NFA_SRCH_ERR 8 19808c2ecf20Sopenharmony_ci#define V_MC5_INT_NFA_SRCH_ERR(x) ((x) << S_MC5_INT_NFA_SRCH_ERR) 19818c2ecf20Sopenharmony_ci#define F_MC5_INT_NFA_SRCH_ERR V_MC5_INT_NFA_SRCH_ERR(1U) 19828c2ecf20Sopenharmony_ci 19838c2ecf20Sopenharmony_ci#define S_MC5_INT_SYN_COOKIE 9 19848c2ecf20Sopenharmony_ci#define V_MC5_INT_SYN_COOKIE(x) ((x) << S_MC5_INT_SYN_COOKIE) 19858c2ecf20Sopenharmony_ci#define F_MC5_INT_SYN_COOKIE V_MC5_INT_SYN_COOKIE(1U) 19868c2ecf20Sopenharmony_ci 19878c2ecf20Sopenharmony_ci#define S_MC5_INT_SYN_COOKIE_BAD 10 19888c2ecf20Sopenharmony_ci#define V_MC5_INT_SYN_COOKIE_BAD(x) ((x) << S_MC5_INT_SYN_COOKIE_BAD) 19898c2ecf20Sopenharmony_ci#define F_MC5_INT_SYN_COOKIE_BAD V_MC5_INT_SYN_COOKIE_BAD(1U) 19908c2ecf20Sopenharmony_ci 19918c2ecf20Sopenharmony_ci#define S_MC5_INT_SYN_COOKIE_OFF 11 19928c2ecf20Sopenharmony_ci#define V_MC5_INT_SYN_COOKIE_OFF(x) ((x) << S_MC5_INT_SYN_COOKIE_OFF) 19938c2ecf20Sopenharmony_ci#define F_MC5_INT_SYN_COOKIE_OFF V_MC5_INT_SYN_COOKIE_OFF(1U) 19948c2ecf20Sopenharmony_ci 19958c2ecf20Sopenharmony_ci#define S_MC5_INT_UNKNOWN_CMD 15 19968c2ecf20Sopenharmony_ci#define V_MC5_INT_UNKNOWN_CMD(x) ((x) << S_MC5_INT_UNKNOWN_CMD) 19978c2ecf20Sopenharmony_ci#define F_MC5_INT_UNKNOWN_CMD V_MC5_INT_UNKNOWN_CMD(1U) 19988c2ecf20Sopenharmony_ci 19998c2ecf20Sopenharmony_ci#define S_MC5_INT_REQUESTQ_PARITY_ERR 16 20008c2ecf20Sopenharmony_ci#define V_MC5_INT_REQUESTQ_PARITY_ERR(x) ((x) << S_MC5_INT_REQUESTQ_PARITY_ERR) 20018c2ecf20Sopenharmony_ci#define F_MC5_INT_REQUESTQ_PARITY_ERR V_MC5_INT_REQUESTQ_PARITY_ERR(1U) 20028c2ecf20Sopenharmony_ci 20038c2ecf20Sopenharmony_ci#define S_MC5_INT_DISPATCHQ_PARITY_ERR 17 20048c2ecf20Sopenharmony_ci#define V_MC5_INT_DISPATCHQ_PARITY_ERR(x) ((x) << S_MC5_INT_DISPATCHQ_PARITY_ERR) 20058c2ecf20Sopenharmony_ci#define F_MC5_INT_DISPATCHQ_PARITY_ERR V_MC5_INT_DISPATCHQ_PARITY_ERR(1U) 20068c2ecf20Sopenharmony_ci 20078c2ecf20Sopenharmony_ci#define S_MC5_INT_DEL_ACT_EMPTY 18 20088c2ecf20Sopenharmony_ci#define V_MC5_INT_DEL_ACT_EMPTY(x) ((x) << S_MC5_INT_DEL_ACT_EMPTY) 20098c2ecf20Sopenharmony_ci#define F_MC5_INT_DEL_ACT_EMPTY V_MC5_INT_DEL_ACT_EMPTY(1U) 20108c2ecf20Sopenharmony_ci 20118c2ecf20Sopenharmony_ci#define A_MC5_INT_CAUSE 0xc44 20128c2ecf20Sopenharmony_ci#define A_MC5_INT_TID 0xc48 20138c2ecf20Sopenharmony_ci#define A_MC5_INT_PTID 0xc4c 20148c2ecf20Sopenharmony_ci#define A_MC5_DBGI_CONFIG 0xc74 20158c2ecf20Sopenharmony_ci#define A_MC5_DBGI_REQ_CMD 0xc78 20168c2ecf20Sopenharmony_ci 20178c2ecf20Sopenharmony_ci#define S_CMDMODE 0 20188c2ecf20Sopenharmony_ci#define M_CMDMODE 0x7 20198c2ecf20Sopenharmony_ci#define V_CMDMODE(x) ((x) << S_CMDMODE) 20208c2ecf20Sopenharmony_ci#define G_CMDMODE(x) (((x) >> S_CMDMODE) & M_CMDMODE) 20218c2ecf20Sopenharmony_ci 20228c2ecf20Sopenharmony_ci#define S_SADRSEL 4 20238c2ecf20Sopenharmony_ci#define V_SADRSEL(x) ((x) << S_SADRSEL) 20248c2ecf20Sopenharmony_ci#define F_SADRSEL V_SADRSEL(1U) 20258c2ecf20Sopenharmony_ci 20268c2ecf20Sopenharmony_ci#define S_WRITE_BURST_SIZE 22 20278c2ecf20Sopenharmony_ci#define M_WRITE_BURST_SIZE 0x3ff 20288c2ecf20Sopenharmony_ci#define V_WRITE_BURST_SIZE(x) ((x) << S_WRITE_BURST_SIZE) 20298c2ecf20Sopenharmony_ci#define G_WRITE_BURST_SIZE(x) (((x) >> S_WRITE_BURST_SIZE) & M_WRITE_BURST_SIZE) 20308c2ecf20Sopenharmony_ci 20318c2ecf20Sopenharmony_ci#define A_MC5_DBGI_REQ_ADDR0 0xc7c 20328c2ecf20Sopenharmony_ci#define A_MC5_DBGI_REQ_ADDR1 0xc80 20338c2ecf20Sopenharmony_ci#define A_MC5_DBGI_REQ_ADDR2 0xc84 20348c2ecf20Sopenharmony_ci#define A_MC5_DBGI_REQ_DATA0 0xc88 20358c2ecf20Sopenharmony_ci#define A_MC5_DBGI_REQ_DATA1 0xc8c 20368c2ecf20Sopenharmony_ci#define A_MC5_DBGI_REQ_DATA2 0xc90 20378c2ecf20Sopenharmony_ci#define A_MC5_DBGI_REQ_DATA3 0xc94 20388c2ecf20Sopenharmony_ci#define A_MC5_DBGI_REQ_DATA4 0xc98 20398c2ecf20Sopenharmony_ci#define A_MC5_DBGI_REQ_MASK0 0xc9c 20408c2ecf20Sopenharmony_ci#define A_MC5_DBGI_REQ_MASK1 0xca0 20418c2ecf20Sopenharmony_ci#define A_MC5_DBGI_REQ_MASK2 0xca4 20428c2ecf20Sopenharmony_ci#define A_MC5_DBGI_REQ_MASK3 0xca8 20438c2ecf20Sopenharmony_ci#define A_MC5_DBGI_REQ_MASK4 0xcac 20448c2ecf20Sopenharmony_ci#define A_MC5_DBGI_RSP_STATUS 0xcb0 20458c2ecf20Sopenharmony_ci 20468c2ecf20Sopenharmony_ci#define S_DBGI_RSP_VALID 0 20478c2ecf20Sopenharmony_ci#define V_DBGI_RSP_VALID(x) ((x) << S_DBGI_RSP_VALID) 20488c2ecf20Sopenharmony_ci#define F_DBGI_RSP_VALID V_DBGI_RSP_VALID(1U) 20498c2ecf20Sopenharmony_ci 20508c2ecf20Sopenharmony_ci#define S_DBGI_RSP_HIT 1 20518c2ecf20Sopenharmony_ci#define V_DBGI_RSP_HIT(x) ((x) << S_DBGI_RSP_HIT) 20528c2ecf20Sopenharmony_ci#define F_DBGI_RSP_HIT V_DBGI_RSP_HIT(1U) 20538c2ecf20Sopenharmony_ci 20548c2ecf20Sopenharmony_ci#define S_DBGI_RSP_ERR 2 20558c2ecf20Sopenharmony_ci#define V_DBGI_RSP_ERR(x) ((x) << S_DBGI_RSP_ERR) 20568c2ecf20Sopenharmony_ci#define F_DBGI_RSP_ERR V_DBGI_RSP_ERR(1U) 20578c2ecf20Sopenharmony_ci 20588c2ecf20Sopenharmony_ci#define S_DBGI_RSP_ERR_REASON 8 20598c2ecf20Sopenharmony_ci#define M_DBGI_RSP_ERR_REASON 0x7 20608c2ecf20Sopenharmony_ci#define V_DBGI_RSP_ERR_REASON(x) ((x) << S_DBGI_RSP_ERR_REASON) 20618c2ecf20Sopenharmony_ci#define G_DBGI_RSP_ERR_REASON(x) (((x) >> S_DBGI_RSP_ERR_REASON) & M_DBGI_RSP_ERR_REASON) 20628c2ecf20Sopenharmony_ci 20638c2ecf20Sopenharmony_ci#define A_MC5_DBGI_RSP_DATA0 0xcb4 20648c2ecf20Sopenharmony_ci#define A_MC5_DBGI_RSP_DATA1 0xcb8 20658c2ecf20Sopenharmony_ci#define A_MC5_DBGI_RSP_DATA2 0xcbc 20668c2ecf20Sopenharmony_ci#define A_MC5_DBGI_RSP_DATA3 0xcc0 20678c2ecf20Sopenharmony_ci#define A_MC5_DBGI_RSP_DATA4 0xcc4 20688c2ecf20Sopenharmony_ci#define A_MC5_DBGI_RSP_LAST_CMD 0xcc8 20698c2ecf20Sopenharmony_ci#define A_MC5_POPEN_DATA_WR_CMD 0xccc 20708c2ecf20Sopenharmony_ci#define A_MC5_POPEN_MASK_WR_CMD 0xcd0 20718c2ecf20Sopenharmony_ci#define A_MC5_AOPEN_SRCH_CMD 0xcd4 20728c2ecf20Sopenharmony_ci#define A_MC5_AOPEN_LRN_CMD 0xcd8 20738c2ecf20Sopenharmony_ci#define A_MC5_SYN_SRCH_CMD 0xcdc 20748c2ecf20Sopenharmony_ci#define A_MC5_SYN_LRN_CMD 0xce0 20758c2ecf20Sopenharmony_ci#define A_MC5_ACK_SRCH_CMD 0xce4 20768c2ecf20Sopenharmony_ci#define A_MC5_ACK_LRN_CMD 0xce8 20778c2ecf20Sopenharmony_ci#define A_MC5_ILOOKUP_CMD 0xcec 20788c2ecf20Sopenharmony_ci#define A_MC5_ELOOKUP_CMD 0xcf0 20798c2ecf20Sopenharmony_ci#define A_MC5_DATA_WRITE_CMD 0xcf4 20808c2ecf20Sopenharmony_ci#define A_MC5_DATA_READ_CMD 0xcf8 20818c2ecf20Sopenharmony_ci#define A_MC5_MASK_WRITE_CMD 0xcfc 20828c2ecf20Sopenharmony_ci 20838c2ecf20Sopenharmony_ci/* PCICFG registers */ 20848c2ecf20Sopenharmony_ci#define A_PCICFG_PM_CSR 0x44 20858c2ecf20Sopenharmony_ci#define A_PCICFG_VPD_ADDR 0x4a 20868c2ecf20Sopenharmony_ci 20878c2ecf20Sopenharmony_ci#define S_VPD_ADDR 0 20888c2ecf20Sopenharmony_ci#define M_VPD_ADDR 0x7fff 20898c2ecf20Sopenharmony_ci#define V_VPD_ADDR(x) ((x) << S_VPD_ADDR) 20908c2ecf20Sopenharmony_ci#define G_VPD_ADDR(x) (((x) >> S_VPD_ADDR) & M_VPD_ADDR) 20918c2ecf20Sopenharmony_ci 20928c2ecf20Sopenharmony_ci#define S_VPD_OP_FLAG 15 20938c2ecf20Sopenharmony_ci#define V_VPD_OP_FLAG(x) ((x) << S_VPD_OP_FLAG) 20948c2ecf20Sopenharmony_ci#define F_VPD_OP_FLAG V_VPD_OP_FLAG(1U) 20958c2ecf20Sopenharmony_ci 20968c2ecf20Sopenharmony_ci#define A_PCICFG_VPD_DATA 0x4c 20978c2ecf20Sopenharmony_ci#define A_PCICFG_PCIX_CMD 0x60 20988c2ecf20Sopenharmony_ci#define A_PCICFG_INTR_ENABLE 0xf4 20998c2ecf20Sopenharmony_ci 21008c2ecf20Sopenharmony_ci#define S_MASTER_PARITY_ERR 0 21018c2ecf20Sopenharmony_ci#define V_MASTER_PARITY_ERR(x) ((x) << S_MASTER_PARITY_ERR) 21028c2ecf20Sopenharmony_ci#define F_MASTER_PARITY_ERR V_MASTER_PARITY_ERR(1U) 21038c2ecf20Sopenharmony_ci 21048c2ecf20Sopenharmony_ci#define S_SIG_TARGET_ABORT 1 21058c2ecf20Sopenharmony_ci#define V_SIG_TARGET_ABORT(x) ((x) << S_SIG_TARGET_ABORT) 21068c2ecf20Sopenharmony_ci#define F_SIG_TARGET_ABORT V_SIG_TARGET_ABORT(1U) 21078c2ecf20Sopenharmony_ci 21088c2ecf20Sopenharmony_ci#define S_RCV_TARGET_ABORT 2 21098c2ecf20Sopenharmony_ci#define V_RCV_TARGET_ABORT(x) ((x) << S_RCV_TARGET_ABORT) 21108c2ecf20Sopenharmony_ci#define F_RCV_TARGET_ABORT V_RCV_TARGET_ABORT(1U) 21118c2ecf20Sopenharmony_ci 21128c2ecf20Sopenharmony_ci#define S_RCV_MASTER_ABORT 3 21138c2ecf20Sopenharmony_ci#define V_RCV_MASTER_ABORT(x) ((x) << S_RCV_MASTER_ABORT) 21148c2ecf20Sopenharmony_ci#define F_RCV_MASTER_ABORT V_RCV_MASTER_ABORT(1U) 21158c2ecf20Sopenharmony_ci 21168c2ecf20Sopenharmony_ci#define S_SIG_SYS_ERR 4 21178c2ecf20Sopenharmony_ci#define V_SIG_SYS_ERR(x) ((x) << S_SIG_SYS_ERR) 21188c2ecf20Sopenharmony_ci#define F_SIG_SYS_ERR V_SIG_SYS_ERR(1U) 21198c2ecf20Sopenharmony_ci 21208c2ecf20Sopenharmony_ci#define S_DET_PARITY_ERR 5 21218c2ecf20Sopenharmony_ci#define V_DET_PARITY_ERR(x) ((x) << S_DET_PARITY_ERR) 21228c2ecf20Sopenharmony_ci#define F_DET_PARITY_ERR V_DET_PARITY_ERR(1U) 21238c2ecf20Sopenharmony_ci 21248c2ecf20Sopenharmony_ci#define S_PIO_PARITY_ERR 6 21258c2ecf20Sopenharmony_ci#define V_PIO_PARITY_ERR(x) ((x) << S_PIO_PARITY_ERR) 21268c2ecf20Sopenharmony_ci#define F_PIO_PARITY_ERR V_PIO_PARITY_ERR(1U) 21278c2ecf20Sopenharmony_ci 21288c2ecf20Sopenharmony_ci#define S_WF_PARITY_ERR 7 21298c2ecf20Sopenharmony_ci#define V_WF_PARITY_ERR(x) ((x) << S_WF_PARITY_ERR) 21308c2ecf20Sopenharmony_ci#define F_WF_PARITY_ERR V_WF_PARITY_ERR(1U) 21318c2ecf20Sopenharmony_ci 21328c2ecf20Sopenharmony_ci#define S_RF_PARITY_ERR 8 21338c2ecf20Sopenharmony_ci#define M_RF_PARITY_ERR 0x3 21348c2ecf20Sopenharmony_ci#define V_RF_PARITY_ERR(x) ((x) << S_RF_PARITY_ERR) 21358c2ecf20Sopenharmony_ci#define G_RF_PARITY_ERR(x) (((x) >> S_RF_PARITY_ERR) & M_RF_PARITY_ERR) 21368c2ecf20Sopenharmony_ci 21378c2ecf20Sopenharmony_ci#define S_CF_PARITY_ERR 10 21388c2ecf20Sopenharmony_ci#define M_CF_PARITY_ERR 0x3 21398c2ecf20Sopenharmony_ci#define V_CF_PARITY_ERR(x) ((x) << S_CF_PARITY_ERR) 21408c2ecf20Sopenharmony_ci#define G_CF_PARITY_ERR(x) (((x) >> S_CF_PARITY_ERR) & M_CF_PARITY_ERR) 21418c2ecf20Sopenharmony_ci 21428c2ecf20Sopenharmony_ci#define A_PCICFG_INTR_CAUSE 0xf8 21438c2ecf20Sopenharmony_ci#define A_PCICFG_MODE 0xfc 21448c2ecf20Sopenharmony_ci 21458c2ecf20Sopenharmony_ci#define S_PCI_MODE_64BIT 0 21468c2ecf20Sopenharmony_ci#define V_PCI_MODE_64BIT(x) ((x) << S_PCI_MODE_64BIT) 21478c2ecf20Sopenharmony_ci#define F_PCI_MODE_64BIT V_PCI_MODE_64BIT(1U) 21488c2ecf20Sopenharmony_ci 21498c2ecf20Sopenharmony_ci#define S_PCI_MODE_66MHZ 1 21508c2ecf20Sopenharmony_ci#define V_PCI_MODE_66MHZ(x) ((x) << S_PCI_MODE_66MHZ) 21518c2ecf20Sopenharmony_ci#define F_PCI_MODE_66MHZ V_PCI_MODE_66MHZ(1U) 21528c2ecf20Sopenharmony_ci 21538c2ecf20Sopenharmony_ci#define S_PCI_MODE_PCIX_INITPAT 2 21548c2ecf20Sopenharmony_ci#define M_PCI_MODE_PCIX_INITPAT 0x7 21558c2ecf20Sopenharmony_ci#define V_PCI_MODE_PCIX_INITPAT(x) ((x) << S_PCI_MODE_PCIX_INITPAT) 21568c2ecf20Sopenharmony_ci#define G_PCI_MODE_PCIX_INITPAT(x) (((x) >> S_PCI_MODE_PCIX_INITPAT) & M_PCI_MODE_PCIX_INITPAT) 21578c2ecf20Sopenharmony_ci 21588c2ecf20Sopenharmony_ci#define S_PCI_MODE_PCIX 5 21598c2ecf20Sopenharmony_ci#define V_PCI_MODE_PCIX(x) ((x) << S_PCI_MODE_PCIX) 21608c2ecf20Sopenharmony_ci#define F_PCI_MODE_PCIX V_PCI_MODE_PCIX(1U) 21618c2ecf20Sopenharmony_ci 21628c2ecf20Sopenharmony_ci#define S_PCI_MODE_CLK 6 21638c2ecf20Sopenharmony_ci#define M_PCI_MODE_CLK 0x3 21648c2ecf20Sopenharmony_ci#define V_PCI_MODE_CLK(x) ((x) << S_PCI_MODE_CLK) 21658c2ecf20Sopenharmony_ci#define G_PCI_MODE_CLK(x) (((x) >> S_PCI_MODE_CLK) & M_PCI_MODE_CLK) 21668c2ecf20Sopenharmony_ci 21678c2ecf20Sopenharmony_ci#endif /* _CXGB_REGS_H_ */ 2168