162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */ 262306a36Sopenharmony_ci/***************************************************************************** 362306a36Sopenharmony_ci * * 462306a36Sopenharmony_ci * File: regs.h * 562306a36Sopenharmony_ci * $Revision: 1.8 $ * 662306a36Sopenharmony_ci * $Date: 2005/06/21 18:29:48 $ * 762306a36Sopenharmony_ci * Description: * 862306a36Sopenharmony_ci * part of the Chelsio 10Gb Ethernet Driver. * 962306a36Sopenharmony_ci * * 1062306a36Sopenharmony_ci * * 1162306a36Sopenharmony_ci * http://www.chelsio.com * 1262306a36Sopenharmony_ci * * 1362306a36Sopenharmony_ci * Copyright (c) 2003 - 2005 Chelsio Communications, Inc. * 1462306a36Sopenharmony_ci * All rights reserved. * 1562306a36Sopenharmony_ci * * 1662306a36Sopenharmony_ci * Maintainers: maintainers@chelsio.com * 1762306a36Sopenharmony_ci * * 1862306a36Sopenharmony_ci * Authors: Dimitrios Michailidis <dm@chelsio.com> * 1962306a36Sopenharmony_ci * Tina Yang <tainay@chelsio.com> * 2062306a36Sopenharmony_ci * Felix Marti <felix@chelsio.com> * 2162306a36Sopenharmony_ci * Scott Bardone <sbardone@chelsio.com> * 2262306a36Sopenharmony_ci * Kurt Ottaway <kottaway@chelsio.com> * 2362306a36Sopenharmony_ci * Frank DiMambro <frank@chelsio.com> * 2462306a36Sopenharmony_ci * * 2562306a36Sopenharmony_ci * History: * 2662306a36Sopenharmony_ci * * 2762306a36Sopenharmony_ci ****************************************************************************/ 2862306a36Sopenharmony_ci 2962306a36Sopenharmony_ci#ifndef _CXGB_REGS_H_ 3062306a36Sopenharmony_ci#define _CXGB_REGS_H_ 3162306a36Sopenharmony_ci 3262306a36Sopenharmony_ci/* SGE registers */ 3362306a36Sopenharmony_ci#define A_SG_CONTROL 0x0 3462306a36Sopenharmony_ci 3562306a36Sopenharmony_ci#define S_CMDQ0_ENABLE 0 3662306a36Sopenharmony_ci#define V_CMDQ0_ENABLE(x) ((x) << S_CMDQ0_ENABLE) 3762306a36Sopenharmony_ci#define F_CMDQ0_ENABLE V_CMDQ0_ENABLE(1U) 3862306a36Sopenharmony_ci 3962306a36Sopenharmony_ci#define S_CMDQ1_ENABLE 1 4062306a36Sopenharmony_ci#define V_CMDQ1_ENABLE(x) ((x) << S_CMDQ1_ENABLE) 4162306a36Sopenharmony_ci#define F_CMDQ1_ENABLE V_CMDQ1_ENABLE(1U) 4262306a36Sopenharmony_ci 4362306a36Sopenharmony_ci#define S_FL0_ENABLE 2 4462306a36Sopenharmony_ci#define V_FL0_ENABLE(x) ((x) << S_FL0_ENABLE) 4562306a36Sopenharmony_ci#define F_FL0_ENABLE V_FL0_ENABLE(1U) 4662306a36Sopenharmony_ci 4762306a36Sopenharmony_ci#define S_FL1_ENABLE 3 4862306a36Sopenharmony_ci#define V_FL1_ENABLE(x) ((x) << S_FL1_ENABLE) 4962306a36Sopenharmony_ci#define F_FL1_ENABLE V_FL1_ENABLE(1U) 5062306a36Sopenharmony_ci 5162306a36Sopenharmony_ci#define S_CPL_ENABLE 4 5262306a36Sopenharmony_ci#define V_CPL_ENABLE(x) ((x) << S_CPL_ENABLE) 5362306a36Sopenharmony_ci#define F_CPL_ENABLE V_CPL_ENABLE(1U) 5462306a36Sopenharmony_ci 5562306a36Sopenharmony_ci#define S_RESPONSE_QUEUE_ENABLE 5 5662306a36Sopenharmony_ci#define V_RESPONSE_QUEUE_ENABLE(x) ((x) << S_RESPONSE_QUEUE_ENABLE) 5762306a36Sopenharmony_ci#define F_RESPONSE_QUEUE_ENABLE V_RESPONSE_QUEUE_ENABLE(1U) 5862306a36Sopenharmony_ci 5962306a36Sopenharmony_ci#define S_CMDQ_PRIORITY 6 6062306a36Sopenharmony_ci#define M_CMDQ_PRIORITY 0x3 6162306a36Sopenharmony_ci#define V_CMDQ_PRIORITY(x) ((x) << S_CMDQ_PRIORITY) 6262306a36Sopenharmony_ci#define G_CMDQ_PRIORITY(x) (((x) >> S_CMDQ_PRIORITY) & M_CMDQ_PRIORITY) 6362306a36Sopenharmony_ci 6462306a36Sopenharmony_ci#define S_DISABLE_CMDQ0_GTS 8 6562306a36Sopenharmony_ci#define V_DISABLE_CMDQ0_GTS(x) ((x) << S_DISABLE_CMDQ0_GTS) 6662306a36Sopenharmony_ci#define F_DISABLE_CMDQ0_GTS V_DISABLE_CMDQ0_GTS(1U) 6762306a36Sopenharmony_ci 6862306a36Sopenharmony_ci#define S_DISABLE_CMDQ1_GTS 9 6962306a36Sopenharmony_ci#define V_DISABLE_CMDQ1_GTS(x) ((x) << S_DISABLE_CMDQ1_GTS) 7062306a36Sopenharmony_ci#define F_DISABLE_CMDQ1_GTS V_DISABLE_CMDQ1_GTS(1U) 7162306a36Sopenharmony_ci 7262306a36Sopenharmony_ci#define S_DISABLE_FL0_GTS 10 7362306a36Sopenharmony_ci#define V_DISABLE_FL0_GTS(x) ((x) << S_DISABLE_FL0_GTS) 7462306a36Sopenharmony_ci#define F_DISABLE_FL0_GTS V_DISABLE_FL0_GTS(1U) 7562306a36Sopenharmony_ci 7662306a36Sopenharmony_ci#define S_DISABLE_FL1_GTS 11 7762306a36Sopenharmony_ci#define V_DISABLE_FL1_GTS(x) ((x) << S_DISABLE_FL1_GTS) 7862306a36Sopenharmony_ci#define F_DISABLE_FL1_GTS V_DISABLE_FL1_GTS(1U) 7962306a36Sopenharmony_ci 8062306a36Sopenharmony_ci#define S_ENABLE_BIG_ENDIAN 12 8162306a36Sopenharmony_ci#define V_ENABLE_BIG_ENDIAN(x) ((x) << S_ENABLE_BIG_ENDIAN) 8262306a36Sopenharmony_ci#define F_ENABLE_BIG_ENDIAN V_ENABLE_BIG_ENDIAN(1U) 8362306a36Sopenharmony_ci 8462306a36Sopenharmony_ci#define S_FL_SELECTION_CRITERIA 13 8562306a36Sopenharmony_ci#define V_FL_SELECTION_CRITERIA(x) ((x) << S_FL_SELECTION_CRITERIA) 8662306a36Sopenharmony_ci#define F_FL_SELECTION_CRITERIA V_FL_SELECTION_CRITERIA(1U) 8762306a36Sopenharmony_ci 8862306a36Sopenharmony_ci#define S_ISCSI_COALESCE 14 8962306a36Sopenharmony_ci#define V_ISCSI_COALESCE(x) ((x) << S_ISCSI_COALESCE) 9062306a36Sopenharmony_ci#define F_ISCSI_COALESCE V_ISCSI_COALESCE(1U) 9162306a36Sopenharmony_ci 9262306a36Sopenharmony_ci#define S_RX_PKT_OFFSET 15 9362306a36Sopenharmony_ci#define M_RX_PKT_OFFSET 0x7 9462306a36Sopenharmony_ci#define V_RX_PKT_OFFSET(x) ((x) << S_RX_PKT_OFFSET) 9562306a36Sopenharmony_ci#define G_RX_PKT_OFFSET(x) (((x) >> S_RX_PKT_OFFSET) & M_RX_PKT_OFFSET) 9662306a36Sopenharmony_ci 9762306a36Sopenharmony_ci#define S_VLAN_XTRACT 18 9862306a36Sopenharmony_ci#define V_VLAN_XTRACT(x) ((x) << S_VLAN_XTRACT) 9962306a36Sopenharmony_ci#define F_VLAN_XTRACT V_VLAN_XTRACT(1U) 10062306a36Sopenharmony_ci 10162306a36Sopenharmony_ci#define A_SG_DOORBELL 0x4 10262306a36Sopenharmony_ci#define A_SG_CMD0BASELWR 0x8 10362306a36Sopenharmony_ci#define A_SG_CMD0BASEUPR 0xc 10462306a36Sopenharmony_ci#define A_SG_CMD1BASELWR 0x10 10562306a36Sopenharmony_ci#define A_SG_CMD1BASEUPR 0x14 10662306a36Sopenharmony_ci#define A_SG_FL0BASELWR 0x18 10762306a36Sopenharmony_ci#define A_SG_FL0BASEUPR 0x1c 10862306a36Sopenharmony_ci#define A_SG_FL1BASELWR 0x20 10962306a36Sopenharmony_ci#define A_SG_FL1BASEUPR 0x24 11062306a36Sopenharmony_ci#define A_SG_CMD0SIZE 0x28 11162306a36Sopenharmony_ci 11262306a36Sopenharmony_ci#define S_CMDQ0_SIZE 0 11362306a36Sopenharmony_ci#define M_CMDQ0_SIZE 0x1ffff 11462306a36Sopenharmony_ci#define V_CMDQ0_SIZE(x) ((x) << S_CMDQ0_SIZE) 11562306a36Sopenharmony_ci#define G_CMDQ0_SIZE(x) (((x) >> S_CMDQ0_SIZE) & M_CMDQ0_SIZE) 11662306a36Sopenharmony_ci 11762306a36Sopenharmony_ci#define A_SG_FL0SIZE 0x2c 11862306a36Sopenharmony_ci 11962306a36Sopenharmony_ci#define S_FL0_SIZE 0 12062306a36Sopenharmony_ci#define M_FL0_SIZE 0x1ffff 12162306a36Sopenharmony_ci#define V_FL0_SIZE(x) ((x) << S_FL0_SIZE) 12262306a36Sopenharmony_ci#define G_FL0_SIZE(x) (((x) >> S_FL0_SIZE) & M_FL0_SIZE) 12362306a36Sopenharmony_ci 12462306a36Sopenharmony_ci#define A_SG_RSPSIZE 0x30 12562306a36Sopenharmony_ci 12662306a36Sopenharmony_ci#define S_RESPQ_SIZE 0 12762306a36Sopenharmony_ci#define M_RESPQ_SIZE 0x1ffff 12862306a36Sopenharmony_ci#define V_RESPQ_SIZE(x) ((x) << S_RESPQ_SIZE) 12962306a36Sopenharmony_ci#define G_RESPQ_SIZE(x) (((x) >> S_RESPQ_SIZE) & M_RESPQ_SIZE) 13062306a36Sopenharmony_ci 13162306a36Sopenharmony_ci#define A_SG_RSPBASELWR 0x34 13262306a36Sopenharmony_ci#define A_SG_RSPBASEUPR 0x38 13362306a36Sopenharmony_ci#define A_SG_FLTHRESHOLD 0x3c 13462306a36Sopenharmony_ci 13562306a36Sopenharmony_ci#define S_FL_THRESHOLD 0 13662306a36Sopenharmony_ci#define M_FL_THRESHOLD 0xffff 13762306a36Sopenharmony_ci#define V_FL_THRESHOLD(x) ((x) << S_FL_THRESHOLD) 13862306a36Sopenharmony_ci#define G_FL_THRESHOLD(x) (((x) >> S_FL_THRESHOLD) & M_FL_THRESHOLD) 13962306a36Sopenharmony_ci 14062306a36Sopenharmony_ci#define A_SG_RSPQUEUECREDIT 0x40 14162306a36Sopenharmony_ci 14262306a36Sopenharmony_ci#define S_RESPQ_CREDIT 0 14362306a36Sopenharmony_ci#define M_RESPQ_CREDIT 0x1ffff 14462306a36Sopenharmony_ci#define V_RESPQ_CREDIT(x) ((x) << S_RESPQ_CREDIT) 14562306a36Sopenharmony_ci#define G_RESPQ_CREDIT(x) (((x) >> S_RESPQ_CREDIT) & M_RESPQ_CREDIT) 14662306a36Sopenharmony_ci 14762306a36Sopenharmony_ci#define A_SG_SLEEPING 0x48 14862306a36Sopenharmony_ci 14962306a36Sopenharmony_ci#define S_SLEEPING 0 15062306a36Sopenharmony_ci#define M_SLEEPING 0xffff 15162306a36Sopenharmony_ci#define V_SLEEPING(x) ((x) << S_SLEEPING) 15262306a36Sopenharmony_ci#define G_SLEEPING(x) (((x) >> S_SLEEPING) & M_SLEEPING) 15362306a36Sopenharmony_ci 15462306a36Sopenharmony_ci#define A_SG_INTRTIMER 0x4c 15562306a36Sopenharmony_ci 15662306a36Sopenharmony_ci#define S_INTERRUPT_TIMER_COUNT 0 15762306a36Sopenharmony_ci#define M_INTERRUPT_TIMER_COUNT 0xffffff 15862306a36Sopenharmony_ci#define V_INTERRUPT_TIMER_COUNT(x) ((x) << S_INTERRUPT_TIMER_COUNT) 15962306a36Sopenharmony_ci#define G_INTERRUPT_TIMER_COUNT(x) (((x) >> S_INTERRUPT_TIMER_COUNT) & M_INTERRUPT_TIMER_COUNT) 16062306a36Sopenharmony_ci 16162306a36Sopenharmony_ci#define A_SG_CMD0PTR 0x50 16262306a36Sopenharmony_ci 16362306a36Sopenharmony_ci#define S_CMDQ0_POINTER 0 16462306a36Sopenharmony_ci#define M_CMDQ0_POINTER 0xffff 16562306a36Sopenharmony_ci#define V_CMDQ0_POINTER(x) ((x) << S_CMDQ0_POINTER) 16662306a36Sopenharmony_ci#define G_CMDQ0_POINTER(x) (((x) >> S_CMDQ0_POINTER) & M_CMDQ0_POINTER) 16762306a36Sopenharmony_ci 16862306a36Sopenharmony_ci#define S_CURRENT_GENERATION_BIT 16 16962306a36Sopenharmony_ci#define V_CURRENT_GENERATION_BIT(x) ((x) << S_CURRENT_GENERATION_BIT) 17062306a36Sopenharmony_ci#define F_CURRENT_GENERATION_BIT V_CURRENT_GENERATION_BIT(1U) 17162306a36Sopenharmony_ci 17262306a36Sopenharmony_ci#define A_SG_CMD1PTR 0x54 17362306a36Sopenharmony_ci 17462306a36Sopenharmony_ci#define S_CMDQ1_POINTER 0 17562306a36Sopenharmony_ci#define M_CMDQ1_POINTER 0xffff 17662306a36Sopenharmony_ci#define V_CMDQ1_POINTER(x) ((x) << S_CMDQ1_POINTER) 17762306a36Sopenharmony_ci#define G_CMDQ1_POINTER(x) (((x) >> S_CMDQ1_POINTER) & M_CMDQ1_POINTER) 17862306a36Sopenharmony_ci 17962306a36Sopenharmony_ci#define A_SG_FL0PTR 0x58 18062306a36Sopenharmony_ci 18162306a36Sopenharmony_ci#define S_FL0_POINTER 0 18262306a36Sopenharmony_ci#define M_FL0_POINTER 0xffff 18362306a36Sopenharmony_ci#define V_FL0_POINTER(x) ((x) << S_FL0_POINTER) 18462306a36Sopenharmony_ci#define G_FL0_POINTER(x) (((x) >> S_FL0_POINTER) & M_FL0_POINTER) 18562306a36Sopenharmony_ci 18662306a36Sopenharmony_ci#define A_SG_FL1PTR 0x5c 18762306a36Sopenharmony_ci 18862306a36Sopenharmony_ci#define S_FL1_POINTER 0 18962306a36Sopenharmony_ci#define M_FL1_POINTER 0xffff 19062306a36Sopenharmony_ci#define V_FL1_POINTER(x) ((x) << S_FL1_POINTER) 19162306a36Sopenharmony_ci#define G_FL1_POINTER(x) (((x) >> S_FL1_POINTER) & M_FL1_POINTER) 19262306a36Sopenharmony_ci 19362306a36Sopenharmony_ci#define A_SG_VERSION 0x6c 19462306a36Sopenharmony_ci 19562306a36Sopenharmony_ci#define S_DAY 0 19662306a36Sopenharmony_ci#define M_DAY 0x1f 19762306a36Sopenharmony_ci#define V_DAY(x) ((x) << S_DAY) 19862306a36Sopenharmony_ci#define G_DAY(x) (((x) >> S_DAY) & M_DAY) 19962306a36Sopenharmony_ci 20062306a36Sopenharmony_ci#define S_MONTH 5 20162306a36Sopenharmony_ci#define M_MONTH 0xf 20262306a36Sopenharmony_ci#define V_MONTH(x) ((x) << S_MONTH) 20362306a36Sopenharmony_ci#define G_MONTH(x) (((x) >> S_MONTH) & M_MONTH) 20462306a36Sopenharmony_ci 20562306a36Sopenharmony_ci#define A_SG_CMD1SIZE 0xb0 20662306a36Sopenharmony_ci 20762306a36Sopenharmony_ci#define S_CMDQ1_SIZE 0 20862306a36Sopenharmony_ci#define M_CMDQ1_SIZE 0x1ffff 20962306a36Sopenharmony_ci#define V_CMDQ1_SIZE(x) ((x) << S_CMDQ1_SIZE) 21062306a36Sopenharmony_ci#define G_CMDQ1_SIZE(x) (((x) >> S_CMDQ1_SIZE) & M_CMDQ1_SIZE) 21162306a36Sopenharmony_ci 21262306a36Sopenharmony_ci#define A_SG_FL1SIZE 0xb4 21362306a36Sopenharmony_ci 21462306a36Sopenharmony_ci#define S_FL1_SIZE 0 21562306a36Sopenharmony_ci#define M_FL1_SIZE 0x1ffff 21662306a36Sopenharmony_ci#define V_FL1_SIZE(x) ((x) << S_FL1_SIZE) 21762306a36Sopenharmony_ci#define G_FL1_SIZE(x) (((x) >> S_FL1_SIZE) & M_FL1_SIZE) 21862306a36Sopenharmony_ci 21962306a36Sopenharmony_ci#define A_SG_INT_ENABLE 0xb8 22062306a36Sopenharmony_ci 22162306a36Sopenharmony_ci#define S_RESPQ_EXHAUSTED 0 22262306a36Sopenharmony_ci#define V_RESPQ_EXHAUSTED(x) ((x) << S_RESPQ_EXHAUSTED) 22362306a36Sopenharmony_ci#define F_RESPQ_EXHAUSTED V_RESPQ_EXHAUSTED(1U) 22462306a36Sopenharmony_ci 22562306a36Sopenharmony_ci#define S_RESPQ_OVERFLOW 1 22662306a36Sopenharmony_ci#define V_RESPQ_OVERFLOW(x) ((x) << S_RESPQ_OVERFLOW) 22762306a36Sopenharmony_ci#define F_RESPQ_OVERFLOW V_RESPQ_OVERFLOW(1U) 22862306a36Sopenharmony_ci 22962306a36Sopenharmony_ci#define S_FL_EXHAUSTED 2 23062306a36Sopenharmony_ci#define V_FL_EXHAUSTED(x) ((x) << S_FL_EXHAUSTED) 23162306a36Sopenharmony_ci#define F_FL_EXHAUSTED V_FL_EXHAUSTED(1U) 23262306a36Sopenharmony_ci 23362306a36Sopenharmony_ci#define S_PACKET_TOO_BIG 3 23462306a36Sopenharmony_ci#define V_PACKET_TOO_BIG(x) ((x) << S_PACKET_TOO_BIG) 23562306a36Sopenharmony_ci#define F_PACKET_TOO_BIG V_PACKET_TOO_BIG(1U) 23662306a36Sopenharmony_ci 23762306a36Sopenharmony_ci#define S_PACKET_MISMATCH 4 23862306a36Sopenharmony_ci#define V_PACKET_MISMATCH(x) ((x) << S_PACKET_MISMATCH) 23962306a36Sopenharmony_ci#define F_PACKET_MISMATCH V_PACKET_MISMATCH(1U) 24062306a36Sopenharmony_ci 24162306a36Sopenharmony_ci#define A_SG_INT_CAUSE 0xbc 24262306a36Sopenharmony_ci#define A_SG_RESPACCUTIMER 0xc0 24362306a36Sopenharmony_ci 24462306a36Sopenharmony_ci/* MC3 registers */ 24562306a36Sopenharmony_ci#define A_MC3_CFG 0x100 24662306a36Sopenharmony_ci 24762306a36Sopenharmony_ci#define S_CLK_ENABLE 0 24862306a36Sopenharmony_ci#define V_CLK_ENABLE(x) ((x) << S_CLK_ENABLE) 24962306a36Sopenharmony_ci#define F_CLK_ENABLE V_CLK_ENABLE(1U) 25062306a36Sopenharmony_ci 25162306a36Sopenharmony_ci#define S_READY 1 25262306a36Sopenharmony_ci#define V_READY(x) ((x) << S_READY) 25362306a36Sopenharmony_ci#define F_READY V_READY(1U) 25462306a36Sopenharmony_ci 25562306a36Sopenharmony_ci#define S_READ_TO_WRITE_DELAY 2 25662306a36Sopenharmony_ci#define M_READ_TO_WRITE_DELAY 0x7 25762306a36Sopenharmony_ci#define V_READ_TO_WRITE_DELAY(x) ((x) << S_READ_TO_WRITE_DELAY) 25862306a36Sopenharmony_ci#define G_READ_TO_WRITE_DELAY(x) (((x) >> S_READ_TO_WRITE_DELAY) & M_READ_TO_WRITE_DELAY) 25962306a36Sopenharmony_ci 26062306a36Sopenharmony_ci#define S_WRITE_TO_READ_DELAY 5 26162306a36Sopenharmony_ci#define M_WRITE_TO_READ_DELAY 0x7 26262306a36Sopenharmony_ci#define V_WRITE_TO_READ_DELAY(x) ((x) << S_WRITE_TO_READ_DELAY) 26362306a36Sopenharmony_ci#define G_WRITE_TO_READ_DELAY(x) (((x) >> S_WRITE_TO_READ_DELAY) & M_WRITE_TO_READ_DELAY) 26462306a36Sopenharmony_ci 26562306a36Sopenharmony_ci#define S_MC3_BANK_CYCLE 8 26662306a36Sopenharmony_ci#define M_MC3_BANK_CYCLE 0xf 26762306a36Sopenharmony_ci#define V_MC3_BANK_CYCLE(x) ((x) << S_MC3_BANK_CYCLE) 26862306a36Sopenharmony_ci#define G_MC3_BANK_CYCLE(x) (((x) >> S_MC3_BANK_CYCLE) & M_MC3_BANK_CYCLE) 26962306a36Sopenharmony_ci 27062306a36Sopenharmony_ci#define S_REFRESH_CYCLE 12 27162306a36Sopenharmony_ci#define M_REFRESH_CYCLE 0xf 27262306a36Sopenharmony_ci#define V_REFRESH_CYCLE(x) ((x) << S_REFRESH_CYCLE) 27362306a36Sopenharmony_ci#define G_REFRESH_CYCLE(x) (((x) >> S_REFRESH_CYCLE) & M_REFRESH_CYCLE) 27462306a36Sopenharmony_ci 27562306a36Sopenharmony_ci#define S_PRECHARGE_CYCLE 16 27662306a36Sopenharmony_ci#define M_PRECHARGE_CYCLE 0x3 27762306a36Sopenharmony_ci#define V_PRECHARGE_CYCLE(x) ((x) << S_PRECHARGE_CYCLE) 27862306a36Sopenharmony_ci#define G_PRECHARGE_CYCLE(x) (((x) >> S_PRECHARGE_CYCLE) & M_PRECHARGE_CYCLE) 27962306a36Sopenharmony_ci 28062306a36Sopenharmony_ci#define S_ACTIVE_TO_READ_WRITE_DELAY 18 28162306a36Sopenharmony_ci#define V_ACTIVE_TO_READ_WRITE_DELAY(x) ((x) << S_ACTIVE_TO_READ_WRITE_DELAY) 28262306a36Sopenharmony_ci#define F_ACTIVE_TO_READ_WRITE_DELAY V_ACTIVE_TO_READ_WRITE_DELAY(1U) 28362306a36Sopenharmony_ci 28462306a36Sopenharmony_ci#define S_ACTIVE_TO_PRECHARGE_DELAY 19 28562306a36Sopenharmony_ci#define M_ACTIVE_TO_PRECHARGE_DELAY 0x7 28662306a36Sopenharmony_ci#define V_ACTIVE_TO_PRECHARGE_DELAY(x) ((x) << S_ACTIVE_TO_PRECHARGE_DELAY) 28762306a36Sopenharmony_ci#define G_ACTIVE_TO_PRECHARGE_DELAY(x) (((x) >> S_ACTIVE_TO_PRECHARGE_DELAY) & M_ACTIVE_TO_PRECHARGE_DELAY) 28862306a36Sopenharmony_ci 28962306a36Sopenharmony_ci#define S_WRITE_RECOVERY_DELAY 22 29062306a36Sopenharmony_ci#define M_WRITE_RECOVERY_DELAY 0x3 29162306a36Sopenharmony_ci#define V_WRITE_RECOVERY_DELAY(x) ((x) << S_WRITE_RECOVERY_DELAY) 29262306a36Sopenharmony_ci#define G_WRITE_RECOVERY_DELAY(x) (((x) >> S_WRITE_RECOVERY_DELAY) & M_WRITE_RECOVERY_DELAY) 29362306a36Sopenharmony_ci 29462306a36Sopenharmony_ci#define S_DENSITY 24 29562306a36Sopenharmony_ci#define M_DENSITY 0x3 29662306a36Sopenharmony_ci#define V_DENSITY(x) ((x) << S_DENSITY) 29762306a36Sopenharmony_ci#define G_DENSITY(x) (((x) >> S_DENSITY) & M_DENSITY) 29862306a36Sopenharmony_ci 29962306a36Sopenharmony_ci#define S_ORGANIZATION 26 30062306a36Sopenharmony_ci#define V_ORGANIZATION(x) ((x) << S_ORGANIZATION) 30162306a36Sopenharmony_ci#define F_ORGANIZATION V_ORGANIZATION(1U) 30262306a36Sopenharmony_ci 30362306a36Sopenharmony_ci#define S_BANKS 27 30462306a36Sopenharmony_ci#define V_BANKS(x) ((x) << S_BANKS) 30562306a36Sopenharmony_ci#define F_BANKS V_BANKS(1U) 30662306a36Sopenharmony_ci 30762306a36Sopenharmony_ci#define S_UNREGISTERED 28 30862306a36Sopenharmony_ci#define V_UNREGISTERED(x) ((x) << S_UNREGISTERED) 30962306a36Sopenharmony_ci#define F_UNREGISTERED V_UNREGISTERED(1U) 31062306a36Sopenharmony_ci 31162306a36Sopenharmony_ci#define S_MC3_WIDTH 29 31262306a36Sopenharmony_ci#define M_MC3_WIDTH 0x3 31362306a36Sopenharmony_ci#define V_MC3_WIDTH(x) ((x) << S_MC3_WIDTH) 31462306a36Sopenharmony_ci#define G_MC3_WIDTH(x) (((x) >> S_MC3_WIDTH) & M_MC3_WIDTH) 31562306a36Sopenharmony_ci 31662306a36Sopenharmony_ci#define S_MC3_SLOW 31 31762306a36Sopenharmony_ci#define V_MC3_SLOW(x) ((x) << S_MC3_SLOW) 31862306a36Sopenharmony_ci#define F_MC3_SLOW V_MC3_SLOW(1U) 31962306a36Sopenharmony_ci 32062306a36Sopenharmony_ci#define A_MC3_MODE 0x104 32162306a36Sopenharmony_ci 32262306a36Sopenharmony_ci#define S_MC3_MODE 0 32362306a36Sopenharmony_ci#define M_MC3_MODE 0x3fff 32462306a36Sopenharmony_ci#define V_MC3_MODE(x) ((x) << S_MC3_MODE) 32562306a36Sopenharmony_ci#define G_MC3_MODE(x) (((x) >> S_MC3_MODE) & M_MC3_MODE) 32662306a36Sopenharmony_ci 32762306a36Sopenharmony_ci#define S_BUSY 31 32862306a36Sopenharmony_ci#define V_BUSY(x) ((x) << S_BUSY) 32962306a36Sopenharmony_ci#define F_BUSY V_BUSY(1U) 33062306a36Sopenharmony_ci 33162306a36Sopenharmony_ci#define A_MC3_EXT_MODE 0x108 33262306a36Sopenharmony_ci 33362306a36Sopenharmony_ci#define S_MC3_EXTENDED_MODE 0 33462306a36Sopenharmony_ci#define M_MC3_EXTENDED_MODE 0x3fff 33562306a36Sopenharmony_ci#define V_MC3_EXTENDED_MODE(x) ((x) << S_MC3_EXTENDED_MODE) 33662306a36Sopenharmony_ci#define G_MC3_EXTENDED_MODE(x) (((x) >> S_MC3_EXTENDED_MODE) & M_MC3_EXTENDED_MODE) 33762306a36Sopenharmony_ci 33862306a36Sopenharmony_ci#define A_MC3_PRECHARG 0x10c 33962306a36Sopenharmony_ci#define A_MC3_REFRESH 0x110 34062306a36Sopenharmony_ci 34162306a36Sopenharmony_ci#define S_REFRESH_ENABLE 0 34262306a36Sopenharmony_ci#define V_REFRESH_ENABLE(x) ((x) << S_REFRESH_ENABLE) 34362306a36Sopenharmony_ci#define F_REFRESH_ENABLE V_REFRESH_ENABLE(1U) 34462306a36Sopenharmony_ci 34562306a36Sopenharmony_ci#define S_REFRESH_DIVISOR 1 34662306a36Sopenharmony_ci#define M_REFRESH_DIVISOR 0x3fff 34762306a36Sopenharmony_ci#define V_REFRESH_DIVISOR(x) ((x) << S_REFRESH_DIVISOR) 34862306a36Sopenharmony_ci#define G_REFRESH_DIVISOR(x) (((x) >> S_REFRESH_DIVISOR) & M_REFRESH_DIVISOR) 34962306a36Sopenharmony_ci 35062306a36Sopenharmony_ci#define A_MC3_STROBE 0x114 35162306a36Sopenharmony_ci 35262306a36Sopenharmony_ci#define S_MASTER_DLL_RESET 0 35362306a36Sopenharmony_ci#define V_MASTER_DLL_RESET(x) ((x) << S_MASTER_DLL_RESET) 35462306a36Sopenharmony_ci#define F_MASTER_DLL_RESET V_MASTER_DLL_RESET(1U) 35562306a36Sopenharmony_ci 35662306a36Sopenharmony_ci#define S_MASTER_DLL_TAP_COUNT 1 35762306a36Sopenharmony_ci#define M_MASTER_DLL_TAP_COUNT 0xff 35862306a36Sopenharmony_ci#define V_MASTER_DLL_TAP_COUNT(x) ((x) << S_MASTER_DLL_TAP_COUNT) 35962306a36Sopenharmony_ci#define G_MASTER_DLL_TAP_COUNT(x) (((x) >> S_MASTER_DLL_TAP_COUNT) & M_MASTER_DLL_TAP_COUNT) 36062306a36Sopenharmony_ci 36162306a36Sopenharmony_ci#define S_MASTER_DLL_LOCKED 9 36262306a36Sopenharmony_ci#define V_MASTER_DLL_LOCKED(x) ((x) << S_MASTER_DLL_LOCKED) 36362306a36Sopenharmony_ci#define F_MASTER_DLL_LOCKED V_MASTER_DLL_LOCKED(1U) 36462306a36Sopenharmony_ci 36562306a36Sopenharmony_ci#define S_MASTER_DLL_MAX_TAP_COUNT 10 36662306a36Sopenharmony_ci#define V_MASTER_DLL_MAX_TAP_COUNT(x) ((x) << S_MASTER_DLL_MAX_TAP_COUNT) 36762306a36Sopenharmony_ci#define F_MASTER_DLL_MAX_TAP_COUNT V_MASTER_DLL_MAX_TAP_COUNT(1U) 36862306a36Sopenharmony_ci 36962306a36Sopenharmony_ci#define S_MASTER_DLL_TAP_COUNT_OFFSET 11 37062306a36Sopenharmony_ci#define M_MASTER_DLL_TAP_COUNT_OFFSET 0x3f 37162306a36Sopenharmony_ci#define V_MASTER_DLL_TAP_COUNT_OFFSET(x) ((x) << S_MASTER_DLL_TAP_COUNT_OFFSET) 37262306a36Sopenharmony_ci#define G_MASTER_DLL_TAP_COUNT_OFFSET(x) (((x) >> S_MASTER_DLL_TAP_COUNT_OFFSET) & M_MASTER_DLL_TAP_COUNT_OFFSET) 37362306a36Sopenharmony_ci 37462306a36Sopenharmony_ci#define S_SLAVE_DLL_RESET 11 37562306a36Sopenharmony_ci#define V_SLAVE_DLL_RESET(x) ((x) << S_SLAVE_DLL_RESET) 37662306a36Sopenharmony_ci#define F_SLAVE_DLL_RESET V_SLAVE_DLL_RESET(1U) 37762306a36Sopenharmony_ci 37862306a36Sopenharmony_ci#define S_SLAVE_DLL_DELTA 12 37962306a36Sopenharmony_ci#define M_SLAVE_DLL_DELTA 0xf 38062306a36Sopenharmony_ci#define V_SLAVE_DLL_DELTA(x) ((x) << S_SLAVE_DLL_DELTA) 38162306a36Sopenharmony_ci#define G_SLAVE_DLL_DELTA(x) (((x) >> S_SLAVE_DLL_DELTA) & M_SLAVE_DLL_DELTA) 38262306a36Sopenharmony_ci 38362306a36Sopenharmony_ci#define S_SLAVE_DELAY_LINE_MANUAL_TAP_COUNT 17 38462306a36Sopenharmony_ci#define M_SLAVE_DELAY_LINE_MANUAL_TAP_COUNT 0x3f 38562306a36Sopenharmony_ci#define V_SLAVE_DELAY_LINE_MANUAL_TAP_COUNT(x) ((x) << S_SLAVE_DELAY_LINE_MANUAL_TAP_COUNT) 38662306a36Sopenharmony_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) 38762306a36Sopenharmony_ci 38862306a36Sopenharmony_ci#define S_SLAVE_DELAY_LINE_MANUAL_TAP_COUNT_ENABLE 23 38962306a36Sopenharmony_ci#define V_SLAVE_DELAY_LINE_MANUAL_TAP_COUNT_ENABLE(x) ((x) << S_SLAVE_DELAY_LINE_MANUAL_TAP_COUNT_ENABLE) 39062306a36Sopenharmony_ci#define F_SLAVE_DELAY_LINE_MANUAL_TAP_COUNT_ENABLE V_SLAVE_DELAY_LINE_MANUAL_TAP_COUNT_ENABLE(1U) 39162306a36Sopenharmony_ci 39262306a36Sopenharmony_ci#define S_SLAVE_DELAY_LINE_TAP_COUNT 24 39362306a36Sopenharmony_ci#define M_SLAVE_DELAY_LINE_TAP_COUNT 0x3f 39462306a36Sopenharmony_ci#define V_SLAVE_DELAY_LINE_TAP_COUNT(x) ((x) << S_SLAVE_DELAY_LINE_TAP_COUNT) 39562306a36Sopenharmony_ci#define G_SLAVE_DELAY_LINE_TAP_COUNT(x) (((x) >> S_SLAVE_DELAY_LINE_TAP_COUNT) & M_SLAVE_DELAY_LINE_TAP_COUNT) 39662306a36Sopenharmony_ci 39762306a36Sopenharmony_ci#define A_MC3_ECC_CNTL 0x118 39862306a36Sopenharmony_ci 39962306a36Sopenharmony_ci#define S_ECC_GENERATION_ENABLE 0 40062306a36Sopenharmony_ci#define V_ECC_GENERATION_ENABLE(x) ((x) << S_ECC_GENERATION_ENABLE) 40162306a36Sopenharmony_ci#define F_ECC_GENERATION_ENABLE V_ECC_GENERATION_ENABLE(1U) 40262306a36Sopenharmony_ci 40362306a36Sopenharmony_ci#define S_ECC_CHECK_ENABLE 1 40462306a36Sopenharmony_ci#define V_ECC_CHECK_ENABLE(x) ((x) << S_ECC_CHECK_ENABLE) 40562306a36Sopenharmony_ci#define F_ECC_CHECK_ENABLE V_ECC_CHECK_ENABLE(1U) 40662306a36Sopenharmony_ci 40762306a36Sopenharmony_ci#define S_CORRECTABLE_ERROR_COUNT 2 40862306a36Sopenharmony_ci#define M_CORRECTABLE_ERROR_COUNT 0xff 40962306a36Sopenharmony_ci#define V_CORRECTABLE_ERROR_COUNT(x) ((x) << S_CORRECTABLE_ERROR_COUNT) 41062306a36Sopenharmony_ci#define G_CORRECTABLE_ERROR_COUNT(x) (((x) >> S_CORRECTABLE_ERROR_COUNT) & M_CORRECTABLE_ERROR_COUNT) 41162306a36Sopenharmony_ci 41262306a36Sopenharmony_ci#define S_UNCORRECTABLE_ERROR_COUNT 10 41362306a36Sopenharmony_ci#define M_UNCORRECTABLE_ERROR_COUNT 0xff 41462306a36Sopenharmony_ci#define V_UNCORRECTABLE_ERROR_COUNT(x) ((x) << S_UNCORRECTABLE_ERROR_COUNT) 41562306a36Sopenharmony_ci#define G_UNCORRECTABLE_ERROR_COUNT(x) (((x) >> S_UNCORRECTABLE_ERROR_COUNT) & M_UNCORRECTABLE_ERROR_COUNT) 41662306a36Sopenharmony_ci 41762306a36Sopenharmony_ci#define A_MC3_CE_ADDR 0x11c 41862306a36Sopenharmony_ci 41962306a36Sopenharmony_ci#define S_MC3_CE_ADDR 4 42062306a36Sopenharmony_ci#define M_MC3_CE_ADDR 0xfffffff 42162306a36Sopenharmony_ci#define V_MC3_CE_ADDR(x) ((x) << S_MC3_CE_ADDR) 42262306a36Sopenharmony_ci#define G_MC3_CE_ADDR(x) (((x) >> S_MC3_CE_ADDR) & M_MC3_CE_ADDR) 42362306a36Sopenharmony_ci 42462306a36Sopenharmony_ci#define A_MC3_CE_DATA0 0x120 42562306a36Sopenharmony_ci#define A_MC3_CE_DATA1 0x124 42662306a36Sopenharmony_ci#define A_MC3_CE_DATA2 0x128 42762306a36Sopenharmony_ci#define A_MC3_CE_DATA3 0x12c 42862306a36Sopenharmony_ci#define A_MC3_CE_DATA4 0x130 42962306a36Sopenharmony_ci#define A_MC3_UE_ADDR 0x134 43062306a36Sopenharmony_ci 43162306a36Sopenharmony_ci#define S_MC3_UE_ADDR 4 43262306a36Sopenharmony_ci#define M_MC3_UE_ADDR 0xfffffff 43362306a36Sopenharmony_ci#define V_MC3_UE_ADDR(x) ((x) << S_MC3_UE_ADDR) 43462306a36Sopenharmony_ci#define G_MC3_UE_ADDR(x) (((x) >> S_MC3_UE_ADDR) & M_MC3_UE_ADDR) 43562306a36Sopenharmony_ci 43662306a36Sopenharmony_ci#define A_MC3_UE_DATA0 0x138 43762306a36Sopenharmony_ci#define A_MC3_UE_DATA1 0x13c 43862306a36Sopenharmony_ci#define A_MC3_UE_DATA2 0x140 43962306a36Sopenharmony_ci#define A_MC3_UE_DATA3 0x144 44062306a36Sopenharmony_ci#define A_MC3_UE_DATA4 0x148 44162306a36Sopenharmony_ci#define A_MC3_BD_ADDR 0x14c 44262306a36Sopenharmony_ci#define A_MC3_BD_DATA0 0x150 44362306a36Sopenharmony_ci#define A_MC3_BD_DATA1 0x154 44462306a36Sopenharmony_ci#define A_MC3_BD_DATA2 0x158 44562306a36Sopenharmony_ci#define A_MC3_BD_DATA3 0x15c 44662306a36Sopenharmony_ci#define A_MC3_BD_DATA4 0x160 44762306a36Sopenharmony_ci#define A_MC3_BD_OP 0x164 44862306a36Sopenharmony_ci 44962306a36Sopenharmony_ci#define S_BACK_DOOR_OPERATION 0 45062306a36Sopenharmony_ci#define V_BACK_DOOR_OPERATION(x) ((x) << S_BACK_DOOR_OPERATION) 45162306a36Sopenharmony_ci#define F_BACK_DOOR_OPERATION V_BACK_DOOR_OPERATION(1U) 45262306a36Sopenharmony_ci 45362306a36Sopenharmony_ci#define A_MC3_BIST_ADDR_BEG 0x168 45462306a36Sopenharmony_ci#define A_MC3_BIST_ADDR_END 0x16c 45562306a36Sopenharmony_ci#define A_MC3_BIST_DATA 0x170 45662306a36Sopenharmony_ci#define A_MC3_BIST_OP 0x174 45762306a36Sopenharmony_ci 45862306a36Sopenharmony_ci#define S_OP 0 45962306a36Sopenharmony_ci#define V_OP(x) ((x) << S_OP) 46062306a36Sopenharmony_ci#define F_OP V_OP(1U) 46162306a36Sopenharmony_ci 46262306a36Sopenharmony_ci#define S_DATA_PATTERN 1 46362306a36Sopenharmony_ci#define M_DATA_PATTERN 0x3 46462306a36Sopenharmony_ci#define V_DATA_PATTERN(x) ((x) << S_DATA_PATTERN) 46562306a36Sopenharmony_ci#define G_DATA_PATTERN(x) (((x) >> S_DATA_PATTERN) & M_DATA_PATTERN) 46662306a36Sopenharmony_ci 46762306a36Sopenharmony_ci#define S_CONTINUOUS 3 46862306a36Sopenharmony_ci#define V_CONTINUOUS(x) ((x) << S_CONTINUOUS) 46962306a36Sopenharmony_ci#define F_CONTINUOUS V_CONTINUOUS(1U) 47062306a36Sopenharmony_ci 47162306a36Sopenharmony_ci#define A_MC3_INT_ENABLE 0x178 47262306a36Sopenharmony_ci 47362306a36Sopenharmony_ci#define S_MC3_CORR_ERR 0 47462306a36Sopenharmony_ci#define V_MC3_CORR_ERR(x) ((x) << S_MC3_CORR_ERR) 47562306a36Sopenharmony_ci#define F_MC3_CORR_ERR V_MC3_CORR_ERR(1U) 47662306a36Sopenharmony_ci 47762306a36Sopenharmony_ci#define S_MC3_UNCORR_ERR 1 47862306a36Sopenharmony_ci#define V_MC3_UNCORR_ERR(x) ((x) << S_MC3_UNCORR_ERR) 47962306a36Sopenharmony_ci#define F_MC3_UNCORR_ERR V_MC3_UNCORR_ERR(1U) 48062306a36Sopenharmony_ci 48162306a36Sopenharmony_ci#define S_MC3_PARITY_ERR 2 48262306a36Sopenharmony_ci#define M_MC3_PARITY_ERR 0xff 48362306a36Sopenharmony_ci#define V_MC3_PARITY_ERR(x) ((x) << S_MC3_PARITY_ERR) 48462306a36Sopenharmony_ci#define G_MC3_PARITY_ERR(x) (((x) >> S_MC3_PARITY_ERR) & M_MC3_PARITY_ERR) 48562306a36Sopenharmony_ci 48662306a36Sopenharmony_ci#define S_MC3_ADDR_ERR 10 48762306a36Sopenharmony_ci#define V_MC3_ADDR_ERR(x) ((x) << S_MC3_ADDR_ERR) 48862306a36Sopenharmony_ci#define F_MC3_ADDR_ERR V_MC3_ADDR_ERR(1U) 48962306a36Sopenharmony_ci 49062306a36Sopenharmony_ci#define A_MC3_INT_CAUSE 0x17c 49162306a36Sopenharmony_ci 49262306a36Sopenharmony_ci/* MC4 registers */ 49362306a36Sopenharmony_ci#define A_MC4_CFG 0x180 49462306a36Sopenharmony_ci 49562306a36Sopenharmony_ci#define S_POWER_UP 0 49662306a36Sopenharmony_ci#define V_POWER_UP(x) ((x) << S_POWER_UP) 49762306a36Sopenharmony_ci#define F_POWER_UP V_POWER_UP(1U) 49862306a36Sopenharmony_ci 49962306a36Sopenharmony_ci#define S_MC4_BANK_CYCLE 8 50062306a36Sopenharmony_ci#define M_MC4_BANK_CYCLE 0x7 50162306a36Sopenharmony_ci#define V_MC4_BANK_CYCLE(x) ((x) << S_MC4_BANK_CYCLE) 50262306a36Sopenharmony_ci#define G_MC4_BANK_CYCLE(x) (((x) >> S_MC4_BANK_CYCLE) & M_MC4_BANK_CYCLE) 50362306a36Sopenharmony_ci 50462306a36Sopenharmony_ci#define S_MC4_NARROW 24 50562306a36Sopenharmony_ci#define V_MC4_NARROW(x) ((x) << S_MC4_NARROW) 50662306a36Sopenharmony_ci#define F_MC4_NARROW V_MC4_NARROW(1U) 50762306a36Sopenharmony_ci 50862306a36Sopenharmony_ci#define S_MC4_SLOW 25 50962306a36Sopenharmony_ci#define V_MC4_SLOW(x) ((x) << S_MC4_SLOW) 51062306a36Sopenharmony_ci#define F_MC4_SLOW V_MC4_SLOW(1U) 51162306a36Sopenharmony_ci 51262306a36Sopenharmony_ci#define S_MC4A_WIDTH 24 51362306a36Sopenharmony_ci#define M_MC4A_WIDTH 0x3 51462306a36Sopenharmony_ci#define V_MC4A_WIDTH(x) ((x) << S_MC4A_WIDTH) 51562306a36Sopenharmony_ci#define G_MC4A_WIDTH(x) (((x) >> S_MC4A_WIDTH) & M_MC4A_WIDTH) 51662306a36Sopenharmony_ci 51762306a36Sopenharmony_ci#define S_MC4A_SLOW 26 51862306a36Sopenharmony_ci#define V_MC4A_SLOW(x) ((x) << S_MC4A_SLOW) 51962306a36Sopenharmony_ci#define F_MC4A_SLOW V_MC4A_SLOW(1U) 52062306a36Sopenharmony_ci 52162306a36Sopenharmony_ci#define A_MC4_MODE 0x184 52262306a36Sopenharmony_ci 52362306a36Sopenharmony_ci#define S_MC4_MODE 0 52462306a36Sopenharmony_ci#define M_MC4_MODE 0x7fff 52562306a36Sopenharmony_ci#define V_MC4_MODE(x) ((x) << S_MC4_MODE) 52662306a36Sopenharmony_ci#define G_MC4_MODE(x) (((x) >> S_MC4_MODE) & M_MC4_MODE) 52762306a36Sopenharmony_ci 52862306a36Sopenharmony_ci#define A_MC4_EXT_MODE 0x188 52962306a36Sopenharmony_ci 53062306a36Sopenharmony_ci#define S_MC4_EXTENDED_MODE 0 53162306a36Sopenharmony_ci#define M_MC4_EXTENDED_MODE 0x7fff 53262306a36Sopenharmony_ci#define V_MC4_EXTENDED_MODE(x) ((x) << S_MC4_EXTENDED_MODE) 53362306a36Sopenharmony_ci#define G_MC4_EXTENDED_MODE(x) (((x) >> S_MC4_EXTENDED_MODE) & M_MC4_EXTENDED_MODE) 53462306a36Sopenharmony_ci 53562306a36Sopenharmony_ci#define A_MC4_REFRESH 0x190 53662306a36Sopenharmony_ci#define A_MC4_STROBE 0x194 53762306a36Sopenharmony_ci#define A_MC4_ECC_CNTL 0x198 53862306a36Sopenharmony_ci#define A_MC4_CE_ADDR 0x19c 53962306a36Sopenharmony_ci 54062306a36Sopenharmony_ci#define S_MC4_CE_ADDR 4 54162306a36Sopenharmony_ci#define M_MC4_CE_ADDR 0xffffff 54262306a36Sopenharmony_ci#define V_MC4_CE_ADDR(x) ((x) << S_MC4_CE_ADDR) 54362306a36Sopenharmony_ci#define G_MC4_CE_ADDR(x) (((x) >> S_MC4_CE_ADDR) & M_MC4_CE_ADDR) 54462306a36Sopenharmony_ci 54562306a36Sopenharmony_ci#define A_MC4_CE_DATA0 0x1a0 54662306a36Sopenharmony_ci#define A_MC4_CE_DATA1 0x1a4 54762306a36Sopenharmony_ci#define A_MC4_CE_DATA2 0x1a8 54862306a36Sopenharmony_ci#define A_MC4_CE_DATA3 0x1ac 54962306a36Sopenharmony_ci#define A_MC4_CE_DATA4 0x1b0 55062306a36Sopenharmony_ci#define A_MC4_UE_ADDR 0x1b4 55162306a36Sopenharmony_ci 55262306a36Sopenharmony_ci#define S_MC4_UE_ADDR 4 55362306a36Sopenharmony_ci#define M_MC4_UE_ADDR 0xffffff 55462306a36Sopenharmony_ci#define V_MC4_UE_ADDR(x) ((x) << S_MC4_UE_ADDR) 55562306a36Sopenharmony_ci#define G_MC4_UE_ADDR(x) (((x) >> S_MC4_UE_ADDR) & M_MC4_UE_ADDR) 55662306a36Sopenharmony_ci 55762306a36Sopenharmony_ci#define A_MC4_UE_DATA0 0x1b8 55862306a36Sopenharmony_ci#define A_MC4_UE_DATA1 0x1bc 55962306a36Sopenharmony_ci#define A_MC4_UE_DATA2 0x1c0 56062306a36Sopenharmony_ci#define A_MC4_UE_DATA3 0x1c4 56162306a36Sopenharmony_ci#define A_MC4_UE_DATA4 0x1c8 56262306a36Sopenharmony_ci#define A_MC4_BD_ADDR 0x1cc 56362306a36Sopenharmony_ci 56462306a36Sopenharmony_ci#define S_MC4_BACK_DOOR_ADDR 0 56562306a36Sopenharmony_ci#define M_MC4_BACK_DOOR_ADDR 0xfffffff 56662306a36Sopenharmony_ci#define V_MC4_BACK_DOOR_ADDR(x) ((x) << S_MC4_BACK_DOOR_ADDR) 56762306a36Sopenharmony_ci#define G_MC4_BACK_DOOR_ADDR(x) (((x) >> S_MC4_BACK_DOOR_ADDR) & M_MC4_BACK_DOOR_ADDR) 56862306a36Sopenharmony_ci 56962306a36Sopenharmony_ci#define A_MC4_BD_DATA0 0x1d0 57062306a36Sopenharmony_ci#define A_MC4_BD_DATA1 0x1d4 57162306a36Sopenharmony_ci#define A_MC4_BD_DATA2 0x1d8 57262306a36Sopenharmony_ci#define A_MC4_BD_DATA3 0x1dc 57362306a36Sopenharmony_ci#define A_MC4_BD_DATA4 0x1e0 57462306a36Sopenharmony_ci#define A_MC4_BD_OP 0x1e4 57562306a36Sopenharmony_ci 57662306a36Sopenharmony_ci#define S_OPERATION 0 57762306a36Sopenharmony_ci#define V_OPERATION(x) ((x) << S_OPERATION) 57862306a36Sopenharmony_ci#define F_OPERATION V_OPERATION(1U) 57962306a36Sopenharmony_ci 58062306a36Sopenharmony_ci#define A_MC4_BIST_ADDR_BEG 0x1e8 58162306a36Sopenharmony_ci#define A_MC4_BIST_ADDR_END 0x1ec 58262306a36Sopenharmony_ci#define A_MC4_BIST_DATA 0x1f0 58362306a36Sopenharmony_ci#define A_MC4_BIST_OP 0x1f4 58462306a36Sopenharmony_ci#define A_MC4_INT_ENABLE 0x1f8 58562306a36Sopenharmony_ci 58662306a36Sopenharmony_ci#define S_MC4_CORR_ERR 0 58762306a36Sopenharmony_ci#define V_MC4_CORR_ERR(x) ((x) << S_MC4_CORR_ERR) 58862306a36Sopenharmony_ci#define F_MC4_CORR_ERR V_MC4_CORR_ERR(1U) 58962306a36Sopenharmony_ci 59062306a36Sopenharmony_ci#define S_MC4_UNCORR_ERR 1 59162306a36Sopenharmony_ci#define V_MC4_UNCORR_ERR(x) ((x) << S_MC4_UNCORR_ERR) 59262306a36Sopenharmony_ci#define F_MC4_UNCORR_ERR V_MC4_UNCORR_ERR(1U) 59362306a36Sopenharmony_ci 59462306a36Sopenharmony_ci#define S_MC4_ADDR_ERR 2 59562306a36Sopenharmony_ci#define V_MC4_ADDR_ERR(x) ((x) << S_MC4_ADDR_ERR) 59662306a36Sopenharmony_ci#define F_MC4_ADDR_ERR V_MC4_ADDR_ERR(1U) 59762306a36Sopenharmony_ci 59862306a36Sopenharmony_ci#define A_MC4_INT_CAUSE 0x1fc 59962306a36Sopenharmony_ci 60062306a36Sopenharmony_ci/* TPI registers */ 60162306a36Sopenharmony_ci#define A_TPI_ADDR 0x280 60262306a36Sopenharmony_ci 60362306a36Sopenharmony_ci#define S_TPI_ADDRESS 0 60462306a36Sopenharmony_ci#define M_TPI_ADDRESS 0xffffff 60562306a36Sopenharmony_ci#define V_TPI_ADDRESS(x) ((x) << S_TPI_ADDRESS) 60662306a36Sopenharmony_ci#define G_TPI_ADDRESS(x) (((x) >> S_TPI_ADDRESS) & M_TPI_ADDRESS) 60762306a36Sopenharmony_ci 60862306a36Sopenharmony_ci#define A_TPI_WR_DATA 0x284 60962306a36Sopenharmony_ci#define A_TPI_RD_DATA 0x288 61062306a36Sopenharmony_ci#define A_TPI_CSR 0x28c 61162306a36Sopenharmony_ci 61262306a36Sopenharmony_ci#define S_TPIWR 0 61362306a36Sopenharmony_ci#define V_TPIWR(x) ((x) << S_TPIWR) 61462306a36Sopenharmony_ci#define F_TPIWR V_TPIWR(1U) 61562306a36Sopenharmony_ci 61662306a36Sopenharmony_ci#define S_TPIRDY 1 61762306a36Sopenharmony_ci#define V_TPIRDY(x) ((x) << S_TPIRDY) 61862306a36Sopenharmony_ci#define F_TPIRDY V_TPIRDY(1U) 61962306a36Sopenharmony_ci 62062306a36Sopenharmony_ci#define S_INT_DIR 31 62162306a36Sopenharmony_ci#define V_INT_DIR(x) ((x) << S_INT_DIR) 62262306a36Sopenharmony_ci#define F_INT_DIR V_INT_DIR(1U) 62362306a36Sopenharmony_ci 62462306a36Sopenharmony_ci#define A_TPI_PAR 0x29c 62562306a36Sopenharmony_ci 62662306a36Sopenharmony_ci#define S_TPIPAR 0 62762306a36Sopenharmony_ci#define M_TPIPAR 0x7f 62862306a36Sopenharmony_ci#define V_TPIPAR(x) ((x) << S_TPIPAR) 62962306a36Sopenharmony_ci#define G_TPIPAR(x) (((x) >> S_TPIPAR) & M_TPIPAR) 63062306a36Sopenharmony_ci 63162306a36Sopenharmony_ci 63262306a36Sopenharmony_ci/* TP registers */ 63362306a36Sopenharmony_ci#define A_TP_IN_CONFIG 0x300 63462306a36Sopenharmony_ci 63562306a36Sopenharmony_ci#define S_TP_IN_CSPI_TUNNEL 0 63662306a36Sopenharmony_ci#define V_TP_IN_CSPI_TUNNEL(x) ((x) << S_TP_IN_CSPI_TUNNEL) 63762306a36Sopenharmony_ci#define F_TP_IN_CSPI_TUNNEL V_TP_IN_CSPI_TUNNEL(1U) 63862306a36Sopenharmony_ci 63962306a36Sopenharmony_ci#define S_TP_IN_CSPI_ETHERNET 1 64062306a36Sopenharmony_ci#define V_TP_IN_CSPI_ETHERNET(x) ((x) << S_TP_IN_CSPI_ETHERNET) 64162306a36Sopenharmony_ci#define F_TP_IN_CSPI_ETHERNET V_TP_IN_CSPI_ETHERNET(1U) 64262306a36Sopenharmony_ci 64362306a36Sopenharmony_ci#define S_TP_IN_CSPI_CPL 3 64462306a36Sopenharmony_ci#define V_TP_IN_CSPI_CPL(x) ((x) << S_TP_IN_CSPI_CPL) 64562306a36Sopenharmony_ci#define F_TP_IN_CSPI_CPL V_TP_IN_CSPI_CPL(1U) 64662306a36Sopenharmony_ci 64762306a36Sopenharmony_ci#define S_TP_IN_CSPI_POS 4 64862306a36Sopenharmony_ci#define V_TP_IN_CSPI_POS(x) ((x) << S_TP_IN_CSPI_POS) 64962306a36Sopenharmony_ci#define F_TP_IN_CSPI_POS V_TP_IN_CSPI_POS(1U) 65062306a36Sopenharmony_ci 65162306a36Sopenharmony_ci#define S_TP_IN_CSPI_CHECK_IP_CSUM 5 65262306a36Sopenharmony_ci#define V_TP_IN_CSPI_CHECK_IP_CSUM(x) ((x) << S_TP_IN_CSPI_CHECK_IP_CSUM) 65362306a36Sopenharmony_ci#define F_TP_IN_CSPI_CHECK_IP_CSUM V_TP_IN_CSPI_CHECK_IP_CSUM(1U) 65462306a36Sopenharmony_ci 65562306a36Sopenharmony_ci#define S_TP_IN_CSPI_CHECK_TCP_CSUM 6 65662306a36Sopenharmony_ci#define V_TP_IN_CSPI_CHECK_TCP_CSUM(x) ((x) << S_TP_IN_CSPI_CHECK_TCP_CSUM) 65762306a36Sopenharmony_ci#define F_TP_IN_CSPI_CHECK_TCP_CSUM V_TP_IN_CSPI_CHECK_TCP_CSUM(1U) 65862306a36Sopenharmony_ci 65962306a36Sopenharmony_ci#define S_TP_IN_ESPI_TUNNEL 7 66062306a36Sopenharmony_ci#define V_TP_IN_ESPI_TUNNEL(x) ((x) << S_TP_IN_ESPI_TUNNEL) 66162306a36Sopenharmony_ci#define F_TP_IN_ESPI_TUNNEL V_TP_IN_ESPI_TUNNEL(1U) 66262306a36Sopenharmony_ci 66362306a36Sopenharmony_ci#define S_TP_IN_ESPI_ETHERNET 8 66462306a36Sopenharmony_ci#define V_TP_IN_ESPI_ETHERNET(x) ((x) << S_TP_IN_ESPI_ETHERNET) 66562306a36Sopenharmony_ci#define F_TP_IN_ESPI_ETHERNET V_TP_IN_ESPI_ETHERNET(1U) 66662306a36Sopenharmony_ci 66762306a36Sopenharmony_ci#define S_TP_IN_ESPI_CPL 10 66862306a36Sopenharmony_ci#define V_TP_IN_ESPI_CPL(x) ((x) << S_TP_IN_ESPI_CPL) 66962306a36Sopenharmony_ci#define F_TP_IN_ESPI_CPL V_TP_IN_ESPI_CPL(1U) 67062306a36Sopenharmony_ci 67162306a36Sopenharmony_ci#define S_TP_IN_ESPI_POS 11 67262306a36Sopenharmony_ci#define V_TP_IN_ESPI_POS(x) ((x) << S_TP_IN_ESPI_POS) 67362306a36Sopenharmony_ci#define F_TP_IN_ESPI_POS V_TP_IN_ESPI_POS(1U) 67462306a36Sopenharmony_ci 67562306a36Sopenharmony_ci#define S_TP_IN_ESPI_CHECK_IP_CSUM 12 67662306a36Sopenharmony_ci#define V_TP_IN_ESPI_CHECK_IP_CSUM(x) ((x) << S_TP_IN_ESPI_CHECK_IP_CSUM) 67762306a36Sopenharmony_ci#define F_TP_IN_ESPI_CHECK_IP_CSUM V_TP_IN_ESPI_CHECK_IP_CSUM(1U) 67862306a36Sopenharmony_ci 67962306a36Sopenharmony_ci#define S_TP_IN_ESPI_CHECK_TCP_CSUM 13 68062306a36Sopenharmony_ci#define V_TP_IN_ESPI_CHECK_TCP_CSUM(x) ((x) << S_TP_IN_ESPI_CHECK_TCP_CSUM) 68162306a36Sopenharmony_ci#define F_TP_IN_ESPI_CHECK_TCP_CSUM V_TP_IN_ESPI_CHECK_TCP_CSUM(1U) 68262306a36Sopenharmony_ci 68362306a36Sopenharmony_ci#define S_OFFLOAD_DISABLE 14 68462306a36Sopenharmony_ci#define V_OFFLOAD_DISABLE(x) ((x) << S_OFFLOAD_DISABLE) 68562306a36Sopenharmony_ci#define F_OFFLOAD_DISABLE V_OFFLOAD_DISABLE(1U) 68662306a36Sopenharmony_ci 68762306a36Sopenharmony_ci#define A_TP_OUT_CONFIG 0x304 68862306a36Sopenharmony_ci 68962306a36Sopenharmony_ci#define S_TP_OUT_C_ETH 0 69062306a36Sopenharmony_ci#define V_TP_OUT_C_ETH(x) ((x) << S_TP_OUT_C_ETH) 69162306a36Sopenharmony_ci#define F_TP_OUT_C_ETH V_TP_OUT_C_ETH(1U) 69262306a36Sopenharmony_ci 69362306a36Sopenharmony_ci#define S_TP_OUT_CSPI_CPL 2 69462306a36Sopenharmony_ci#define V_TP_OUT_CSPI_CPL(x) ((x) << S_TP_OUT_CSPI_CPL) 69562306a36Sopenharmony_ci#define F_TP_OUT_CSPI_CPL V_TP_OUT_CSPI_CPL(1U) 69662306a36Sopenharmony_ci 69762306a36Sopenharmony_ci#define S_TP_OUT_CSPI_POS 3 69862306a36Sopenharmony_ci#define V_TP_OUT_CSPI_POS(x) ((x) << S_TP_OUT_CSPI_POS) 69962306a36Sopenharmony_ci#define F_TP_OUT_CSPI_POS V_TP_OUT_CSPI_POS(1U) 70062306a36Sopenharmony_ci 70162306a36Sopenharmony_ci#define S_TP_OUT_CSPI_GENERATE_IP_CSUM 4 70262306a36Sopenharmony_ci#define V_TP_OUT_CSPI_GENERATE_IP_CSUM(x) ((x) << S_TP_OUT_CSPI_GENERATE_IP_CSUM) 70362306a36Sopenharmony_ci#define F_TP_OUT_CSPI_GENERATE_IP_CSUM V_TP_OUT_CSPI_GENERATE_IP_CSUM(1U) 70462306a36Sopenharmony_ci 70562306a36Sopenharmony_ci#define S_TP_OUT_CSPI_GENERATE_TCP_CSUM 5 70662306a36Sopenharmony_ci#define V_TP_OUT_CSPI_GENERATE_TCP_CSUM(x) ((x) << S_TP_OUT_CSPI_GENERATE_TCP_CSUM) 70762306a36Sopenharmony_ci#define F_TP_OUT_CSPI_GENERATE_TCP_CSUM V_TP_OUT_CSPI_GENERATE_TCP_CSUM(1U) 70862306a36Sopenharmony_ci 70962306a36Sopenharmony_ci#define S_TP_OUT_ESPI_ETHERNET 6 71062306a36Sopenharmony_ci#define V_TP_OUT_ESPI_ETHERNET(x) ((x) << S_TP_OUT_ESPI_ETHERNET) 71162306a36Sopenharmony_ci#define F_TP_OUT_ESPI_ETHERNET V_TP_OUT_ESPI_ETHERNET(1U) 71262306a36Sopenharmony_ci 71362306a36Sopenharmony_ci#define S_TP_OUT_ESPI_TAG_ETHERNET 7 71462306a36Sopenharmony_ci#define V_TP_OUT_ESPI_TAG_ETHERNET(x) ((x) << S_TP_OUT_ESPI_TAG_ETHERNET) 71562306a36Sopenharmony_ci#define F_TP_OUT_ESPI_TAG_ETHERNET V_TP_OUT_ESPI_TAG_ETHERNET(1U) 71662306a36Sopenharmony_ci 71762306a36Sopenharmony_ci#define S_TP_OUT_ESPI_CPL 8 71862306a36Sopenharmony_ci#define V_TP_OUT_ESPI_CPL(x) ((x) << S_TP_OUT_ESPI_CPL) 71962306a36Sopenharmony_ci#define F_TP_OUT_ESPI_CPL V_TP_OUT_ESPI_CPL(1U) 72062306a36Sopenharmony_ci 72162306a36Sopenharmony_ci#define S_TP_OUT_ESPI_POS 9 72262306a36Sopenharmony_ci#define V_TP_OUT_ESPI_POS(x) ((x) << S_TP_OUT_ESPI_POS) 72362306a36Sopenharmony_ci#define F_TP_OUT_ESPI_POS V_TP_OUT_ESPI_POS(1U) 72462306a36Sopenharmony_ci 72562306a36Sopenharmony_ci#define S_TP_OUT_ESPI_GENERATE_IP_CSUM 10 72662306a36Sopenharmony_ci#define V_TP_OUT_ESPI_GENERATE_IP_CSUM(x) ((x) << S_TP_OUT_ESPI_GENERATE_IP_CSUM) 72762306a36Sopenharmony_ci#define F_TP_OUT_ESPI_GENERATE_IP_CSUM V_TP_OUT_ESPI_GENERATE_IP_CSUM(1U) 72862306a36Sopenharmony_ci 72962306a36Sopenharmony_ci#define S_TP_OUT_ESPI_GENERATE_TCP_CSUM 11 73062306a36Sopenharmony_ci#define V_TP_OUT_ESPI_GENERATE_TCP_CSUM(x) ((x) << S_TP_OUT_ESPI_GENERATE_TCP_CSUM) 73162306a36Sopenharmony_ci#define F_TP_OUT_ESPI_GENERATE_TCP_CSUM V_TP_OUT_ESPI_GENERATE_TCP_CSUM(1U) 73262306a36Sopenharmony_ci 73362306a36Sopenharmony_ci#define A_TP_GLOBAL_CONFIG 0x308 73462306a36Sopenharmony_ci 73562306a36Sopenharmony_ci#define S_IP_TTL 0 73662306a36Sopenharmony_ci#define M_IP_TTL 0xff 73762306a36Sopenharmony_ci#define V_IP_TTL(x) ((x) << S_IP_TTL) 73862306a36Sopenharmony_ci#define G_IP_TTL(x) (((x) >> S_IP_TTL) & M_IP_TTL) 73962306a36Sopenharmony_ci 74062306a36Sopenharmony_ci#define S_TCAM_SERVER_REGION_USAGE 8 74162306a36Sopenharmony_ci#define M_TCAM_SERVER_REGION_USAGE 0x3 74262306a36Sopenharmony_ci#define V_TCAM_SERVER_REGION_USAGE(x) ((x) << S_TCAM_SERVER_REGION_USAGE) 74362306a36Sopenharmony_ci#define G_TCAM_SERVER_REGION_USAGE(x) (((x) >> S_TCAM_SERVER_REGION_USAGE) & M_TCAM_SERVER_REGION_USAGE) 74462306a36Sopenharmony_ci 74562306a36Sopenharmony_ci#define S_QOS_MAPPING 10 74662306a36Sopenharmony_ci#define V_QOS_MAPPING(x) ((x) << S_QOS_MAPPING) 74762306a36Sopenharmony_ci#define F_QOS_MAPPING V_QOS_MAPPING(1U) 74862306a36Sopenharmony_ci 74962306a36Sopenharmony_ci#define S_TCP_CSUM 11 75062306a36Sopenharmony_ci#define V_TCP_CSUM(x) ((x) << S_TCP_CSUM) 75162306a36Sopenharmony_ci#define F_TCP_CSUM V_TCP_CSUM(1U) 75262306a36Sopenharmony_ci 75362306a36Sopenharmony_ci#define S_UDP_CSUM 12 75462306a36Sopenharmony_ci#define V_UDP_CSUM(x) ((x) << S_UDP_CSUM) 75562306a36Sopenharmony_ci#define F_UDP_CSUM V_UDP_CSUM(1U) 75662306a36Sopenharmony_ci 75762306a36Sopenharmony_ci#define S_IP_CSUM 13 75862306a36Sopenharmony_ci#define V_IP_CSUM(x) ((x) << S_IP_CSUM) 75962306a36Sopenharmony_ci#define F_IP_CSUM V_IP_CSUM(1U) 76062306a36Sopenharmony_ci 76162306a36Sopenharmony_ci#define S_IP_ID_SPLIT 14 76262306a36Sopenharmony_ci#define V_IP_ID_SPLIT(x) ((x) << S_IP_ID_SPLIT) 76362306a36Sopenharmony_ci#define F_IP_ID_SPLIT V_IP_ID_SPLIT(1U) 76462306a36Sopenharmony_ci 76562306a36Sopenharmony_ci#define S_PATH_MTU 15 76662306a36Sopenharmony_ci#define V_PATH_MTU(x) ((x) << S_PATH_MTU) 76762306a36Sopenharmony_ci#define F_PATH_MTU V_PATH_MTU(1U) 76862306a36Sopenharmony_ci 76962306a36Sopenharmony_ci#define S_5TUPLE_LOOKUP 17 77062306a36Sopenharmony_ci#define M_5TUPLE_LOOKUP 0x3 77162306a36Sopenharmony_ci#define V_5TUPLE_LOOKUP(x) ((x) << S_5TUPLE_LOOKUP) 77262306a36Sopenharmony_ci#define G_5TUPLE_LOOKUP(x) (((x) >> S_5TUPLE_LOOKUP) & M_5TUPLE_LOOKUP) 77362306a36Sopenharmony_ci 77462306a36Sopenharmony_ci#define S_IP_FRAGMENT_DROP 19 77562306a36Sopenharmony_ci#define V_IP_FRAGMENT_DROP(x) ((x) << S_IP_FRAGMENT_DROP) 77662306a36Sopenharmony_ci#define F_IP_FRAGMENT_DROP V_IP_FRAGMENT_DROP(1U) 77762306a36Sopenharmony_ci 77862306a36Sopenharmony_ci#define S_PING_DROP 20 77962306a36Sopenharmony_ci#define V_PING_DROP(x) ((x) << S_PING_DROP) 78062306a36Sopenharmony_ci#define F_PING_DROP V_PING_DROP(1U) 78162306a36Sopenharmony_ci 78262306a36Sopenharmony_ci#define S_PROTECT_MODE 21 78362306a36Sopenharmony_ci#define V_PROTECT_MODE(x) ((x) << S_PROTECT_MODE) 78462306a36Sopenharmony_ci#define F_PROTECT_MODE V_PROTECT_MODE(1U) 78562306a36Sopenharmony_ci 78662306a36Sopenharmony_ci#define S_SYN_COOKIE_ALGORITHM 22 78762306a36Sopenharmony_ci#define V_SYN_COOKIE_ALGORITHM(x) ((x) << S_SYN_COOKIE_ALGORITHM) 78862306a36Sopenharmony_ci#define F_SYN_COOKIE_ALGORITHM V_SYN_COOKIE_ALGORITHM(1U) 78962306a36Sopenharmony_ci 79062306a36Sopenharmony_ci#define S_ATTACK_FILTER 23 79162306a36Sopenharmony_ci#define V_ATTACK_FILTER(x) ((x) << S_ATTACK_FILTER) 79262306a36Sopenharmony_ci#define F_ATTACK_FILTER V_ATTACK_FILTER(1U) 79362306a36Sopenharmony_ci 79462306a36Sopenharmony_ci#define S_INTERFACE_TYPE 24 79562306a36Sopenharmony_ci#define V_INTERFACE_TYPE(x) ((x) << S_INTERFACE_TYPE) 79662306a36Sopenharmony_ci#define F_INTERFACE_TYPE V_INTERFACE_TYPE(1U) 79762306a36Sopenharmony_ci 79862306a36Sopenharmony_ci#define S_DISABLE_RX_FLOW_CONTROL 25 79962306a36Sopenharmony_ci#define V_DISABLE_RX_FLOW_CONTROL(x) ((x) << S_DISABLE_RX_FLOW_CONTROL) 80062306a36Sopenharmony_ci#define F_DISABLE_RX_FLOW_CONTROL V_DISABLE_RX_FLOW_CONTROL(1U) 80162306a36Sopenharmony_ci 80262306a36Sopenharmony_ci#define S_SYN_COOKIE_PARAMETER 26 80362306a36Sopenharmony_ci#define M_SYN_COOKIE_PARAMETER 0x3f 80462306a36Sopenharmony_ci#define V_SYN_COOKIE_PARAMETER(x) ((x) << S_SYN_COOKIE_PARAMETER) 80562306a36Sopenharmony_ci#define G_SYN_COOKIE_PARAMETER(x) (((x) >> S_SYN_COOKIE_PARAMETER) & M_SYN_COOKIE_PARAMETER) 80662306a36Sopenharmony_ci 80762306a36Sopenharmony_ci#define A_TP_GLOBAL_RX_CREDITS 0x30c 80862306a36Sopenharmony_ci#define A_TP_CM_SIZE 0x310 80962306a36Sopenharmony_ci#define A_TP_CM_MM_BASE 0x314 81062306a36Sopenharmony_ci 81162306a36Sopenharmony_ci#define S_CM_MEMMGR_BASE 0 81262306a36Sopenharmony_ci#define M_CM_MEMMGR_BASE 0xfffffff 81362306a36Sopenharmony_ci#define V_CM_MEMMGR_BASE(x) ((x) << S_CM_MEMMGR_BASE) 81462306a36Sopenharmony_ci#define G_CM_MEMMGR_BASE(x) (((x) >> S_CM_MEMMGR_BASE) & M_CM_MEMMGR_BASE) 81562306a36Sopenharmony_ci 81662306a36Sopenharmony_ci#define A_TP_CM_TIMER_BASE 0x318 81762306a36Sopenharmony_ci 81862306a36Sopenharmony_ci#define S_CM_TIMER_BASE 0 81962306a36Sopenharmony_ci#define M_CM_TIMER_BASE 0xfffffff 82062306a36Sopenharmony_ci#define V_CM_TIMER_BASE(x) ((x) << S_CM_TIMER_BASE) 82162306a36Sopenharmony_ci#define G_CM_TIMER_BASE(x) (((x) >> S_CM_TIMER_BASE) & M_CM_TIMER_BASE) 82262306a36Sopenharmony_ci 82362306a36Sopenharmony_ci#define A_TP_PM_SIZE 0x31c 82462306a36Sopenharmony_ci#define A_TP_PM_TX_BASE 0x320 82562306a36Sopenharmony_ci#define A_TP_PM_DEFRAG_BASE 0x324 82662306a36Sopenharmony_ci#define A_TP_PM_RX_BASE 0x328 82762306a36Sopenharmony_ci#define A_TP_PM_RX_PG_SIZE 0x32c 82862306a36Sopenharmony_ci#define A_TP_PM_RX_MAX_PGS 0x330 82962306a36Sopenharmony_ci#define A_TP_PM_TX_PG_SIZE 0x334 83062306a36Sopenharmony_ci#define A_TP_PM_TX_MAX_PGS 0x338 83162306a36Sopenharmony_ci#define A_TP_TCP_OPTIONS 0x340 83262306a36Sopenharmony_ci 83362306a36Sopenharmony_ci#define S_TIMESTAMP 0 83462306a36Sopenharmony_ci#define M_TIMESTAMP 0x3 83562306a36Sopenharmony_ci#define V_TIMESTAMP(x) ((x) << S_TIMESTAMP) 83662306a36Sopenharmony_ci#define G_TIMESTAMP(x) (((x) >> S_TIMESTAMP) & M_TIMESTAMP) 83762306a36Sopenharmony_ci 83862306a36Sopenharmony_ci#define S_WINDOW_SCALE 2 83962306a36Sopenharmony_ci#define M_WINDOW_SCALE 0x3 84062306a36Sopenharmony_ci#define V_WINDOW_SCALE(x) ((x) << S_WINDOW_SCALE) 84162306a36Sopenharmony_ci#define G_WINDOW_SCALE(x) (((x) >> S_WINDOW_SCALE) & M_WINDOW_SCALE) 84262306a36Sopenharmony_ci 84362306a36Sopenharmony_ci#define S_SACK 4 84462306a36Sopenharmony_ci#define M_SACK 0x3 84562306a36Sopenharmony_ci#define V_SACK(x) ((x) << S_SACK) 84662306a36Sopenharmony_ci#define G_SACK(x) (((x) >> S_SACK) & M_SACK) 84762306a36Sopenharmony_ci 84862306a36Sopenharmony_ci#define S_ECN 6 84962306a36Sopenharmony_ci#define M_ECN 0x3 85062306a36Sopenharmony_ci#define V_ECN(x) ((x) << S_ECN) 85162306a36Sopenharmony_ci#define G_ECN(x) (((x) >> S_ECN) & M_ECN) 85262306a36Sopenharmony_ci 85362306a36Sopenharmony_ci#define S_SACK_ALGORITHM 8 85462306a36Sopenharmony_ci#define M_SACK_ALGORITHM 0x3 85562306a36Sopenharmony_ci#define V_SACK_ALGORITHM(x) ((x) << S_SACK_ALGORITHM) 85662306a36Sopenharmony_ci#define G_SACK_ALGORITHM(x) (((x) >> S_SACK_ALGORITHM) & M_SACK_ALGORITHM) 85762306a36Sopenharmony_ci 85862306a36Sopenharmony_ci#define S_MSS 10 85962306a36Sopenharmony_ci#define V_MSS(x) ((x) << S_MSS) 86062306a36Sopenharmony_ci#define F_MSS V_MSS(1U) 86162306a36Sopenharmony_ci 86262306a36Sopenharmony_ci#define S_DEFAULT_PEER_MSS 16 86362306a36Sopenharmony_ci#define M_DEFAULT_PEER_MSS 0xffff 86462306a36Sopenharmony_ci#define V_DEFAULT_PEER_MSS(x) ((x) << S_DEFAULT_PEER_MSS) 86562306a36Sopenharmony_ci#define G_DEFAULT_PEER_MSS(x) (((x) >> S_DEFAULT_PEER_MSS) & M_DEFAULT_PEER_MSS) 86662306a36Sopenharmony_ci 86762306a36Sopenharmony_ci#define A_TP_DACK_CONFIG 0x344 86862306a36Sopenharmony_ci 86962306a36Sopenharmony_ci#define S_DACK_MODE 0 87062306a36Sopenharmony_ci#define V_DACK_MODE(x) ((x) << S_DACK_MODE) 87162306a36Sopenharmony_ci#define F_DACK_MODE V_DACK_MODE(1U) 87262306a36Sopenharmony_ci 87362306a36Sopenharmony_ci#define S_DACK_AUTO_MGMT 1 87462306a36Sopenharmony_ci#define V_DACK_AUTO_MGMT(x) ((x) << S_DACK_AUTO_MGMT) 87562306a36Sopenharmony_ci#define F_DACK_AUTO_MGMT V_DACK_AUTO_MGMT(1U) 87662306a36Sopenharmony_ci 87762306a36Sopenharmony_ci#define S_DACK_AUTO_CAREFUL 2 87862306a36Sopenharmony_ci#define V_DACK_AUTO_CAREFUL(x) ((x) << S_DACK_AUTO_CAREFUL) 87962306a36Sopenharmony_ci#define F_DACK_AUTO_CAREFUL V_DACK_AUTO_CAREFUL(1U) 88062306a36Sopenharmony_ci 88162306a36Sopenharmony_ci#define S_DACK_MSS_SELECTOR 3 88262306a36Sopenharmony_ci#define M_DACK_MSS_SELECTOR 0x3 88362306a36Sopenharmony_ci#define V_DACK_MSS_SELECTOR(x) ((x) << S_DACK_MSS_SELECTOR) 88462306a36Sopenharmony_ci#define G_DACK_MSS_SELECTOR(x) (((x) >> S_DACK_MSS_SELECTOR) & M_DACK_MSS_SELECTOR) 88562306a36Sopenharmony_ci 88662306a36Sopenharmony_ci#define S_DACK_BYTE_THRESHOLD 5 88762306a36Sopenharmony_ci#define M_DACK_BYTE_THRESHOLD 0xfffff 88862306a36Sopenharmony_ci#define V_DACK_BYTE_THRESHOLD(x) ((x) << S_DACK_BYTE_THRESHOLD) 88962306a36Sopenharmony_ci#define G_DACK_BYTE_THRESHOLD(x) (((x) >> S_DACK_BYTE_THRESHOLD) & M_DACK_BYTE_THRESHOLD) 89062306a36Sopenharmony_ci 89162306a36Sopenharmony_ci#define A_TP_PC_CONFIG 0x348 89262306a36Sopenharmony_ci 89362306a36Sopenharmony_ci#define S_TP_ACCESS_LATENCY 0 89462306a36Sopenharmony_ci#define M_TP_ACCESS_LATENCY 0xf 89562306a36Sopenharmony_ci#define V_TP_ACCESS_LATENCY(x) ((x) << S_TP_ACCESS_LATENCY) 89662306a36Sopenharmony_ci#define G_TP_ACCESS_LATENCY(x) (((x) >> S_TP_ACCESS_LATENCY) & M_TP_ACCESS_LATENCY) 89762306a36Sopenharmony_ci 89862306a36Sopenharmony_ci#define S_HELD_FIN_DISABLE 4 89962306a36Sopenharmony_ci#define V_HELD_FIN_DISABLE(x) ((x) << S_HELD_FIN_DISABLE) 90062306a36Sopenharmony_ci#define F_HELD_FIN_DISABLE V_HELD_FIN_DISABLE(1U) 90162306a36Sopenharmony_ci 90262306a36Sopenharmony_ci#define S_DDP_FC_ENABLE 5 90362306a36Sopenharmony_ci#define V_DDP_FC_ENABLE(x) ((x) << S_DDP_FC_ENABLE) 90462306a36Sopenharmony_ci#define F_DDP_FC_ENABLE V_DDP_FC_ENABLE(1U) 90562306a36Sopenharmony_ci 90662306a36Sopenharmony_ci#define S_RDMA_ERR_ENABLE 6 90762306a36Sopenharmony_ci#define V_RDMA_ERR_ENABLE(x) ((x) << S_RDMA_ERR_ENABLE) 90862306a36Sopenharmony_ci#define F_RDMA_ERR_ENABLE V_RDMA_ERR_ENABLE(1U) 90962306a36Sopenharmony_ci 91062306a36Sopenharmony_ci#define S_FAST_PDU_DELIVERY 7 91162306a36Sopenharmony_ci#define V_FAST_PDU_DELIVERY(x) ((x) << S_FAST_PDU_DELIVERY) 91262306a36Sopenharmony_ci#define F_FAST_PDU_DELIVERY V_FAST_PDU_DELIVERY(1U) 91362306a36Sopenharmony_ci 91462306a36Sopenharmony_ci#define S_CLEAR_FIN 8 91562306a36Sopenharmony_ci#define V_CLEAR_FIN(x) ((x) << S_CLEAR_FIN) 91662306a36Sopenharmony_ci#define F_CLEAR_FIN V_CLEAR_FIN(1U) 91762306a36Sopenharmony_ci 91862306a36Sopenharmony_ci#define S_DIS_TX_FILL_WIN_PUSH 12 91962306a36Sopenharmony_ci#define V_DIS_TX_FILL_WIN_PUSH(x) ((x) << S_DIS_TX_FILL_WIN_PUSH) 92062306a36Sopenharmony_ci#define F_DIS_TX_FILL_WIN_PUSH V_DIS_TX_FILL_WIN_PUSH(1U) 92162306a36Sopenharmony_ci 92262306a36Sopenharmony_ci#define S_TP_PC_REV 30 92362306a36Sopenharmony_ci#define M_TP_PC_REV 0x3 92462306a36Sopenharmony_ci#define V_TP_PC_REV(x) ((x) << S_TP_PC_REV) 92562306a36Sopenharmony_ci#define G_TP_PC_REV(x) (((x) >> S_TP_PC_REV) & M_TP_PC_REV) 92662306a36Sopenharmony_ci 92762306a36Sopenharmony_ci#define A_TP_BACKOFF0 0x350 92862306a36Sopenharmony_ci 92962306a36Sopenharmony_ci#define S_ELEMENT0 0 93062306a36Sopenharmony_ci#define M_ELEMENT0 0xff 93162306a36Sopenharmony_ci#define V_ELEMENT0(x) ((x) << S_ELEMENT0) 93262306a36Sopenharmony_ci#define G_ELEMENT0(x) (((x) >> S_ELEMENT0) & M_ELEMENT0) 93362306a36Sopenharmony_ci 93462306a36Sopenharmony_ci#define S_ELEMENT1 8 93562306a36Sopenharmony_ci#define M_ELEMENT1 0xff 93662306a36Sopenharmony_ci#define V_ELEMENT1(x) ((x) << S_ELEMENT1) 93762306a36Sopenharmony_ci#define G_ELEMENT1(x) (((x) >> S_ELEMENT1) & M_ELEMENT1) 93862306a36Sopenharmony_ci 93962306a36Sopenharmony_ci#define S_ELEMENT2 16 94062306a36Sopenharmony_ci#define M_ELEMENT2 0xff 94162306a36Sopenharmony_ci#define V_ELEMENT2(x) ((x) << S_ELEMENT2) 94262306a36Sopenharmony_ci#define G_ELEMENT2(x) (((x) >> S_ELEMENT2) & M_ELEMENT2) 94362306a36Sopenharmony_ci 94462306a36Sopenharmony_ci#define S_ELEMENT3 24 94562306a36Sopenharmony_ci#define M_ELEMENT3 0xff 94662306a36Sopenharmony_ci#define V_ELEMENT3(x) ((x) << S_ELEMENT3) 94762306a36Sopenharmony_ci#define G_ELEMENT3(x) (((x) >> S_ELEMENT3) & M_ELEMENT3) 94862306a36Sopenharmony_ci 94962306a36Sopenharmony_ci#define A_TP_BACKOFF1 0x354 95062306a36Sopenharmony_ci#define A_TP_BACKOFF2 0x358 95162306a36Sopenharmony_ci#define A_TP_BACKOFF3 0x35c 95262306a36Sopenharmony_ci#define A_TP_PARA_REG0 0x360 95362306a36Sopenharmony_ci 95462306a36Sopenharmony_ci#define S_VAR_MULT 0 95562306a36Sopenharmony_ci#define M_VAR_MULT 0xf 95662306a36Sopenharmony_ci#define V_VAR_MULT(x) ((x) << S_VAR_MULT) 95762306a36Sopenharmony_ci#define G_VAR_MULT(x) (((x) >> S_VAR_MULT) & M_VAR_MULT) 95862306a36Sopenharmony_ci 95962306a36Sopenharmony_ci#define S_VAR_GAIN 4 96062306a36Sopenharmony_ci#define M_VAR_GAIN 0xf 96162306a36Sopenharmony_ci#define V_VAR_GAIN(x) ((x) << S_VAR_GAIN) 96262306a36Sopenharmony_ci#define G_VAR_GAIN(x) (((x) >> S_VAR_GAIN) & M_VAR_GAIN) 96362306a36Sopenharmony_ci 96462306a36Sopenharmony_ci#define S_SRTT_GAIN 8 96562306a36Sopenharmony_ci#define M_SRTT_GAIN 0xf 96662306a36Sopenharmony_ci#define V_SRTT_GAIN(x) ((x) << S_SRTT_GAIN) 96762306a36Sopenharmony_ci#define G_SRTT_GAIN(x) (((x) >> S_SRTT_GAIN) & M_SRTT_GAIN) 96862306a36Sopenharmony_ci 96962306a36Sopenharmony_ci#define S_RTTVAR_INIT 12 97062306a36Sopenharmony_ci#define M_RTTVAR_INIT 0xf 97162306a36Sopenharmony_ci#define V_RTTVAR_INIT(x) ((x) << S_RTTVAR_INIT) 97262306a36Sopenharmony_ci#define G_RTTVAR_INIT(x) (((x) >> S_RTTVAR_INIT) & M_RTTVAR_INIT) 97362306a36Sopenharmony_ci 97462306a36Sopenharmony_ci#define S_DUP_THRESH 20 97562306a36Sopenharmony_ci#define M_DUP_THRESH 0xf 97662306a36Sopenharmony_ci#define V_DUP_THRESH(x) ((x) << S_DUP_THRESH) 97762306a36Sopenharmony_ci#define G_DUP_THRESH(x) (((x) >> S_DUP_THRESH) & M_DUP_THRESH) 97862306a36Sopenharmony_ci 97962306a36Sopenharmony_ci#define S_INIT_CONG_WIN 24 98062306a36Sopenharmony_ci#define M_INIT_CONG_WIN 0x7 98162306a36Sopenharmony_ci#define V_INIT_CONG_WIN(x) ((x) << S_INIT_CONG_WIN) 98262306a36Sopenharmony_ci#define G_INIT_CONG_WIN(x) (((x) >> S_INIT_CONG_WIN) & M_INIT_CONG_WIN) 98362306a36Sopenharmony_ci 98462306a36Sopenharmony_ci#define A_TP_PARA_REG1 0x364 98562306a36Sopenharmony_ci 98662306a36Sopenharmony_ci#define S_INITIAL_SLOW_START_THRESHOLD 0 98762306a36Sopenharmony_ci#define M_INITIAL_SLOW_START_THRESHOLD 0xffff 98862306a36Sopenharmony_ci#define V_INITIAL_SLOW_START_THRESHOLD(x) ((x) << S_INITIAL_SLOW_START_THRESHOLD) 98962306a36Sopenharmony_ci#define G_INITIAL_SLOW_START_THRESHOLD(x) (((x) >> S_INITIAL_SLOW_START_THRESHOLD) & M_INITIAL_SLOW_START_THRESHOLD) 99062306a36Sopenharmony_ci 99162306a36Sopenharmony_ci#define S_RECEIVE_BUFFER_SIZE 16 99262306a36Sopenharmony_ci#define M_RECEIVE_BUFFER_SIZE 0xffff 99362306a36Sopenharmony_ci#define V_RECEIVE_BUFFER_SIZE(x) ((x) << S_RECEIVE_BUFFER_SIZE) 99462306a36Sopenharmony_ci#define G_RECEIVE_BUFFER_SIZE(x) (((x) >> S_RECEIVE_BUFFER_SIZE) & M_RECEIVE_BUFFER_SIZE) 99562306a36Sopenharmony_ci 99662306a36Sopenharmony_ci#define A_TP_PARA_REG2 0x368 99762306a36Sopenharmony_ci 99862306a36Sopenharmony_ci#define S_RX_COALESCE_SIZE 0 99962306a36Sopenharmony_ci#define M_RX_COALESCE_SIZE 0xffff 100062306a36Sopenharmony_ci#define V_RX_COALESCE_SIZE(x) ((x) << S_RX_COALESCE_SIZE) 100162306a36Sopenharmony_ci#define G_RX_COALESCE_SIZE(x) (((x) >> S_RX_COALESCE_SIZE) & M_RX_COALESCE_SIZE) 100262306a36Sopenharmony_ci 100362306a36Sopenharmony_ci#define S_MAX_RX_SIZE 16 100462306a36Sopenharmony_ci#define M_MAX_RX_SIZE 0xffff 100562306a36Sopenharmony_ci#define V_MAX_RX_SIZE(x) ((x) << S_MAX_RX_SIZE) 100662306a36Sopenharmony_ci#define G_MAX_RX_SIZE(x) (((x) >> S_MAX_RX_SIZE) & M_MAX_RX_SIZE) 100762306a36Sopenharmony_ci 100862306a36Sopenharmony_ci#define A_TP_PARA_REG3 0x36c 100962306a36Sopenharmony_ci 101062306a36Sopenharmony_ci#define S_RX_COALESCING_PSH_DELIVER 0 101162306a36Sopenharmony_ci#define V_RX_COALESCING_PSH_DELIVER(x) ((x) << S_RX_COALESCING_PSH_DELIVER) 101262306a36Sopenharmony_ci#define F_RX_COALESCING_PSH_DELIVER V_RX_COALESCING_PSH_DELIVER(1U) 101362306a36Sopenharmony_ci 101462306a36Sopenharmony_ci#define S_RX_COALESCING_ENABLE 1 101562306a36Sopenharmony_ci#define V_RX_COALESCING_ENABLE(x) ((x) << S_RX_COALESCING_ENABLE) 101662306a36Sopenharmony_ci#define F_RX_COALESCING_ENABLE V_RX_COALESCING_ENABLE(1U) 101762306a36Sopenharmony_ci 101862306a36Sopenharmony_ci#define S_TAHOE_ENABLE 2 101962306a36Sopenharmony_ci#define V_TAHOE_ENABLE(x) ((x) << S_TAHOE_ENABLE) 102062306a36Sopenharmony_ci#define F_TAHOE_ENABLE V_TAHOE_ENABLE(1U) 102162306a36Sopenharmony_ci 102262306a36Sopenharmony_ci#define S_MAX_REORDER_FRAGMENTS 12 102362306a36Sopenharmony_ci#define M_MAX_REORDER_FRAGMENTS 0x7 102462306a36Sopenharmony_ci#define V_MAX_REORDER_FRAGMENTS(x) ((x) << S_MAX_REORDER_FRAGMENTS) 102562306a36Sopenharmony_ci#define G_MAX_REORDER_FRAGMENTS(x) (((x) >> S_MAX_REORDER_FRAGMENTS) & M_MAX_REORDER_FRAGMENTS) 102662306a36Sopenharmony_ci 102762306a36Sopenharmony_ci#define A_TP_TIMER_RESOLUTION 0x390 102862306a36Sopenharmony_ci 102962306a36Sopenharmony_ci#define S_DELAYED_ACK_TIMER_RESOLUTION 0 103062306a36Sopenharmony_ci#define M_DELAYED_ACK_TIMER_RESOLUTION 0x3f 103162306a36Sopenharmony_ci#define V_DELAYED_ACK_TIMER_RESOLUTION(x) ((x) << S_DELAYED_ACK_TIMER_RESOLUTION) 103262306a36Sopenharmony_ci#define G_DELAYED_ACK_TIMER_RESOLUTION(x) (((x) >> S_DELAYED_ACK_TIMER_RESOLUTION) & M_DELAYED_ACK_TIMER_RESOLUTION) 103362306a36Sopenharmony_ci 103462306a36Sopenharmony_ci#define S_GENERIC_TIMER_RESOLUTION 16 103562306a36Sopenharmony_ci#define M_GENERIC_TIMER_RESOLUTION 0x3f 103662306a36Sopenharmony_ci#define V_GENERIC_TIMER_RESOLUTION(x) ((x) << S_GENERIC_TIMER_RESOLUTION) 103762306a36Sopenharmony_ci#define G_GENERIC_TIMER_RESOLUTION(x) (((x) >> S_GENERIC_TIMER_RESOLUTION) & M_GENERIC_TIMER_RESOLUTION) 103862306a36Sopenharmony_ci 103962306a36Sopenharmony_ci#define A_TP_2MSL 0x394 104062306a36Sopenharmony_ci 104162306a36Sopenharmony_ci#define S_2MSL 0 104262306a36Sopenharmony_ci#define M_2MSL 0x3fffffff 104362306a36Sopenharmony_ci#define V_2MSL(x) ((x) << S_2MSL) 104462306a36Sopenharmony_ci#define G_2MSL(x) (((x) >> S_2MSL) & M_2MSL) 104562306a36Sopenharmony_ci 104662306a36Sopenharmony_ci#define A_TP_RXT_MIN 0x398 104762306a36Sopenharmony_ci 104862306a36Sopenharmony_ci#define S_RETRANSMIT_TIMER_MIN 0 104962306a36Sopenharmony_ci#define M_RETRANSMIT_TIMER_MIN 0xffff 105062306a36Sopenharmony_ci#define V_RETRANSMIT_TIMER_MIN(x) ((x) << S_RETRANSMIT_TIMER_MIN) 105162306a36Sopenharmony_ci#define G_RETRANSMIT_TIMER_MIN(x) (((x) >> S_RETRANSMIT_TIMER_MIN) & M_RETRANSMIT_TIMER_MIN) 105262306a36Sopenharmony_ci 105362306a36Sopenharmony_ci#define A_TP_RXT_MAX 0x39c 105462306a36Sopenharmony_ci 105562306a36Sopenharmony_ci#define S_RETRANSMIT_TIMER_MAX 0 105662306a36Sopenharmony_ci#define M_RETRANSMIT_TIMER_MAX 0x3fffffff 105762306a36Sopenharmony_ci#define V_RETRANSMIT_TIMER_MAX(x) ((x) << S_RETRANSMIT_TIMER_MAX) 105862306a36Sopenharmony_ci#define G_RETRANSMIT_TIMER_MAX(x) (((x) >> S_RETRANSMIT_TIMER_MAX) & M_RETRANSMIT_TIMER_MAX) 105962306a36Sopenharmony_ci 106062306a36Sopenharmony_ci#define A_TP_PERS_MIN 0x3a0 106162306a36Sopenharmony_ci 106262306a36Sopenharmony_ci#define S_PERSIST_TIMER_MIN 0 106362306a36Sopenharmony_ci#define M_PERSIST_TIMER_MIN 0xffff 106462306a36Sopenharmony_ci#define V_PERSIST_TIMER_MIN(x) ((x) << S_PERSIST_TIMER_MIN) 106562306a36Sopenharmony_ci#define G_PERSIST_TIMER_MIN(x) (((x) >> S_PERSIST_TIMER_MIN) & M_PERSIST_TIMER_MIN) 106662306a36Sopenharmony_ci 106762306a36Sopenharmony_ci#define A_TP_PERS_MAX 0x3a4 106862306a36Sopenharmony_ci 106962306a36Sopenharmony_ci#define S_PERSIST_TIMER_MAX 0 107062306a36Sopenharmony_ci#define M_PERSIST_TIMER_MAX 0x3fffffff 107162306a36Sopenharmony_ci#define V_PERSIST_TIMER_MAX(x) ((x) << S_PERSIST_TIMER_MAX) 107262306a36Sopenharmony_ci#define G_PERSIST_TIMER_MAX(x) (((x) >> S_PERSIST_TIMER_MAX) & M_PERSIST_TIMER_MAX) 107362306a36Sopenharmony_ci 107462306a36Sopenharmony_ci#define A_TP_KEEP_IDLE 0x3ac 107562306a36Sopenharmony_ci 107662306a36Sopenharmony_ci#define S_KEEP_ALIVE_IDLE_TIME 0 107762306a36Sopenharmony_ci#define M_KEEP_ALIVE_IDLE_TIME 0x3fffffff 107862306a36Sopenharmony_ci#define V_KEEP_ALIVE_IDLE_TIME(x) ((x) << S_KEEP_ALIVE_IDLE_TIME) 107962306a36Sopenharmony_ci#define G_KEEP_ALIVE_IDLE_TIME(x) (((x) >> S_KEEP_ALIVE_IDLE_TIME) & M_KEEP_ALIVE_IDLE_TIME) 108062306a36Sopenharmony_ci 108162306a36Sopenharmony_ci#define A_TP_KEEP_INTVL 0x3b0 108262306a36Sopenharmony_ci 108362306a36Sopenharmony_ci#define S_KEEP_ALIVE_INTERVAL_TIME 0 108462306a36Sopenharmony_ci#define M_KEEP_ALIVE_INTERVAL_TIME 0x3fffffff 108562306a36Sopenharmony_ci#define V_KEEP_ALIVE_INTERVAL_TIME(x) ((x) << S_KEEP_ALIVE_INTERVAL_TIME) 108662306a36Sopenharmony_ci#define G_KEEP_ALIVE_INTERVAL_TIME(x) (((x) >> S_KEEP_ALIVE_INTERVAL_TIME) & M_KEEP_ALIVE_INTERVAL_TIME) 108762306a36Sopenharmony_ci 108862306a36Sopenharmony_ci#define A_TP_INIT_SRTT 0x3b4 108962306a36Sopenharmony_ci 109062306a36Sopenharmony_ci#define S_INITIAL_SRTT 0 109162306a36Sopenharmony_ci#define M_INITIAL_SRTT 0xffff 109262306a36Sopenharmony_ci#define V_INITIAL_SRTT(x) ((x) << S_INITIAL_SRTT) 109362306a36Sopenharmony_ci#define G_INITIAL_SRTT(x) (((x) >> S_INITIAL_SRTT) & M_INITIAL_SRTT) 109462306a36Sopenharmony_ci 109562306a36Sopenharmony_ci#define A_TP_DACK_TIME 0x3b8 109662306a36Sopenharmony_ci 109762306a36Sopenharmony_ci#define S_DELAYED_ACK_TIME 0 109862306a36Sopenharmony_ci#define M_DELAYED_ACK_TIME 0x7ff 109962306a36Sopenharmony_ci#define V_DELAYED_ACK_TIME(x) ((x) << S_DELAYED_ACK_TIME) 110062306a36Sopenharmony_ci#define G_DELAYED_ACK_TIME(x) (((x) >> S_DELAYED_ACK_TIME) & M_DELAYED_ACK_TIME) 110162306a36Sopenharmony_ci 110262306a36Sopenharmony_ci#define A_TP_FINWAIT2_TIME 0x3bc 110362306a36Sopenharmony_ci 110462306a36Sopenharmony_ci#define S_FINWAIT2_TIME 0 110562306a36Sopenharmony_ci#define M_FINWAIT2_TIME 0x3fffffff 110662306a36Sopenharmony_ci#define V_FINWAIT2_TIME(x) ((x) << S_FINWAIT2_TIME) 110762306a36Sopenharmony_ci#define G_FINWAIT2_TIME(x) (((x) >> S_FINWAIT2_TIME) & M_FINWAIT2_TIME) 110862306a36Sopenharmony_ci 110962306a36Sopenharmony_ci#define A_TP_FAST_FINWAIT2_TIME 0x3c0 111062306a36Sopenharmony_ci 111162306a36Sopenharmony_ci#define S_FAST_FINWAIT2_TIME 0 111262306a36Sopenharmony_ci#define M_FAST_FINWAIT2_TIME 0x3fffffff 111362306a36Sopenharmony_ci#define V_FAST_FINWAIT2_TIME(x) ((x) << S_FAST_FINWAIT2_TIME) 111462306a36Sopenharmony_ci#define G_FAST_FINWAIT2_TIME(x) (((x) >> S_FAST_FINWAIT2_TIME) & M_FAST_FINWAIT2_TIME) 111562306a36Sopenharmony_ci 111662306a36Sopenharmony_ci#define A_TP_SHIFT_CNT 0x3c4 111762306a36Sopenharmony_ci 111862306a36Sopenharmony_ci#define S_KEEPALIVE_MAX 0 111962306a36Sopenharmony_ci#define M_KEEPALIVE_MAX 0xff 112062306a36Sopenharmony_ci#define V_KEEPALIVE_MAX(x) ((x) << S_KEEPALIVE_MAX) 112162306a36Sopenharmony_ci#define G_KEEPALIVE_MAX(x) (((x) >> S_KEEPALIVE_MAX) & M_KEEPALIVE_MAX) 112262306a36Sopenharmony_ci 112362306a36Sopenharmony_ci#define S_WINDOWPROBE_MAX 8 112462306a36Sopenharmony_ci#define M_WINDOWPROBE_MAX 0xff 112562306a36Sopenharmony_ci#define V_WINDOWPROBE_MAX(x) ((x) << S_WINDOWPROBE_MAX) 112662306a36Sopenharmony_ci#define G_WINDOWPROBE_MAX(x) (((x) >> S_WINDOWPROBE_MAX) & M_WINDOWPROBE_MAX) 112762306a36Sopenharmony_ci 112862306a36Sopenharmony_ci#define S_RETRANSMISSION_MAX 16 112962306a36Sopenharmony_ci#define M_RETRANSMISSION_MAX 0xff 113062306a36Sopenharmony_ci#define V_RETRANSMISSION_MAX(x) ((x) << S_RETRANSMISSION_MAX) 113162306a36Sopenharmony_ci#define G_RETRANSMISSION_MAX(x) (((x) >> S_RETRANSMISSION_MAX) & M_RETRANSMISSION_MAX) 113262306a36Sopenharmony_ci 113362306a36Sopenharmony_ci#define S_SYN_MAX 24 113462306a36Sopenharmony_ci#define M_SYN_MAX 0xff 113562306a36Sopenharmony_ci#define V_SYN_MAX(x) ((x) << S_SYN_MAX) 113662306a36Sopenharmony_ci#define G_SYN_MAX(x) (((x) >> S_SYN_MAX) & M_SYN_MAX) 113762306a36Sopenharmony_ci 113862306a36Sopenharmony_ci#define A_TP_QOS_REG0 0x3e0 113962306a36Sopenharmony_ci 114062306a36Sopenharmony_ci#define S_L3_VALUE 0 114162306a36Sopenharmony_ci#define M_L3_VALUE 0x3f 114262306a36Sopenharmony_ci#define V_L3_VALUE(x) ((x) << S_L3_VALUE) 114362306a36Sopenharmony_ci#define G_L3_VALUE(x) (((x) >> S_L3_VALUE) & M_L3_VALUE) 114462306a36Sopenharmony_ci 114562306a36Sopenharmony_ci#define A_TP_QOS_REG1 0x3e4 114662306a36Sopenharmony_ci#define A_TP_QOS_REG2 0x3e8 114762306a36Sopenharmony_ci#define A_TP_QOS_REG3 0x3ec 114862306a36Sopenharmony_ci#define A_TP_QOS_REG4 0x3f0 114962306a36Sopenharmony_ci#define A_TP_QOS_REG5 0x3f4 115062306a36Sopenharmony_ci#define A_TP_QOS_REG6 0x3f8 115162306a36Sopenharmony_ci#define A_TP_QOS_REG7 0x3fc 115262306a36Sopenharmony_ci#define A_TP_MTU_REG0 0x404 115362306a36Sopenharmony_ci#define A_TP_MTU_REG1 0x408 115462306a36Sopenharmony_ci#define A_TP_MTU_REG2 0x40c 115562306a36Sopenharmony_ci#define A_TP_MTU_REG3 0x410 115662306a36Sopenharmony_ci#define A_TP_MTU_REG4 0x414 115762306a36Sopenharmony_ci#define A_TP_MTU_REG5 0x418 115862306a36Sopenharmony_ci#define A_TP_MTU_REG6 0x41c 115962306a36Sopenharmony_ci#define A_TP_MTU_REG7 0x420 116062306a36Sopenharmony_ci#define A_TP_RESET 0x44c 116162306a36Sopenharmony_ci 116262306a36Sopenharmony_ci#define S_TP_RESET 0 116362306a36Sopenharmony_ci#define V_TP_RESET(x) ((x) << S_TP_RESET) 116462306a36Sopenharmony_ci#define F_TP_RESET V_TP_RESET(1U) 116562306a36Sopenharmony_ci 116662306a36Sopenharmony_ci#define S_CM_MEMMGR_INIT 1 116762306a36Sopenharmony_ci#define V_CM_MEMMGR_INIT(x) ((x) << S_CM_MEMMGR_INIT) 116862306a36Sopenharmony_ci#define F_CM_MEMMGR_INIT V_CM_MEMMGR_INIT(1U) 116962306a36Sopenharmony_ci 117062306a36Sopenharmony_ci#define A_TP_MIB_INDEX 0x450 117162306a36Sopenharmony_ci#define A_TP_MIB_DATA 0x454 117262306a36Sopenharmony_ci#define A_TP_SYNC_TIME_HI 0x458 117362306a36Sopenharmony_ci#define A_TP_SYNC_TIME_LO 0x45c 117462306a36Sopenharmony_ci#define A_TP_CM_MM_RX_FLST_BASE 0x460 117562306a36Sopenharmony_ci 117662306a36Sopenharmony_ci#define S_CM_MEMMGR_RX_FREE_LIST_BASE 0 117762306a36Sopenharmony_ci#define M_CM_MEMMGR_RX_FREE_LIST_BASE 0xfffffff 117862306a36Sopenharmony_ci#define V_CM_MEMMGR_RX_FREE_LIST_BASE(x) ((x) << S_CM_MEMMGR_RX_FREE_LIST_BASE) 117962306a36Sopenharmony_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) 118062306a36Sopenharmony_ci 118162306a36Sopenharmony_ci#define A_TP_CM_MM_TX_FLST_BASE 0x464 118262306a36Sopenharmony_ci 118362306a36Sopenharmony_ci#define S_CM_MEMMGR_TX_FREE_LIST_BASE 0 118462306a36Sopenharmony_ci#define M_CM_MEMMGR_TX_FREE_LIST_BASE 0xfffffff 118562306a36Sopenharmony_ci#define V_CM_MEMMGR_TX_FREE_LIST_BASE(x) ((x) << S_CM_MEMMGR_TX_FREE_LIST_BASE) 118662306a36Sopenharmony_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) 118762306a36Sopenharmony_ci 118862306a36Sopenharmony_ci#define A_TP_CM_MM_P_FLST_BASE 0x468 118962306a36Sopenharmony_ci 119062306a36Sopenharmony_ci#define S_CM_MEMMGR_PSTRUCT_FREE_LIST_BASE 0 119162306a36Sopenharmony_ci#define M_CM_MEMMGR_PSTRUCT_FREE_LIST_BASE 0xfffffff 119262306a36Sopenharmony_ci#define V_CM_MEMMGR_PSTRUCT_FREE_LIST_BASE(x) ((x) << S_CM_MEMMGR_PSTRUCT_FREE_LIST_BASE) 119362306a36Sopenharmony_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) 119462306a36Sopenharmony_ci 119562306a36Sopenharmony_ci#define A_TP_CM_MM_MAX_P 0x46c 119662306a36Sopenharmony_ci 119762306a36Sopenharmony_ci#define S_CM_MEMMGR_MAX_PSTRUCT 0 119862306a36Sopenharmony_ci#define M_CM_MEMMGR_MAX_PSTRUCT 0xfffffff 119962306a36Sopenharmony_ci#define V_CM_MEMMGR_MAX_PSTRUCT(x) ((x) << S_CM_MEMMGR_MAX_PSTRUCT) 120062306a36Sopenharmony_ci#define G_CM_MEMMGR_MAX_PSTRUCT(x) (((x) >> S_CM_MEMMGR_MAX_PSTRUCT) & M_CM_MEMMGR_MAX_PSTRUCT) 120162306a36Sopenharmony_ci 120262306a36Sopenharmony_ci#define A_TP_INT_ENABLE 0x470 120362306a36Sopenharmony_ci 120462306a36Sopenharmony_ci#define S_TX_FREE_LIST_EMPTY 0 120562306a36Sopenharmony_ci#define V_TX_FREE_LIST_EMPTY(x) ((x) << S_TX_FREE_LIST_EMPTY) 120662306a36Sopenharmony_ci#define F_TX_FREE_LIST_EMPTY V_TX_FREE_LIST_EMPTY(1U) 120762306a36Sopenharmony_ci 120862306a36Sopenharmony_ci#define S_RX_FREE_LIST_EMPTY 1 120962306a36Sopenharmony_ci#define V_RX_FREE_LIST_EMPTY(x) ((x) << S_RX_FREE_LIST_EMPTY) 121062306a36Sopenharmony_ci#define F_RX_FREE_LIST_EMPTY V_RX_FREE_LIST_EMPTY(1U) 121162306a36Sopenharmony_ci 121262306a36Sopenharmony_ci#define A_TP_INT_CAUSE 0x474 121362306a36Sopenharmony_ci#define A_TP_TIMER_SEPARATOR 0x4a4 121462306a36Sopenharmony_ci 121562306a36Sopenharmony_ci#define S_DISABLE_PAST_TIMER_INSERTION 0 121662306a36Sopenharmony_ci#define V_DISABLE_PAST_TIMER_INSERTION(x) ((x) << S_DISABLE_PAST_TIMER_INSERTION) 121762306a36Sopenharmony_ci#define F_DISABLE_PAST_TIMER_INSERTION V_DISABLE_PAST_TIMER_INSERTION(1U) 121862306a36Sopenharmony_ci 121962306a36Sopenharmony_ci#define S_MODULATION_TIMER_SEPARATOR 1 122062306a36Sopenharmony_ci#define M_MODULATION_TIMER_SEPARATOR 0x7fff 122162306a36Sopenharmony_ci#define V_MODULATION_TIMER_SEPARATOR(x) ((x) << S_MODULATION_TIMER_SEPARATOR) 122262306a36Sopenharmony_ci#define G_MODULATION_TIMER_SEPARATOR(x) (((x) >> S_MODULATION_TIMER_SEPARATOR) & M_MODULATION_TIMER_SEPARATOR) 122362306a36Sopenharmony_ci 122462306a36Sopenharmony_ci#define S_GLOBAL_TIMER_SEPARATOR 16 122562306a36Sopenharmony_ci#define M_GLOBAL_TIMER_SEPARATOR 0xffff 122662306a36Sopenharmony_ci#define V_GLOBAL_TIMER_SEPARATOR(x) ((x) << S_GLOBAL_TIMER_SEPARATOR) 122762306a36Sopenharmony_ci#define G_GLOBAL_TIMER_SEPARATOR(x) (((x) >> S_GLOBAL_TIMER_SEPARATOR) & M_GLOBAL_TIMER_SEPARATOR) 122862306a36Sopenharmony_ci 122962306a36Sopenharmony_ci#define A_TP_CM_FC_MODE 0x4b0 123062306a36Sopenharmony_ci#define A_TP_PC_CONGESTION_CNTL 0x4b4 123162306a36Sopenharmony_ci#define A_TP_TX_DROP_CONFIG 0x4b8 123262306a36Sopenharmony_ci 123362306a36Sopenharmony_ci#define S_ENABLE_TX_DROP 31 123462306a36Sopenharmony_ci#define V_ENABLE_TX_DROP(x) ((x) << S_ENABLE_TX_DROP) 123562306a36Sopenharmony_ci#define F_ENABLE_TX_DROP V_ENABLE_TX_DROP(1U) 123662306a36Sopenharmony_ci 123762306a36Sopenharmony_ci#define S_ENABLE_TX_ERROR 30 123862306a36Sopenharmony_ci#define V_ENABLE_TX_ERROR(x) ((x) << S_ENABLE_TX_ERROR) 123962306a36Sopenharmony_ci#define F_ENABLE_TX_ERROR V_ENABLE_TX_ERROR(1U) 124062306a36Sopenharmony_ci 124162306a36Sopenharmony_ci#define S_DROP_TICKS_CNT 4 124262306a36Sopenharmony_ci#define M_DROP_TICKS_CNT 0x3ffffff 124362306a36Sopenharmony_ci#define V_DROP_TICKS_CNT(x) ((x) << S_DROP_TICKS_CNT) 124462306a36Sopenharmony_ci#define G_DROP_TICKS_CNT(x) (((x) >> S_DROP_TICKS_CNT) & M_DROP_TICKS_CNT) 124562306a36Sopenharmony_ci 124662306a36Sopenharmony_ci#define S_NUM_PKTS_DROPPED 0 124762306a36Sopenharmony_ci#define M_NUM_PKTS_DROPPED 0xf 124862306a36Sopenharmony_ci#define V_NUM_PKTS_DROPPED(x) ((x) << S_NUM_PKTS_DROPPED) 124962306a36Sopenharmony_ci#define G_NUM_PKTS_DROPPED(x) (((x) >> S_NUM_PKTS_DROPPED) & M_NUM_PKTS_DROPPED) 125062306a36Sopenharmony_ci 125162306a36Sopenharmony_ci#define A_TP_TX_DROP_COUNT 0x4bc 125262306a36Sopenharmony_ci 125362306a36Sopenharmony_ci/* RAT registers */ 125462306a36Sopenharmony_ci#define A_RAT_ROUTE_CONTROL 0x580 125562306a36Sopenharmony_ci 125662306a36Sopenharmony_ci#define S_USE_ROUTE_TABLE 0 125762306a36Sopenharmony_ci#define V_USE_ROUTE_TABLE(x) ((x) << S_USE_ROUTE_TABLE) 125862306a36Sopenharmony_ci#define F_USE_ROUTE_TABLE V_USE_ROUTE_TABLE(1U) 125962306a36Sopenharmony_ci 126062306a36Sopenharmony_ci#define S_ENABLE_CSPI 1 126162306a36Sopenharmony_ci#define V_ENABLE_CSPI(x) ((x) << S_ENABLE_CSPI) 126262306a36Sopenharmony_ci#define F_ENABLE_CSPI V_ENABLE_CSPI(1U) 126362306a36Sopenharmony_ci 126462306a36Sopenharmony_ci#define S_ENABLE_PCIX 2 126562306a36Sopenharmony_ci#define V_ENABLE_PCIX(x) ((x) << S_ENABLE_PCIX) 126662306a36Sopenharmony_ci#define F_ENABLE_PCIX V_ENABLE_PCIX(1U) 126762306a36Sopenharmony_ci 126862306a36Sopenharmony_ci#define A_RAT_ROUTE_TABLE_INDEX 0x584 126962306a36Sopenharmony_ci 127062306a36Sopenharmony_ci#define S_ROUTE_TABLE_INDEX 0 127162306a36Sopenharmony_ci#define M_ROUTE_TABLE_INDEX 0xf 127262306a36Sopenharmony_ci#define V_ROUTE_TABLE_INDEX(x) ((x) << S_ROUTE_TABLE_INDEX) 127362306a36Sopenharmony_ci#define G_ROUTE_TABLE_INDEX(x) (((x) >> S_ROUTE_TABLE_INDEX) & M_ROUTE_TABLE_INDEX) 127462306a36Sopenharmony_ci 127562306a36Sopenharmony_ci#define A_RAT_ROUTE_TABLE_DATA 0x588 127662306a36Sopenharmony_ci#define A_RAT_NO_ROUTE 0x58c 127762306a36Sopenharmony_ci 127862306a36Sopenharmony_ci#define S_CPL_OPCODE 0 127962306a36Sopenharmony_ci#define M_CPL_OPCODE 0xff 128062306a36Sopenharmony_ci#define V_CPL_OPCODE(x) ((x) << S_CPL_OPCODE) 128162306a36Sopenharmony_ci#define G_CPL_OPCODE(x) (((x) >> S_CPL_OPCODE) & M_CPL_OPCODE) 128262306a36Sopenharmony_ci 128362306a36Sopenharmony_ci#define A_RAT_INTR_ENABLE 0x590 128462306a36Sopenharmony_ci 128562306a36Sopenharmony_ci#define S_ZEROROUTEERROR 0 128662306a36Sopenharmony_ci#define V_ZEROROUTEERROR(x) ((x) << S_ZEROROUTEERROR) 128762306a36Sopenharmony_ci#define F_ZEROROUTEERROR V_ZEROROUTEERROR(1U) 128862306a36Sopenharmony_ci 128962306a36Sopenharmony_ci#define S_CSPIFRAMINGERROR 1 129062306a36Sopenharmony_ci#define V_CSPIFRAMINGERROR(x) ((x) << S_CSPIFRAMINGERROR) 129162306a36Sopenharmony_ci#define F_CSPIFRAMINGERROR V_CSPIFRAMINGERROR(1U) 129262306a36Sopenharmony_ci 129362306a36Sopenharmony_ci#define S_SGEFRAMINGERROR 2 129462306a36Sopenharmony_ci#define V_SGEFRAMINGERROR(x) ((x) << S_SGEFRAMINGERROR) 129562306a36Sopenharmony_ci#define F_SGEFRAMINGERROR V_SGEFRAMINGERROR(1U) 129662306a36Sopenharmony_ci 129762306a36Sopenharmony_ci#define S_TPFRAMINGERROR 3 129862306a36Sopenharmony_ci#define V_TPFRAMINGERROR(x) ((x) << S_TPFRAMINGERROR) 129962306a36Sopenharmony_ci#define F_TPFRAMINGERROR V_TPFRAMINGERROR(1U) 130062306a36Sopenharmony_ci 130162306a36Sopenharmony_ci#define A_RAT_INTR_CAUSE 0x594 130262306a36Sopenharmony_ci 130362306a36Sopenharmony_ci/* CSPI registers */ 130462306a36Sopenharmony_ci#define A_CSPI_RX_AE_WM 0x810 130562306a36Sopenharmony_ci#define A_CSPI_RX_AF_WM 0x814 130662306a36Sopenharmony_ci#define A_CSPI_CALENDAR_LEN 0x818 130762306a36Sopenharmony_ci 130862306a36Sopenharmony_ci#define S_CALENDARLENGTH 0 130962306a36Sopenharmony_ci#define M_CALENDARLENGTH 0xffff 131062306a36Sopenharmony_ci#define V_CALENDARLENGTH(x) ((x) << S_CALENDARLENGTH) 131162306a36Sopenharmony_ci#define G_CALENDARLENGTH(x) (((x) >> S_CALENDARLENGTH) & M_CALENDARLENGTH) 131262306a36Sopenharmony_ci 131362306a36Sopenharmony_ci#define A_CSPI_FIFO_STATUS_ENABLE 0x820 131462306a36Sopenharmony_ci 131562306a36Sopenharmony_ci#define S_FIFOSTATUSENABLE 0 131662306a36Sopenharmony_ci#define V_FIFOSTATUSENABLE(x) ((x) << S_FIFOSTATUSENABLE) 131762306a36Sopenharmony_ci#define F_FIFOSTATUSENABLE V_FIFOSTATUSENABLE(1U) 131862306a36Sopenharmony_ci 131962306a36Sopenharmony_ci#define A_CSPI_MAXBURST1_MAXBURST2 0x828 132062306a36Sopenharmony_ci 132162306a36Sopenharmony_ci#define S_MAXBURST1 0 132262306a36Sopenharmony_ci#define M_MAXBURST1 0xffff 132362306a36Sopenharmony_ci#define V_MAXBURST1(x) ((x) << S_MAXBURST1) 132462306a36Sopenharmony_ci#define G_MAXBURST1(x) (((x) >> S_MAXBURST1) & M_MAXBURST1) 132562306a36Sopenharmony_ci 132662306a36Sopenharmony_ci#define S_MAXBURST2 16 132762306a36Sopenharmony_ci#define M_MAXBURST2 0xffff 132862306a36Sopenharmony_ci#define V_MAXBURST2(x) ((x) << S_MAXBURST2) 132962306a36Sopenharmony_ci#define G_MAXBURST2(x) (((x) >> S_MAXBURST2) & M_MAXBURST2) 133062306a36Sopenharmony_ci 133162306a36Sopenharmony_ci#define A_CSPI_TRAIN 0x82c 133262306a36Sopenharmony_ci 133362306a36Sopenharmony_ci#define S_CSPI_TRAIN_ALPHA 0 133462306a36Sopenharmony_ci#define M_CSPI_TRAIN_ALPHA 0xffff 133562306a36Sopenharmony_ci#define V_CSPI_TRAIN_ALPHA(x) ((x) << S_CSPI_TRAIN_ALPHA) 133662306a36Sopenharmony_ci#define G_CSPI_TRAIN_ALPHA(x) (((x) >> S_CSPI_TRAIN_ALPHA) & M_CSPI_TRAIN_ALPHA) 133762306a36Sopenharmony_ci 133862306a36Sopenharmony_ci#define S_CSPI_TRAIN_DATA_MAXT 16 133962306a36Sopenharmony_ci#define M_CSPI_TRAIN_DATA_MAXT 0xffff 134062306a36Sopenharmony_ci#define V_CSPI_TRAIN_DATA_MAXT(x) ((x) << S_CSPI_TRAIN_DATA_MAXT) 134162306a36Sopenharmony_ci#define G_CSPI_TRAIN_DATA_MAXT(x) (((x) >> S_CSPI_TRAIN_DATA_MAXT) & M_CSPI_TRAIN_DATA_MAXT) 134262306a36Sopenharmony_ci 134362306a36Sopenharmony_ci#define A_CSPI_INTR_STATUS 0x848 134462306a36Sopenharmony_ci 134562306a36Sopenharmony_ci#define S_DIP4ERR 0 134662306a36Sopenharmony_ci#define V_DIP4ERR(x) ((x) << S_DIP4ERR) 134762306a36Sopenharmony_ci#define F_DIP4ERR V_DIP4ERR(1U) 134862306a36Sopenharmony_ci 134962306a36Sopenharmony_ci#define S_RXDROP 1 135062306a36Sopenharmony_ci#define V_RXDROP(x) ((x) << S_RXDROP) 135162306a36Sopenharmony_ci#define F_RXDROP V_RXDROP(1U) 135262306a36Sopenharmony_ci 135362306a36Sopenharmony_ci#define S_TXDROP 2 135462306a36Sopenharmony_ci#define V_TXDROP(x) ((x) << S_TXDROP) 135562306a36Sopenharmony_ci#define F_TXDROP V_TXDROP(1U) 135662306a36Sopenharmony_ci 135762306a36Sopenharmony_ci#define S_RXOVERFLOW 3 135862306a36Sopenharmony_ci#define V_RXOVERFLOW(x) ((x) << S_RXOVERFLOW) 135962306a36Sopenharmony_ci#define F_RXOVERFLOW V_RXOVERFLOW(1U) 136062306a36Sopenharmony_ci 136162306a36Sopenharmony_ci#define S_RAMPARITYERR 4 136262306a36Sopenharmony_ci#define V_RAMPARITYERR(x) ((x) << S_RAMPARITYERR) 136362306a36Sopenharmony_ci#define F_RAMPARITYERR V_RAMPARITYERR(1U) 136462306a36Sopenharmony_ci 136562306a36Sopenharmony_ci#define A_CSPI_INTR_ENABLE 0x84c 136662306a36Sopenharmony_ci 136762306a36Sopenharmony_ci/* ESPI registers */ 136862306a36Sopenharmony_ci#define A_ESPI_SCH_TOKEN0 0x880 136962306a36Sopenharmony_ci 137062306a36Sopenharmony_ci#define S_SCHTOKEN0 0 137162306a36Sopenharmony_ci#define M_SCHTOKEN0 0xffff 137262306a36Sopenharmony_ci#define V_SCHTOKEN0(x) ((x) << S_SCHTOKEN0) 137362306a36Sopenharmony_ci#define G_SCHTOKEN0(x) (((x) >> S_SCHTOKEN0) & M_SCHTOKEN0) 137462306a36Sopenharmony_ci 137562306a36Sopenharmony_ci#define A_ESPI_SCH_TOKEN1 0x884 137662306a36Sopenharmony_ci 137762306a36Sopenharmony_ci#define S_SCHTOKEN1 0 137862306a36Sopenharmony_ci#define M_SCHTOKEN1 0xffff 137962306a36Sopenharmony_ci#define V_SCHTOKEN1(x) ((x) << S_SCHTOKEN1) 138062306a36Sopenharmony_ci#define G_SCHTOKEN1(x) (((x) >> S_SCHTOKEN1) & M_SCHTOKEN1) 138162306a36Sopenharmony_ci 138262306a36Sopenharmony_ci#define A_ESPI_SCH_TOKEN2 0x888 138362306a36Sopenharmony_ci 138462306a36Sopenharmony_ci#define S_SCHTOKEN2 0 138562306a36Sopenharmony_ci#define M_SCHTOKEN2 0xffff 138662306a36Sopenharmony_ci#define V_SCHTOKEN2(x) ((x) << S_SCHTOKEN2) 138762306a36Sopenharmony_ci#define G_SCHTOKEN2(x) (((x) >> S_SCHTOKEN2) & M_SCHTOKEN2) 138862306a36Sopenharmony_ci 138962306a36Sopenharmony_ci#define A_ESPI_SCH_TOKEN3 0x88c 139062306a36Sopenharmony_ci 139162306a36Sopenharmony_ci#define S_SCHTOKEN3 0 139262306a36Sopenharmony_ci#define M_SCHTOKEN3 0xffff 139362306a36Sopenharmony_ci#define V_SCHTOKEN3(x) ((x) << S_SCHTOKEN3) 139462306a36Sopenharmony_ci#define G_SCHTOKEN3(x) (((x) >> S_SCHTOKEN3) & M_SCHTOKEN3) 139562306a36Sopenharmony_ci 139662306a36Sopenharmony_ci#define A_ESPI_RX_FIFO_ALMOST_EMPTY_WATERMARK 0x890 139762306a36Sopenharmony_ci 139862306a36Sopenharmony_ci#define S_ALMOSTEMPTY 0 139962306a36Sopenharmony_ci#define M_ALMOSTEMPTY 0xffff 140062306a36Sopenharmony_ci#define V_ALMOSTEMPTY(x) ((x) << S_ALMOSTEMPTY) 140162306a36Sopenharmony_ci#define G_ALMOSTEMPTY(x) (((x) >> S_ALMOSTEMPTY) & M_ALMOSTEMPTY) 140262306a36Sopenharmony_ci 140362306a36Sopenharmony_ci#define A_ESPI_RX_FIFO_ALMOST_FULL_WATERMARK 0x894 140462306a36Sopenharmony_ci 140562306a36Sopenharmony_ci#define S_ALMOSTFULL 0 140662306a36Sopenharmony_ci#define M_ALMOSTFULL 0xffff 140762306a36Sopenharmony_ci#define V_ALMOSTFULL(x) ((x) << S_ALMOSTFULL) 140862306a36Sopenharmony_ci#define G_ALMOSTFULL(x) (((x) >> S_ALMOSTFULL) & M_ALMOSTFULL) 140962306a36Sopenharmony_ci 141062306a36Sopenharmony_ci#define A_ESPI_CALENDAR_LENGTH 0x898 141162306a36Sopenharmony_ci#define A_PORT_CONFIG 0x89c 141262306a36Sopenharmony_ci 141362306a36Sopenharmony_ci#define S_RX_NPORTS 0 141462306a36Sopenharmony_ci#define M_RX_NPORTS 0xff 141562306a36Sopenharmony_ci#define V_RX_NPORTS(x) ((x) << S_RX_NPORTS) 141662306a36Sopenharmony_ci#define G_RX_NPORTS(x) (((x) >> S_RX_NPORTS) & M_RX_NPORTS) 141762306a36Sopenharmony_ci 141862306a36Sopenharmony_ci#define S_TX_NPORTS 8 141962306a36Sopenharmony_ci#define M_TX_NPORTS 0xff 142062306a36Sopenharmony_ci#define V_TX_NPORTS(x) ((x) << S_TX_NPORTS) 142162306a36Sopenharmony_ci#define G_TX_NPORTS(x) (((x) >> S_TX_NPORTS) & M_TX_NPORTS) 142262306a36Sopenharmony_ci 142362306a36Sopenharmony_ci#define A_ESPI_FIFO_STATUS_ENABLE 0x8a0 142462306a36Sopenharmony_ci 142562306a36Sopenharmony_ci#define S_RXSTATUSENABLE 0 142662306a36Sopenharmony_ci#define V_RXSTATUSENABLE(x) ((x) << S_RXSTATUSENABLE) 142762306a36Sopenharmony_ci#define F_RXSTATUSENABLE V_RXSTATUSENABLE(1U) 142862306a36Sopenharmony_ci 142962306a36Sopenharmony_ci#define S_TXDROPENABLE 1 143062306a36Sopenharmony_ci#define V_TXDROPENABLE(x) ((x) << S_TXDROPENABLE) 143162306a36Sopenharmony_ci#define F_TXDROPENABLE V_TXDROPENABLE(1U) 143262306a36Sopenharmony_ci 143362306a36Sopenharmony_ci#define S_RXENDIANMODE 2 143462306a36Sopenharmony_ci#define V_RXENDIANMODE(x) ((x) << S_RXENDIANMODE) 143562306a36Sopenharmony_ci#define F_RXENDIANMODE V_RXENDIANMODE(1U) 143662306a36Sopenharmony_ci 143762306a36Sopenharmony_ci#define S_TXENDIANMODE 3 143862306a36Sopenharmony_ci#define V_TXENDIANMODE(x) ((x) << S_TXENDIANMODE) 143962306a36Sopenharmony_ci#define F_TXENDIANMODE V_TXENDIANMODE(1U) 144062306a36Sopenharmony_ci 144162306a36Sopenharmony_ci#define S_INTEL1010MODE 4 144262306a36Sopenharmony_ci#define V_INTEL1010MODE(x) ((x) << S_INTEL1010MODE) 144362306a36Sopenharmony_ci#define F_INTEL1010MODE V_INTEL1010MODE(1U) 144462306a36Sopenharmony_ci 144562306a36Sopenharmony_ci#define A_ESPI_MAXBURST1_MAXBURST2 0x8a8 144662306a36Sopenharmony_ci#define A_ESPI_TRAIN 0x8ac 144762306a36Sopenharmony_ci 144862306a36Sopenharmony_ci#define S_MAXTRAINALPHA 0 144962306a36Sopenharmony_ci#define M_MAXTRAINALPHA 0xffff 145062306a36Sopenharmony_ci#define V_MAXTRAINALPHA(x) ((x) << S_MAXTRAINALPHA) 145162306a36Sopenharmony_ci#define G_MAXTRAINALPHA(x) (((x) >> S_MAXTRAINALPHA) & M_MAXTRAINALPHA) 145262306a36Sopenharmony_ci 145362306a36Sopenharmony_ci#define S_MAXTRAINDATA 16 145462306a36Sopenharmony_ci#define M_MAXTRAINDATA 0xffff 145562306a36Sopenharmony_ci#define V_MAXTRAINDATA(x) ((x) << S_MAXTRAINDATA) 145662306a36Sopenharmony_ci#define G_MAXTRAINDATA(x) (((x) >> S_MAXTRAINDATA) & M_MAXTRAINDATA) 145762306a36Sopenharmony_ci 145862306a36Sopenharmony_ci#define A_RAM_STATUS 0x8b0 145962306a36Sopenharmony_ci 146062306a36Sopenharmony_ci#define S_RXFIFOPARITYERROR 0 146162306a36Sopenharmony_ci#define M_RXFIFOPARITYERROR 0x3ff 146262306a36Sopenharmony_ci#define V_RXFIFOPARITYERROR(x) ((x) << S_RXFIFOPARITYERROR) 146362306a36Sopenharmony_ci#define G_RXFIFOPARITYERROR(x) (((x) >> S_RXFIFOPARITYERROR) & M_RXFIFOPARITYERROR) 146462306a36Sopenharmony_ci 146562306a36Sopenharmony_ci#define S_TXFIFOPARITYERROR 10 146662306a36Sopenharmony_ci#define M_TXFIFOPARITYERROR 0x3ff 146762306a36Sopenharmony_ci#define V_TXFIFOPARITYERROR(x) ((x) << S_TXFIFOPARITYERROR) 146862306a36Sopenharmony_ci#define G_TXFIFOPARITYERROR(x) (((x) >> S_TXFIFOPARITYERROR) & M_TXFIFOPARITYERROR) 146962306a36Sopenharmony_ci 147062306a36Sopenharmony_ci#define S_RXFIFOOVERFLOW 20 147162306a36Sopenharmony_ci#define M_RXFIFOOVERFLOW 0x3ff 147262306a36Sopenharmony_ci#define V_RXFIFOOVERFLOW(x) ((x) << S_RXFIFOOVERFLOW) 147362306a36Sopenharmony_ci#define G_RXFIFOOVERFLOW(x) (((x) >> S_RXFIFOOVERFLOW) & M_RXFIFOOVERFLOW) 147462306a36Sopenharmony_ci 147562306a36Sopenharmony_ci#define A_TX_DROP_COUNT0 0x8b4 147662306a36Sopenharmony_ci 147762306a36Sopenharmony_ci#define S_TXPORT0DROPCNT 0 147862306a36Sopenharmony_ci#define M_TXPORT0DROPCNT 0xffff 147962306a36Sopenharmony_ci#define V_TXPORT0DROPCNT(x) ((x) << S_TXPORT0DROPCNT) 148062306a36Sopenharmony_ci#define G_TXPORT0DROPCNT(x) (((x) >> S_TXPORT0DROPCNT) & M_TXPORT0DROPCNT) 148162306a36Sopenharmony_ci 148262306a36Sopenharmony_ci#define S_TXPORT1DROPCNT 16 148362306a36Sopenharmony_ci#define M_TXPORT1DROPCNT 0xffff 148462306a36Sopenharmony_ci#define V_TXPORT1DROPCNT(x) ((x) << S_TXPORT1DROPCNT) 148562306a36Sopenharmony_ci#define G_TXPORT1DROPCNT(x) (((x) >> S_TXPORT1DROPCNT) & M_TXPORT1DROPCNT) 148662306a36Sopenharmony_ci 148762306a36Sopenharmony_ci#define A_TX_DROP_COUNT1 0x8b8 148862306a36Sopenharmony_ci 148962306a36Sopenharmony_ci#define S_TXPORT2DROPCNT 0 149062306a36Sopenharmony_ci#define M_TXPORT2DROPCNT 0xffff 149162306a36Sopenharmony_ci#define V_TXPORT2DROPCNT(x) ((x) << S_TXPORT2DROPCNT) 149262306a36Sopenharmony_ci#define G_TXPORT2DROPCNT(x) (((x) >> S_TXPORT2DROPCNT) & M_TXPORT2DROPCNT) 149362306a36Sopenharmony_ci 149462306a36Sopenharmony_ci#define S_TXPORT3DROPCNT 16 149562306a36Sopenharmony_ci#define M_TXPORT3DROPCNT 0xffff 149662306a36Sopenharmony_ci#define V_TXPORT3DROPCNT(x) ((x) << S_TXPORT3DROPCNT) 149762306a36Sopenharmony_ci#define G_TXPORT3DROPCNT(x) (((x) >> S_TXPORT3DROPCNT) & M_TXPORT3DROPCNT) 149862306a36Sopenharmony_ci 149962306a36Sopenharmony_ci#define A_RX_DROP_COUNT0 0x8bc 150062306a36Sopenharmony_ci 150162306a36Sopenharmony_ci#define S_RXPORT0DROPCNT 0 150262306a36Sopenharmony_ci#define M_RXPORT0DROPCNT 0xffff 150362306a36Sopenharmony_ci#define V_RXPORT0DROPCNT(x) ((x) << S_RXPORT0DROPCNT) 150462306a36Sopenharmony_ci#define G_RXPORT0DROPCNT(x) (((x) >> S_RXPORT0DROPCNT) & M_RXPORT0DROPCNT) 150562306a36Sopenharmony_ci 150662306a36Sopenharmony_ci#define S_RXPORT1DROPCNT 16 150762306a36Sopenharmony_ci#define M_RXPORT1DROPCNT 0xffff 150862306a36Sopenharmony_ci#define V_RXPORT1DROPCNT(x) ((x) << S_RXPORT1DROPCNT) 150962306a36Sopenharmony_ci#define G_RXPORT1DROPCNT(x) (((x) >> S_RXPORT1DROPCNT) & M_RXPORT1DROPCNT) 151062306a36Sopenharmony_ci 151162306a36Sopenharmony_ci#define A_RX_DROP_COUNT1 0x8c0 151262306a36Sopenharmony_ci 151362306a36Sopenharmony_ci#define S_RXPORT2DROPCNT 0 151462306a36Sopenharmony_ci#define M_RXPORT2DROPCNT 0xffff 151562306a36Sopenharmony_ci#define V_RXPORT2DROPCNT(x) ((x) << S_RXPORT2DROPCNT) 151662306a36Sopenharmony_ci#define G_RXPORT2DROPCNT(x) (((x) >> S_RXPORT2DROPCNT) & M_RXPORT2DROPCNT) 151762306a36Sopenharmony_ci 151862306a36Sopenharmony_ci#define S_RXPORT3DROPCNT 16 151962306a36Sopenharmony_ci#define M_RXPORT3DROPCNT 0xffff 152062306a36Sopenharmony_ci#define V_RXPORT3DROPCNT(x) ((x) << S_RXPORT3DROPCNT) 152162306a36Sopenharmony_ci#define G_RXPORT3DROPCNT(x) (((x) >> S_RXPORT3DROPCNT) & M_RXPORT3DROPCNT) 152262306a36Sopenharmony_ci 152362306a36Sopenharmony_ci#define A_DIP4_ERROR_COUNT 0x8c4 152462306a36Sopenharmony_ci 152562306a36Sopenharmony_ci#define S_DIP4ERRORCNT 0 152662306a36Sopenharmony_ci#define M_DIP4ERRORCNT 0xfff 152762306a36Sopenharmony_ci#define V_DIP4ERRORCNT(x) ((x) << S_DIP4ERRORCNT) 152862306a36Sopenharmony_ci#define G_DIP4ERRORCNT(x) (((x) >> S_DIP4ERRORCNT) & M_DIP4ERRORCNT) 152962306a36Sopenharmony_ci 153062306a36Sopenharmony_ci#define S_DIP4ERRORCNTSHADOW 12 153162306a36Sopenharmony_ci#define M_DIP4ERRORCNTSHADOW 0xfff 153262306a36Sopenharmony_ci#define V_DIP4ERRORCNTSHADOW(x) ((x) << S_DIP4ERRORCNTSHADOW) 153362306a36Sopenharmony_ci#define G_DIP4ERRORCNTSHADOW(x) (((x) >> S_DIP4ERRORCNTSHADOW) & M_DIP4ERRORCNTSHADOW) 153462306a36Sopenharmony_ci 153562306a36Sopenharmony_ci#define S_TRICN_RX_TRAIN_ERR 24 153662306a36Sopenharmony_ci#define V_TRICN_RX_TRAIN_ERR(x) ((x) << S_TRICN_RX_TRAIN_ERR) 153762306a36Sopenharmony_ci#define F_TRICN_RX_TRAIN_ERR V_TRICN_RX_TRAIN_ERR(1U) 153862306a36Sopenharmony_ci 153962306a36Sopenharmony_ci#define S_TRICN_RX_TRAINING 25 154062306a36Sopenharmony_ci#define V_TRICN_RX_TRAINING(x) ((x) << S_TRICN_RX_TRAINING) 154162306a36Sopenharmony_ci#define F_TRICN_RX_TRAINING V_TRICN_RX_TRAINING(1U) 154262306a36Sopenharmony_ci 154362306a36Sopenharmony_ci#define S_TRICN_RX_TRAIN_OK 26 154462306a36Sopenharmony_ci#define V_TRICN_RX_TRAIN_OK(x) ((x) << S_TRICN_RX_TRAIN_OK) 154562306a36Sopenharmony_ci#define F_TRICN_RX_TRAIN_OK V_TRICN_RX_TRAIN_OK(1U) 154662306a36Sopenharmony_ci 154762306a36Sopenharmony_ci#define A_ESPI_INTR_STATUS 0x8c8 154862306a36Sopenharmony_ci 154962306a36Sopenharmony_ci#define S_DIP2PARITYERR 5 155062306a36Sopenharmony_ci#define V_DIP2PARITYERR(x) ((x) << S_DIP2PARITYERR) 155162306a36Sopenharmony_ci#define F_DIP2PARITYERR V_DIP2PARITYERR(1U) 155262306a36Sopenharmony_ci 155362306a36Sopenharmony_ci#define A_ESPI_INTR_ENABLE 0x8cc 155462306a36Sopenharmony_ci#define A_RX_DROP_THRESHOLD 0x8d0 155562306a36Sopenharmony_ci#define A_ESPI_RX_RESET 0x8ec 155662306a36Sopenharmony_ci 155762306a36Sopenharmony_ci#define S_ESPI_RX_LNK_RST 0 155862306a36Sopenharmony_ci#define V_ESPI_RX_LNK_RST(x) ((x) << S_ESPI_RX_LNK_RST) 155962306a36Sopenharmony_ci#define F_ESPI_RX_LNK_RST V_ESPI_RX_LNK_RST(1U) 156062306a36Sopenharmony_ci 156162306a36Sopenharmony_ci#define S_ESPI_RX_CORE_RST 1 156262306a36Sopenharmony_ci#define V_ESPI_RX_CORE_RST(x) ((x) << S_ESPI_RX_CORE_RST) 156362306a36Sopenharmony_ci#define F_ESPI_RX_CORE_RST V_ESPI_RX_CORE_RST(1U) 156462306a36Sopenharmony_ci 156562306a36Sopenharmony_ci#define S_RX_CLK_STATUS 2 156662306a36Sopenharmony_ci#define V_RX_CLK_STATUS(x) ((x) << S_RX_CLK_STATUS) 156762306a36Sopenharmony_ci#define F_RX_CLK_STATUS V_RX_CLK_STATUS(1U) 156862306a36Sopenharmony_ci 156962306a36Sopenharmony_ci#define A_ESPI_MISC_CONTROL 0x8f0 157062306a36Sopenharmony_ci 157162306a36Sopenharmony_ci#define S_OUT_OF_SYNC_COUNT 0 157262306a36Sopenharmony_ci#define M_OUT_OF_SYNC_COUNT 0xf 157362306a36Sopenharmony_ci#define V_OUT_OF_SYNC_COUNT(x) ((x) << S_OUT_OF_SYNC_COUNT) 157462306a36Sopenharmony_ci#define G_OUT_OF_SYNC_COUNT(x) (((x) >> S_OUT_OF_SYNC_COUNT) & M_OUT_OF_SYNC_COUNT) 157562306a36Sopenharmony_ci 157662306a36Sopenharmony_ci#define S_DIP2_COUNT_MODE_ENABLE 4 157762306a36Sopenharmony_ci#define V_DIP2_COUNT_MODE_ENABLE(x) ((x) << S_DIP2_COUNT_MODE_ENABLE) 157862306a36Sopenharmony_ci#define F_DIP2_COUNT_MODE_ENABLE V_DIP2_COUNT_MODE_ENABLE(1U) 157962306a36Sopenharmony_ci 158062306a36Sopenharmony_ci#define S_DIP2_PARITY_ERR_THRES 5 158162306a36Sopenharmony_ci#define M_DIP2_PARITY_ERR_THRES 0xf 158262306a36Sopenharmony_ci#define V_DIP2_PARITY_ERR_THRES(x) ((x) << S_DIP2_PARITY_ERR_THRES) 158362306a36Sopenharmony_ci#define G_DIP2_PARITY_ERR_THRES(x) (((x) >> S_DIP2_PARITY_ERR_THRES) & M_DIP2_PARITY_ERR_THRES) 158462306a36Sopenharmony_ci 158562306a36Sopenharmony_ci#define S_DIP4_THRES 9 158662306a36Sopenharmony_ci#define M_DIP4_THRES 0xfff 158762306a36Sopenharmony_ci#define V_DIP4_THRES(x) ((x) << S_DIP4_THRES) 158862306a36Sopenharmony_ci#define G_DIP4_THRES(x) (((x) >> S_DIP4_THRES) & M_DIP4_THRES) 158962306a36Sopenharmony_ci 159062306a36Sopenharmony_ci#define S_DIP4_THRES_ENABLE 21 159162306a36Sopenharmony_ci#define V_DIP4_THRES_ENABLE(x) ((x) << S_DIP4_THRES_ENABLE) 159262306a36Sopenharmony_ci#define F_DIP4_THRES_ENABLE V_DIP4_THRES_ENABLE(1U) 159362306a36Sopenharmony_ci 159462306a36Sopenharmony_ci#define S_FORCE_DISABLE_STATUS 22 159562306a36Sopenharmony_ci#define V_FORCE_DISABLE_STATUS(x) ((x) << S_FORCE_DISABLE_STATUS) 159662306a36Sopenharmony_ci#define F_FORCE_DISABLE_STATUS V_FORCE_DISABLE_STATUS(1U) 159762306a36Sopenharmony_ci 159862306a36Sopenharmony_ci#define S_DYNAMIC_DESKEW 23 159962306a36Sopenharmony_ci#define V_DYNAMIC_DESKEW(x) ((x) << S_DYNAMIC_DESKEW) 160062306a36Sopenharmony_ci#define F_DYNAMIC_DESKEW V_DYNAMIC_DESKEW(1U) 160162306a36Sopenharmony_ci 160262306a36Sopenharmony_ci#define S_MONITORED_PORT_NUM 25 160362306a36Sopenharmony_ci#define M_MONITORED_PORT_NUM 0x3 160462306a36Sopenharmony_ci#define V_MONITORED_PORT_NUM(x) ((x) << S_MONITORED_PORT_NUM) 160562306a36Sopenharmony_ci#define G_MONITORED_PORT_NUM(x) (((x) >> S_MONITORED_PORT_NUM) & M_MONITORED_PORT_NUM) 160662306a36Sopenharmony_ci 160762306a36Sopenharmony_ci#define S_MONITORED_DIRECTION 27 160862306a36Sopenharmony_ci#define V_MONITORED_DIRECTION(x) ((x) << S_MONITORED_DIRECTION) 160962306a36Sopenharmony_ci#define F_MONITORED_DIRECTION V_MONITORED_DIRECTION(1U) 161062306a36Sopenharmony_ci 161162306a36Sopenharmony_ci#define S_MONITORED_INTERFACE 28 161262306a36Sopenharmony_ci#define V_MONITORED_INTERFACE(x) ((x) << S_MONITORED_INTERFACE) 161362306a36Sopenharmony_ci#define F_MONITORED_INTERFACE V_MONITORED_INTERFACE(1U) 161462306a36Sopenharmony_ci 161562306a36Sopenharmony_ci#define A_ESPI_DIP2_ERR_COUNT 0x8f4 161662306a36Sopenharmony_ci 161762306a36Sopenharmony_ci#define S_DIP2_ERR_CNT 0 161862306a36Sopenharmony_ci#define M_DIP2_ERR_CNT 0xf 161962306a36Sopenharmony_ci#define V_DIP2_ERR_CNT(x) ((x) << S_DIP2_ERR_CNT) 162062306a36Sopenharmony_ci#define G_DIP2_ERR_CNT(x) (((x) >> S_DIP2_ERR_CNT) & M_DIP2_ERR_CNT) 162162306a36Sopenharmony_ci 162262306a36Sopenharmony_ci#define A_ESPI_CMD_ADDR 0x8f8 162362306a36Sopenharmony_ci 162462306a36Sopenharmony_ci#define S_WRITE_DATA 0 162562306a36Sopenharmony_ci#define M_WRITE_DATA 0xff 162662306a36Sopenharmony_ci#define V_WRITE_DATA(x) ((x) << S_WRITE_DATA) 162762306a36Sopenharmony_ci#define G_WRITE_DATA(x) (((x) >> S_WRITE_DATA) & M_WRITE_DATA) 162862306a36Sopenharmony_ci 162962306a36Sopenharmony_ci#define S_REGISTER_OFFSET 8 163062306a36Sopenharmony_ci#define M_REGISTER_OFFSET 0xf 163162306a36Sopenharmony_ci#define V_REGISTER_OFFSET(x) ((x) << S_REGISTER_OFFSET) 163262306a36Sopenharmony_ci#define G_REGISTER_OFFSET(x) (((x) >> S_REGISTER_OFFSET) & M_REGISTER_OFFSET) 163362306a36Sopenharmony_ci 163462306a36Sopenharmony_ci#define S_CHANNEL_ADDR 12 163562306a36Sopenharmony_ci#define M_CHANNEL_ADDR 0xf 163662306a36Sopenharmony_ci#define V_CHANNEL_ADDR(x) ((x) << S_CHANNEL_ADDR) 163762306a36Sopenharmony_ci#define G_CHANNEL_ADDR(x) (((x) >> S_CHANNEL_ADDR) & M_CHANNEL_ADDR) 163862306a36Sopenharmony_ci 163962306a36Sopenharmony_ci#define S_MODULE_ADDR 16 164062306a36Sopenharmony_ci#define M_MODULE_ADDR 0x3 164162306a36Sopenharmony_ci#define V_MODULE_ADDR(x) ((x) << S_MODULE_ADDR) 164262306a36Sopenharmony_ci#define G_MODULE_ADDR(x) (((x) >> S_MODULE_ADDR) & M_MODULE_ADDR) 164362306a36Sopenharmony_ci 164462306a36Sopenharmony_ci#define S_BUNDLE_ADDR 20 164562306a36Sopenharmony_ci#define M_BUNDLE_ADDR 0x3 164662306a36Sopenharmony_ci#define V_BUNDLE_ADDR(x) ((x) << S_BUNDLE_ADDR) 164762306a36Sopenharmony_ci#define G_BUNDLE_ADDR(x) (((x) >> S_BUNDLE_ADDR) & M_BUNDLE_ADDR) 164862306a36Sopenharmony_ci 164962306a36Sopenharmony_ci#define S_SPI4_COMMAND 24 165062306a36Sopenharmony_ci#define M_SPI4_COMMAND 0xff 165162306a36Sopenharmony_ci#define V_SPI4_COMMAND(x) ((x) << S_SPI4_COMMAND) 165262306a36Sopenharmony_ci#define G_SPI4_COMMAND(x) (((x) >> S_SPI4_COMMAND) & M_SPI4_COMMAND) 165362306a36Sopenharmony_ci 165462306a36Sopenharmony_ci#define A_ESPI_GOSTAT 0x8fc 165562306a36Sopenharmony_ci 165662306a36Sopenharmony_ci#define S_READ_DATA 0 165762306a36Sopenharmony_ci#define M_READ_DATA 0xff 165862306a36Sopenharmony_ci#define V_READ_DATA(x) ((x) << S_READ_DATA) 165962306a36Sopenharmony_ci#define G_READ_DATA(x) (((x) >> S_READ_DATA) & M_READ_DATA) 166062306a36Sopenharmony_ci 166162306a36Sopenharmony_ci#define S_ESPI_CMD_BUSY 8 166262306a36Sopenharmony_ci#define V_ESPI_CMD_BUSY(x) ((x) << S_ESPI_CMD_BUSY) 166362306a36Sopenharmony_ci#define F_ESPI_CMD_BUSY V_ESPI_CMD_BUSY(1U) 166462306a36Sopenharmony_ci 166562306a36Sopenharmony_ci#define S_ERROR_ACK 9 166662306a36Sopenharmony_ci#define V_ERROR_ACK(x) ((x) << S_ERROR_ACK) 166762306a36Sopenharmony_ci#define F_ERROR_ACK V_ERROR_ACK(1U) 166862306a36Sopenharmony_ci 166962306a36Sopenharmony_ci#define S_UNMAPPED_ERR 10 167062306a36Sopenharmony_ci#define V_UNMAPPED_ERR(x) ((x) << S_UNMAPPED_ERR) 167162306a36Sopenharmony_ci#define F_UNMAPPED_ERR V_UNMAPPED_ERR(1U) 167262306a36Sopenharmony_ci 167362306a36Sopenharmony_ci#define S_TRANSACTION_TIMER 16 167462306a36Sopenharmony_ci#define M_TRANSACTION_TIMER 0xff 167562306a36Sopenharmony_ci#define V_TRANSACTION_TIMER(x) ((x) << S_TRANSACTION_TIMER) 167662306a36Sopenharmony_ci#define G_TRANSACTION_TIMER(x) (((x) >> S_TRANSACTION_TIMER) & M_TRANSACTION_TIMER) 167762306a36Sopenharmony_ci 167862306a36Sopenharmony_ci 167962306a36Sopenharmony_ci/* ULP registers */ 168062306a36Sopenharmony_ci#define A_ULP_ULIMIT 0x980 168162306a36Sopenharmony_ci#define A_ULP_TAGMASK 0x984 168262306a36Sopenharmony_ci#define A_ULP_HREG_INDEX 0x988 168362306a36Sopenharmony_ci#define A_ULP_HREG_DATA 0x98c 168462306a36Sopenharmony_ci#define A_ULP_INT_ENABLE 0x990 168562306a36Sopenharmony_ci#define A_ULP_INT_CAUSE 0x994 168662306a36Sopenharmony_ci 168762306a36Sopenharmony_ci#define S_HREG_PAR_ERR 0 168862306a36Sopenharmony_ci#define V_HREG_PAR_ERR(x) ((x) << S_HREG_PAR_ERR) 168962306a36Sopenharmony_ci#define F_HREG_PAR_ERR V_HREG_PAR_ERR(1U) 169062306a36Sopenharmony_ci 169162306a36Sopenharmony_ci#define S_EGRS_DATA_PAR_ERR 1 169262306a36Sopenharmony_ci#define V_EGRS_DATA_PAR_ERR(x) ((x) << S_EGRS_DATA_PAR_ERR) 169362306a36Sopenharmony_ci#define F_EGRS_DATA_PAR_ERR V_EGRS_DATA_PAR_ERR(1U) 169462306a36Sopenharmony_ci 169562306a36Sopenharmony_ci#define S_INGRS_DATA_PAR_ERR 2 169662306a36Sopenharmony_ci#define V_INGRS_DATA_PAR_ERR(x) ((x) << S_INGRS_DATA_PAR_ERR) 169762306a36Sopenharmony_ci#define F_INGRS_DATA_PAR_ERR V_INGRS_DATA_PAR_ERR(1U) 169862306a36Sopenharmony_ci 169962306a36Sopenharmony_ci#define S_PM_INTR 3 170062306a36Sopenharmony_ci#define V_PM_INTR(x) ((x) << S_PM_INTR) 170162306a36Sopenharmony_ci#define F_PM_INTR V_PM_INTR(1U) 170262306a36Sopenharmony_ci 170362306a36Sopenharmony_ci#define S_PM_E2C_SYNC_ERR 4 170462306a36Sopenharmony_ci#define V_PM_E2C_SYNC_ERR(x) ((x) << S_PM_E2C_SYNC_ERR) 170562306a36Sopenharmony_ci#define F_PM_E2C_SYNC_ERR V_PM_E2C_SYNC_ERR(1U) 170662306a36Sopenharmony_ci 170762306a36Sopenharmony_ci#define S_PM_C2E_SYNC_ERR 5 170862306a36Sopenharmony_ci#define V_PM_C2E_SYNC_ERR(x) ((x) << S_PM_C2E_SYNC_ERR) 170962306a36Sopenharmony_ci#define F_PM_C2E_SYNC_ERR V_PM_C2E_SYNC_ERR(1U) 171062306a36Sopenharmony_ci 171162306a36Sopenharmony_ci#define S_PM_E2C_EMPTY_ERR 6 171262306a36Sopenharmony_ci#define V_PM_E2C_EMPTY_ERR(x) ((x) << S_PM_E2C_EMPTY_ERR) 171362306a36Sopenharmony_ci#define F_PM_E2C_EMPTY_ERR V_PM_E2C_EMPTY_ERR(1U) 171462306a36Sopenharmony_ci 171562306a36Sopenharmony_ci#define S_PM_C2E_EMPTY_ERR 7 171662306a36Sopenharmony_ci#define V_PM_C2E_EMPTY_ERR(x) ((x) << S_PM_C2E_EMPTY_ERR) 171762306a36Sopenharmony_ci#define F_PM_C2E_EMPTY_ERR V_PM_C2E_EMPTY_ERR(1U) 171862306a36Sopenharmony_ci 171962306a36Sopenharmony_ci#define S_PM_PAR_ERR 8 172062306a36Sopenharmony_ci#define M_PM_PAR_ERR 0xffff 172162306a36Sopenharmony_ci#define V_PM_PAR_ERR(x) ((x) << S_PM_PAR_ERR) 172262306a36Sopenharmony_ci#define G_PM_PAR_ERR(x) (((x) >> S_PM_PAR_ERR) & M_PM_PAR_ERR) 172362306a36Sopenharmony_ci 172462306a36Sopenharmony_ci#define S_PM_E2C_WRT_FULL 24 172562306a36Sopenharmony_ci#define V_PM_E2C_WRT_FULL(x) ((x) << S_PM_E2C_WRT_FULL) 172662306a36Sopenharmony_ci#define F_PM_E2C_WRT_FULL V_PM_E2C_WRT_FULL(1U) 172762306a36Sopenharmony_ci 172862306a36Sopenharmony_ci#define S_PM_C2E_WRT_FULL 25 172962306a36Sopenharmony_ci#define V_PM_C2E_WRT_FULL(x) ((x) << S_PM_C2E_WRT_FULL) 173062306a36Sopenharmony_ci#define F_PM_C2E_WRT_FULL V_PM_C2E_WRT_FULL(1U) 173162306a36Sopenharmony_ci 173262306a36Sopenharmony_ci#define A_ULP_PIO_CTRL 0x998 173362306a36Sopenharmony_ci 173462306a36Sopenharmony_ci/* PL registers */ 173562306a36Sopenharmony_ci#define A_PL_ENABLE 0xa00 173662306a36Sopenharmony_ci 173762306a36Sopenharmony_ci#define S_PL_INTR_SGE_ERR 0 173862306a36Sopenharmony_ci#define V_PL_INTR_SGE_ERR(x) ((x) << S_PL_INTR_SGE_ERR) 173962306a36Sopenharmony_ci#define F_PL_INTR_SGE_ERR V_PL_INTR_SGE_ERR(1U) 174062306a36Sopenharmony_ci 174162306a36Sopenharmony_ci#define S_PL_INTR_SGE_DATA 1 174262306a36Sopenharmony_ci#define V_PL_INTR_SGE_DATA(x) ((x) << S_PL_INTR_SGE_DATA) 174362306a36Sopenharmony_ci#define F_PL_INTR_SGE_DATA V_PL_INTR_SGE_DATA(1U) 174462306a36Sopenharmony_ci 174562306a36Sopenharmony_ci#define S_PL_INTR_MC3 2 174662306a36Sopenharmony_ci#define V_PL_INTR_MC3(x) ((x) << S_PL_INTR_MC3) 174762306a36Sopenharmony_ci#define F_PL_INTR_MC3 V_PL_INTR_MC3(1U) 174862306a36Sopenharmony_ci 174962306a36Sopenharmony_ci#define S_PL_INTR_MC4 3 175062306a36Sopenharmony_ci#define V_PL_INTR_MC4(x) ((x) << S_PL_INTR_MC4) 175162306a36Sopenharmony_ci#define F_PL_INTR_MC4 V_PL_INTR_MC4(1U) 175262306a36Sopenharmony_ci 175362306a36Sopenharmony_ci#define S_PL_INTR_MC5 4 175462306a36Sopenharmony_ci#define V_PL_INTR_MC5(x) ((x) << S_PL_INTR_MC5) 175562306a36Sopenharmony_ci#define F_PL_INTR_MC5 V_PL_INTR_MC5(1U) 175662306a36Sopenharmony_ci 175762306a36Sopenharmony_ci#define S_PL_INTR_RAT 5 175862306a36Sopenharmony_ci#define V_PL_INTR_RAT(x) ((x) << S_PL_INTR_RAT) 175962306a36Sopenharmony_ci#define F_PL_INTR_RAT V_PL_INTR_RAT(1U) 176062306a36Sopenharmony_ci 176162306a36Sopenharmony_ci#define S_PL_INTR_TP 6 176262306a36Sopenharmony_ci#define V_PL_INTR_TP(x) ((x) << S_PL_INTR_TP) 176362306a36Sopenharmony_ci#define F_PL_INTR_TP V_PL_INTR_TP(1U) 176462306a36Sopenharmony_ci 176562306a36Sopenharmony_ci#define S_PL_INTR_ULP 7 176662306a36Sopenharmony_ci#define V_PL_INTR_ULP(x) ((x) << S_PL_INTR_ULP) 176762306a36Sopenharmony_ci#define F_PL_INTR_ULP V_PL_INTR_ULP(1U) 176862306a36Sopenharmony_ci 176962306a36Sopenharmony_ci#define S_PL_INTR_ESPI 8 177062306a36Sopenharmony_ci#define V_PL_INTR_ESPI(x) ((x) << S_PL_INTR_ESPI) 177162306a36Sopenharmony_ci#define F_PL_INTR_ESPI V_PL_INTR_ESPI(1U) 177262306a36Sopenharmony_ci 177362306a36Sopenharmony_ci#define S_PL_INTR_CSPI 9 177462306a36Sopenharmony_ci#define V_PL_INTR_CSPI(x) ((x) << S_PL_INTR_CSPI) 177562306a36Sopenharmony_ci#define F_PL_INTR_CSPI V_PL_INTR_CSPI(1U) 177662306a36Sopenharmony_ci 177762306a36Sopenharmony_ci#define S_PL_INTR_PCIX 10 177862306a36Sopenharmony_ci#define V_PL_INTR_PCIX(x) ((x) << S_PL_INTR_PCIX) 177962306a36Sopenharmony_ci#define F_PL_INTR_PCIX V_PL_INTR_PCIX(1U) 178062306a36Sopenharmony_ci 178162306a36Sopenharmony_ci#define S_PL_INTR_EXT 11 178262306a36Sopenharmony_ci#define V_PL_INTR_EXT(x) ((x) << S_PL_INTR_EXT) 178362306a36Sopenharmony_ci#define F_PL_INTR_EXT V_PL_INTR_EXT(1U) 178462306a36Sopenharmony_ci 178562306a36Sopenharmony_ci#define A_PL_CAUSE 0xa04 178662306a36Sopenharmony_ci 178762306a36Sopenharmony_ci/* MC5 registers */ 178862306a36Sopenharmony_ci#define A_MC5_CONFIG 0xc04 178962306a36Sopenharmony_ci 179062306a36Sopenharmony_ci#define S_MODE 0 179162306a36Sopenharmony_ci#define V_MODE(x) ((x) << S_MODE) 179262306a36Sopenharmony_ci#define F_MODE V_MODE(1U) 179362306a36Sopenharmony_ci 179462306a36Sopenharmony_ci#define S_TCAM_RESET 1 179562306a36Sopenharmony_ci#define V_TCAM_RESET(x) ((x) << S_TCAM_RESET) 179662306a36Sopenharmony_ci#define F_TCAM_RESET V_TCAM_RESET(1U) 179762306a36Sopenharmony_ci 179862306a36Sopenharmony_ci#define S_TCAM_READY 2 179962306a36Sopenharmony_ci#define V_TCAM_READY(x) ((x) << S_TCAM_READY) 180062306a36Sopenharmony_ci#define F_TCAM_READY V_TCAM_READY(1U) 180162306a36Sopenharmony_ci 180262306a36Sopenharmony_ci#define S_DBGI_ENABLE 4 180362306a36Sopenharmony_ci#define V_DBGI_ENABLE(x) ((x) << S_DBGI_ENABLE) 180462306a36Sopenharmony_ci#define F_DBGI_ENABLE V_DBGI_ENABLE(1U) 180562306a36Sopenharmony_ci 180662306a36Sopenharmony_ci#define S_M_BUS_ENABLE 5 180762306a36Sopenharmony_ci#define V_M_BUS_ENABLE(x) ((x) << S_M_BUS_ENABLE) 180862306a36Sopenharmony_ci#define F_M_BUS_ENABLE V_M_BUS_ENABLE(1U) 180962306a36Sopenharmony_ci 181062306a36Sopenharmony_ci#define S_PARITY_ENABLE 6 181162306a36Sopenharmony_ci#define V_PARITY_ENABLE(x) ((x) << S_PARITY_ENABLE) 181262306a36Sopenharmony_ci#define F_PARITY_ENABLE V_PARITY_ENABLE(1U) 181362306a36Sopenharmony_ci 181462306a36Sopenharmony_ci#define S_SYN_ISSUE_MODE 7 181562306a36Sopenharmony_ci#define M_SYN_ISSUE_MODE 0x3 181662306a36Sopenharmony_ci#define V_SYN_ISSUE_MODE(x) ((x) << S_SYN_ISSUE_MODE) 181762306a36Sopenharmony_ci#define G_SYN_ISSUE_MODE(x) (((x) >> S_SYN_ISSUE_MODE) & M_SYN_ISSUE_MODE) 181862306a36Sopenharmony_ci 181962306a36Sopenharmony_ci#define S_BUILD 16 182062306a36Sopenharmony_ci#define V_BUILD(x) ((x) << S_BUILD) 182162306a36Sopenharmony_ci#define F_BUILD V_BUILD(1U) 182262306a36Sopenharmony_ci 182362306a36Sopenharmony_ci#define S_COMPRESSION_ENABLE 17 182462306a36Sopenharmony_ci#define V_COMPRESSION_ENABLE(x) ((x) << S_COMPRESSION_ENABLE) 182562306a36Sopenharmony_ci#define F_COMPRESSION_ENABLE V_COMPRESSION_ENABLE(1U) 182662306a36Sopenharmony_ci 182762306a36Sopenharmony_ci#define S_NUM_LIP 18 182862306a36Sopenharmony_ci#define M_NUM_LIP 0x3f 182962306a36Sopenharmony_ci#define V_NUM_LIP(x) ((x) << S_NUM_LIP) 183062306a36Sopenharmony_ci#define G_NUM_LIP(x) (((x) >> S_NUM_LIP) & M_NUM_LIP) 183162306a36Sopenharmony_ci 183262306a36Sopenharmony_ci#define S_TCAM_PART_CNT 24 183362306a36Sopenharmony_ci#define M_TCAM_PART_CNT 0x3 183462306a36Sopenharmony_ci#define V_TCAM_PART_CNT(x) ((x) << S_TCAM_PART_CNT) 183562306a36Sopenharmony_ci#define G_TCAM_PART_CNT(x) (((x) >> S_TCAM_PART_CNT) & M_TCAM_PART_CNT) 183662306a36Sopenharmony_ci 183762306a36Sopenharmony_ci#define S_TCAM_PART_TYPE 26 183862306a36Sopenharmony_ci#define M_TCAM_PART_TYPE 0x3 183962306a36Sopenharmony_ci#define V_TCAM_PART_TYPE(x) ((x) << S_TCAM_PART_TYPE) 184062306a36Sopenharmony_ci#define G_TCAM_PART_TYPE(x) (((x) >> S_TCAM_PART_TYPE) & M_TCAM_PART_TYPE) 184162306a36Sopenharmony_ci 184262306a36Sopenharmony_ci#define S_TCAM_PART_SIZE 28 184362306a36Sopenharmony_ci#define M_TCAM_PART_SIZE 0x3 184462306a36Sopenharmony_ci#define V_TCAM_PART_SIZE(x) ((x) << S_TCAM_PART_SIZE) 184562306a36Sopenharmony_ci#define G_TCAM_PART_SIZE(x) (((x) >> S_TCAM_PART_SIZE) & M_TCAM_PART_SIZE) 184662306a36Sopenharmony_ci 184762306a36Sopenharmony_ci#define S_TCAM_PART_TYPE_HI 30 184862306a36Sopenharmony_ci#define V_TCAM_PART_TYPE_HI(x) ((x) << S_TCAM_PART_TYPE_HI) 184962306a36Sopenharmony_ci#define F_TCAM_PART_TYPE_HI V_TCAM_PART_TYPE_HI(1U) 185062306a36Sopenharmony_ci 185162306a36Sopenharmony_ci#define A_MC5_SIZE 0xc08 185262306a36Sopenharmony_ci 185362306a36Sopenharmony_ci#define S_SIZE 0 185462306a36Sopenharmony_ci#define M_SIZE 0x3fffff 185562306a36Sopenharmony_ci#define V_SIZE(x) ((x) << S_SIZE) 185662306a36Sopenharmony_ci#define G_SIZE(x) (((x) >> S_SIZE) & M_SIZE) 185762306a36Sopenharmony_ci 185862306a36Sopenharmony_ci#define A_MC5_ROUTING_TABLE_INDEX 0xc0c 185962306a36Sopenharmony_ci 186062306a36Sopenharmony_ci#define S_START_OF_ROUTING_TABLE 0 186162306a36Sopenharmony_ci#define M_START_OF_ROUTING_TABLE 0x3fffff 186262306a36Sopenharmony_ci#define V_START_OF_ROUTING_TABLE(x) ((x) << S_START_OF_ROUTING_TABLE) 186362306a36Sopenharmony_ci#define G_START_OF_ROUTING_TABLE(x) (((x) >> S_START_OF_ROUTING_TABLE) & M_START_OF_ROUTING_TABLE) 186462306a36Sopenharmony_ci 186562306a36Sopenharmony_ci#define A_MC5_SERVER_INDEX 0xc14 186662306a36Sopenharmony_ci 186762306a36Sopenharmony_ci#define S_START_OF_SERVER_INDEX 0 186862306a36Sopenharmony_ci#define M_START_OF_SERVER_INDEX 0x3fffff 186962306a36Sopenharmony_ci#define V_START_OF_SERVER_INDEX(x) ((x) << S_START_OF_SERVER_INDEX) 187062306a36Sopenharmony_ci#define G_START_OF_SERVER_INDEX(x) (((x) >> S_START_OF_SERVER_INDEX) & M_START_OF_SERVER_INDEX) 187162306a36Sopenharmony_ci 187262306a36Sopenharmony_ci#define A_MC5_LIP_RAM_ADDR 0xc18 187362306a36Sopenharmony_ci 187462306a36Sopenharmony_ci#define S_LOCAL_IP_RAM_ADDR 0 187562306a36Sopenharmony_ci#define M_LOCAL_IP_RAM_ADDR 0x3f 187662306a36Sopenharmony_ci#define V_LOCAL_IP_RAM_ADDR(x) ((x) << S_LOCAL_IP_RAM_ADDR) 187762306a36Sopenharmony_ci#define G_LOCAL_IP_RAM_ADDR(x) (((x) >> S_LOCAL_IP_RAM_ADDR) & M_LOCAL_IP_RAM_ADDR) 187862306a36Sopenharmony_ci 187962306a36Sopenharmony_ci#define S_RAM_WRITE_ENABLE 8 188062306a36Sopenharmony_ci#define V_RAM_WRITE_ENABLE(x) ((x) << S_RAM_WRITE_ENABLE) 188162306a36Sopenharmony_ci#define F_RAM_WRITE_ENABLE V_RAM_WRITE_ENABLE(1U) 188262306a36Sopenharmony_ci 188362306a36Sopenharmony_ci#define A_MC5_LIP_RAM_DATA 0xc1c 188462306a36Sopenharmony_ci#define A_MC5_RSP_LATENCY 0xc20 188562306a36Sopenharmony_ci 188662306a36Sopenharmony_ci#define S_SEARCH_RESPONSE_LATENCY 0 188762306a36Sopenharmony_ci#define M_SEARCH_RESPONSE_LATENCY 0x1f 188862306a36Sopenharmony_ci#define V_SEARCH_RESPONSE_LATENCY(x) ((x) << S_SEARCH_RESPONSE_LATENCY) 188962306a36Sopenharmony_ci#define G_SEARCH_RESPONSE_LATENCY(x) (((x) >> S_SEARCH_RESPONSE_LATENCY) & M_SEARCH_RESPONSE_LATENCY) 189062306a36Sopenharmony_ci 189162306a36Sopenharmony_ci#define S_LEARN_RESPONSE_LATENCY 8 189262306a36Sopenharmony_ci#define M_LEARN_RESPONSE_LATENCY 0x1f 189362306a36Sopenharmony_ci#define V_LEARN_RESPONSE_LATENCY(x) ((x) << S_LEARN_RESPONSE_LATENCY) 189462306a36Sopenharmony_ci#define G_LEARN_RESPONSE_LATENCY(x) (((x) >> S_LEARN_RESPONSE_LATENCY) & M_LEARN_RESPONSE_LATENCY) 189562306a36Sopenharmony_ci 189662306a36Sopenharmony_ci#define A_MC5_PARITY_LATENCY 0xc24 189762306a36Sopenharmony_ci 189862306a36Sopenharmony_ci#define S_SRCHLAT 0 189962306a36Sopenharmony_ci#define M_SRCHLAT 0x1f 190062306a36Sopenharmony_ci#define V_SRCHLAT(x) ((x) << S_SRCHLAT) 190162306a36Sopenharmony_ci#define G_SRCHLAT(x) (((x) >> S_SRCHLAT) & M_SRCHLAT) 190262306a36Sopenharmony_ci 190362306a36Sopenharmony_ci#define S_PARLAT 8 190462306a36Sopenharmony_ci#define M_PARLAT 0x1f 190562306a36Sopenharmony_ci#define V_PARLAT(x) ((x) << S_PARLAT) 190662306a36Sopenharmony_ci#define G_PARLAT(x) (((x) >> S_PARLAT) & M_PARLAT) 190762306a36Sopenharmony_ci 190862306a36Sopenharmony_ci#define A_MC5_WR_LRN_VERIFY 0xc28 190962306a36Sopenharmony_ci 191062306a36Sopenharmony_ci#define S_POVEREN 0 191162306a36Sopenharmony_ci#define V_POVEREN(x) ((x) << S_POVEREN) 191262306a36Sopenharmony_ci#define F_POVEREN V_POVEREN(1U) 191362306a36Sopenharmony_ci 191462306a36Sopenharmony_ci#define S_LRNVEREN 1 191562306a36Sopenharmony_ci#define V_LRNVEREN(x) ((x) << S_LRNVEREN) 191662306a36Sopenharmony_ci#define F_LRNVEREN V_LRNVEREN(1U) 191762306a36Sopenharmony_ci 191862306a36Sopenharmony_ci#define S_VWVEREN 2 191962306a36Sopenharmony_ci#define V_VWVEREN(x) ((x) << S_VWVEREN) 192062306a36Sopenharmony_ci#define F_VWVEREN V_VWVEREN(1U) 192162306a36Sopenharmony_ci 192262306a36Sopenharmony_ci#define A_MC5_PART_ID_INDEX 0xc2c 192362306a36Sopenharmony_ci 192462306a36Sopenharmony_ci#define S_IDINDEX 0 192562306a36Sopenharmony_ci#define M_IDINDEX 0xf 192662306a36Sopenharmony_ci#define V_IDINDEX(x) ((x) << S_IDINDEX) 192762306a36Sopenharmony_ci#define G_IDINDEX(x) (((x) >> S_IDINDEX) & M_IDINDEX) 192862306a36Sopenharmony_ci 192962306a36Sopenharmony_ci#define A_MC5_RESET_MAX 0xc30 193062306a36Sopenharmony_ci 193162306a36Sopenharmony_ci#define S_RSTMAX 0 193262306a36Sopenharmony_ci#define M_RSTMAX 0x1ff 193362306a36Sopenharmony_ci#define V_RSTMAX(x) ((x) << S_RSTMAX) 193462306a36Sopenharmony_ci#define G_RSTMAX(x) (((x) >> S_RSTMAX) & M_RSTMAX) 193562306a36Sopenharmony_ci 193662306a36Sopenharmony_ci#define A_MC5_INT_ENABLE 0xc40 193762306a36Sopenharmony_ci 193862306a36Sopenharmony_ci#define S_MC5_INT_HIT_OUT_ACTIVE_REGION_ERR 0 193962306a36Sopenharmony_ci#define V_MC5_INT_HIT_OUT_ACTIVE_REGION_ERR(x) ((x) << S_MC5_INT_HIT_OUT_ACTIVE_REGION_ERR) 194062306a36Sopenharmony_ci#define F_MC5_INT_HIT_OUT_ACTIVE_REGION_ERR V_MC5_INT_HIT_OUT_ACTIVE_REGION_ERR(1U) 194162306a36Sopenharmony_ci 194262306a36Sopenharmony_ci#define S_MC5_INT_HIT_IN_ACTIVE_REGION_ERR 1 194362306a36Sopenharmony_ci#define V_MC5_INT_HIT_IN_ACTIVE_REGION_ERR(x) ((x) << S_MC5_INT_HIT_IN_ACTIVE_REGION_ERR) 194462306a36Sopenharmony_ci#define F_MC5_INT_HIT_IN_ACTIVE_REGION_ERR V_MC5_INT_HIT_IN_ACTIVE_REGION_ERR(1U) 194562306a36Sopenharmony_ci 194662306a36Sopenharmony_ci#define S_MC5_INT_HIT_IN_RT_REGION_ERR 2 194762306a36Sopenharmony_ci#define V_MC5_INT_HIT_IN_RT_REGION_ERR(x) ((x) << S_MC5_INT_HIT_IN_RT_REGION_ERR) 194862306a36Sopenharmony_ci#define F_MC5_INT_HIT_IN_RT_REGION_ERR V_MC5_INT_HIT_IN_RT_REGION_ERR(1U) 194962306a36Sopenharmony_ci 195062306a36Sopenharmony_ci#define S_MC5_INT_MISS_ERR 3 195162306a36Sopenharmony_ci#define V_MC5_INT_MISS_ERR(x) ((x) << S_MC5_INT_MISS_ERR) 195262306a36Sopenharmony_ci#define F_MC5_INT_MISS_ERR V_MC5_INT_MISS_ERR(1U) 195362306a36Sopenharmony_ci 195462306a36Sopenharmony_ci#define S_MC5_INT_LIP0_ERR 4 195562306a36Sopenharmony_ci#define V_MC5_INT_LIP0_ERR(x) ((x) << S_MC5_INT_LIP0_ERR) 195662306a36Sopenharmony_ci#define F_MC5_INT_LIP0_ERR V_MC5_INT_LIP0_ERR(1U) 195762306a36Sopenharmony_ci 195862306a36Sopenharmony_ci#define S_MC5_INT_LIP_MISS_ERR 5 195962306a36Sopenharmony_ci#define V_MC5_INT_LIP_MISS_ERR(x) ((x) << S_MC5_INT_LIP_MISS_ERR) 196062306a36Sopenharmony_ci#define F_MC5_INT_LIP_MISS_ERR V_MC5_INT_LIP_MISS_ERR(1U) 196162306a36Sopenharmony_ci 196262306a36Sopenharmony_ci#define S_MC5_INT_PARITY_ERR 6 196362306a36Sopenharmony_ci#define V_MC5_INT_PARITY_ERR(x) ((x) << S_MC5_INT_PARITY_ERR) 196462306a36Sopenharmony_ci#define F_MC5_INT_PARITY_ERR V_MC5_INT_PARITY_ERR(1U) 196562306a36Sopenharmony_ci 196662306a36Sopenharmony_ci#define S_MC5_INT_ACTIVE_REGION_FULL 7 196762306a36Sopenharmony_ci#define V_MC5_INT_ACTIVE_REGION_FULL(x) ((x) << S_MC5_INT_ACTIVE_REGION_FULL) 196862306a36Sopenharmony_ci#define F_MC5_INT_ACTIVE_REGION_FULL V_MC5_INT_ACTIVE_REGION_FULL(1U) 196962306a36Sopenharmony_ci 197062306a36Sopenharmony_ci#define S_MC5_INT_NFA_SRCH_ERR 8 197162306a36Sopenharmony_ci#define V_MC5_INT_NFA_SRCH_ERR(x) ((x) << S_MC5_INT_NFA_SRCH_ERR) 197262306a36Sopenharmony_ci#define F_MC5_INT_NFA_SRCH_ERR V_MC5_INT_NFA_SRCH_ERR(1U) 197362306a36Sopenharmony_ci 197462306a36Sopenharmony_ci#define S_MC5_INT_SYN_COOKIE 9 197562306a36Sopenharmony_ci#define V_MC5_INT_SYN_COOKIE(x) ((x) << S_MC5_INT_SYN_COOKIE) 197662306a36Sopenharmony_ci#define F_MC5_INT_SYN_COOKIE V_MC5_INT_SYN_COOKIE(1U) 197762306a36Sopenharmony_ci 197862306a36Sopenharmony_ci#define S_MC5_INT_SYN_COOKIE_BAD 10 197962306a36Sopenharmony_ci#define V_MC5_INT_SYN_COOKIE_BAD(x) ((x) << S_MC5_INT_SYN_COOKIE_BAD) 198062306a36Sopenharmony_ci#define F_MC5_INT_SYN_COOKIE_BAD V_MC5_INT_SYN_COOKIE_BAD(1U) 198162306a36Sopenharmony_ci 198262306a36Sopenharmony_ci#define S_MC5_INT_SYN_COOKIE_OFF 11 198362306a36Sopenharmony_ci#define V_MC5_INT_SYN_COOKIE_OFF(x) ((x) << S_MC5_INT_SYN_COOKIE_OFF) 198462306a36Sopenharmony_ci#define F_MC5_INT_SYN_COOKIE_OFF V_MC5_INT_SYN_COOKIE_OFF(1U) 198562306a36Sopenharmony_ci 198662306a36Sopenharmony_ci#define S_MC5_INT_UNKNOWN_CMD 15 198762306a36Sopenharmony_ci#define V_MC5_INT_UNKNOWN_CMD(x) ((x) << S_MC5_INT_UNKNOWN_CMD) 198862306a36Sopenharmony_ci#define F_MC5_INT_UNKNOWN_CMD V_MC5_INT_UNKNOWN_CMD(1U) 198962306a36Sopenharmony_ci 199062306a36Sopenharmony_ci#define S_MC5_INT_REQUESTQ_PARITY_ERR 16 199162306a36Sopenharmony_ci#define V_MC5_INT_REQUESTQ_PARITY_ERR(x) ((x) << S_MC5_INT_REQUESTQ_PARITY_ERR) 199262306a36Sopenharmony_ci#define F_MC5_INT_REQUESTQ_PARITY_ERR V_MC5_INT_REQUESTQ_PARITY_ERR(1U) 199362306a36Sopenharmony_ci 199462306a36Sopenharmony_ci#define S_MC5_INT_DISPATCHQ_PARITY_ERR 17 199562306a36Sopenharmony_ci#define V_MC5_INT_DISPATCHQ_PARITY_ERR(x) ((x) << S_MC5_INT_DISPATCHQ_PARITY_ERR) 199662306a36Sopenharmony_ci#define F_MC5_INT_DISPATCHQ_PARITY_ERR V_MC5_INT_DISPATCHQ_PARITY_ERR(1U) 199762306a36Sopenharmony_ci 199862306a36Sopenharmony_ci#define S_MC5_INT_DEL_ACT_EMPTY 18 199962306a36Sopenharmony_ci#define V_MC5_INT_DEL_ACT_EMPTY(x) ((x) << S_MC5_INT_DEL_ACT_EMPTY) 200062306a36Sopenharmony_ci#define F_MC5_INT_DEL_ACT_EMPTY V_MC5_INT_DEL_ACT_EMPTY(1U) 200162306a36Sopenharmony_ci 200262306a36Sopenharmony_ci#define A_MC5_INT_CAUSE 0xc44 200362306a36Sopenharmony_ci#define A_MC5_INT_TID 0xc48 200462306a36Sopenharmony_ci#define A_MC5_INT_PTID 0xc4c 200562306a36Sopenharmony_ci#define A_MC5_DBGI_CONFIG 0xc74 200662306a36Sopenharmony_ci#define A_MC5_DBGI_REQ_CMD 0xc78 200762306a36Sopenharmony_ci 200862306a36Sopenharmony_ci#define S_CMDMODE 0 200962306a36Sopenharmony_ci#define M_CMDMODE 0x7 201062306a36Sopenharmony_ci#define V_CMDMODE(x) ((x) << S_CMDMODE) 201162306a36Sopenharmony_ci#define G_CMDMODE(x) (((x) >> S_CMDMODE) & M_CMDMODE) 201262306a36Sopenharmony_ci 201362306a36Sopenharmony_ci#define S_SADRSEL 4 201462306a36Sopenharmony_ci#define V_SADRSEL(x) ((x) << S_SADRSEL) 201562306a36Sopenharmony_ci#define F_SADRSEL V_SADRSEL(1U) 201662306a36Sopenharmony_ci 201762306a36Sopenharmony_ci#define S_WRITE_BURST_SIZE 22 201862306a36Sopenharmony_ci#define M_WRITE_BURST_SIZE 0x3ff 201962306a36Sopenharmony_ci#define V_WRITE_BURST_SIZE(x) ((x) << S_WRITE_BURST_SIZE) 202062306a36Sopenharmony_ci#define G_WRITE_BURST_SIZE(x) (((x) >> S_WRITE_BURST_SIZE) & M_WRITE_BURST_SIZE) 202162306a36Sopenharmony_ci 202262306a36Sopenharmony_ci#define A_MC5_DBGI_REQ_ADDR0 0xc7c 202362306a36Sopenharmony_ci#define A_MC5_DBGI_REQ_ADDR1 0xc80 202462306a36Sopenharmony_ci#define A_MC5_DBGI_REQ_ADDR2 0xc84 202562306a36Sopenharmony_ci#define A_MC5_DBGI_REQ_DATA0 0xc88 202662306a36Sopenharmony_ci#define A_MC5_DBGI_REQ_DATA1 0xc8c 202762306a36Sopenharmony_ci#define A_MC5_DBGI_REQ_DATA2 0xc90 202862306a36Sopenharmony_ci#define A_MC5_DBGI_REQ_DATA3 0xc94 202962306a36Sopenharmony_ci#define A_MC5_DBGI_REQ_DATA4 0xc98 203062306a36Sopenharmony_ci#define A_MC5_DBGI_REQ_MASK0 0xc9c 203162306a36Sopenharmony_ci#define A_MC5_DBGI_REQ_MASK1 0xca0 203262306a36Sopenharmony_ci#define A_MC5_DBGI_REQ_MASK2 0xca4 203362306a36Sopenharmony_ci#define A_MC5_DBGI_REQ_MASK3 0xca8 203462306a36Sopenharmony_ci#define A_MC5_DBGI_REQ_MASK4 0xcac 203562306a36Sopenharmony_ci#define A_MC5_DBGI_RSP_STATUS 0xcb0 203662306a36Sopenharmony_ci 203762306a36Sopenharmony_ci#define S_DBGI_RSP_VALID 0 203862306a36Sopenharmony_ci#define V_DBGI_RSP_VALID(x) ((x) << S_DBGI_RSP_VALID) 203962306a36Sopenharmony_ci#define F_DBGI_RSP_VALID V_DBGI_RSP_VALID(1U) 204062306a36Sopenharmony_ci 204162306a36Sopenharmony_ci#define S_DBGI_RSP_HIT 1 204262306a36Sopenharmony_ci#define V_DBGI_RSP_HIT(x) ((x) << S_DBGI_RSP_HIT) 204362306a36Sopenharmony_ci#define F_DBGI_RSP_HIT V_DBGI_RSP_HIT(1U) 204462306a36Sopenharmony_ci 204562306a36Sopenharmony_ci#define S_DBGI_RSP_ERR 2 204662306a36Sopenharmony_ci#define V_DBGI_RSP_ERR(x) ((x) << S_DBGI_RSP_ERR) 204762306a36Sopenharmony_ci#define F_DBGI_RSP_ERR V_DBGI_RSP_ERR(1U) 204862306a36Sopenharmony_ci 204962306a36Sopenharmony_ci#define S_DBGI_RSP_ERR_REASON 8 205062306a36Sopenharmony_ci#define M_DBGI_RSP_ERR_REASON 0x7 205162306a36Sopenharmony_ci#define V_DBGI_RSP_ERR_REASON(x) ((x) << S_DBGI_RSP_ERR_REASON) 205262306a36Sopenharmony_ci#define G_DBGI_RSP_ERR_REASON(x) (((x) >> S_DBGI_RSP_ERR_REASON) & M_DBGI_RSP_ERR_REASON) 205362306a36Sopenharmony_ci 205462306a36Sopenharmony_ci#define A_MC5_DBGI_RSP_DATA0 0xcb4 205562306a36Sopenharmony_ci#define A_MC5_DBGI_RSP_DATA1 0xcb8 205662306a36Sopenharmony_ci#define A_MC5_DBGI_RSP_DATA2 0xcbc 205762306a36Sopenharmony_ci#define A_MC5_DBGI_RSP_DATA3 0xcc0 205862306a36Sopenharmony_ci#define A_MC5_DBGI_RSP_DATA4 0xcc4 205962306a36Sopenharmony_ci#define A_MC5_DBGI_RSP_LAST_CMD 0xcc8 206062306a36Sopenharmony_ci#define A_MC5_POPEN_DATA_WR_CMD 0xccc 206162306a36Sopenharmony_ci#define A_MC5_POPEN_MASK_WR_CMD 0xcd0 206262306a36Sopenharmony_ci#define A_MC5_AOPEN_SRCH_CMD 0xcd4 206362306a36Sopenharmony_ci#define A_MC5_AOPEN_LRN_CMD 0xcd8 206462306a36Sopenharmony_ci#define A_MC5_SYN_SRCH_CMD 0xcdc 206562306a36Sopenharmony_ci#define A_MC5_SYN_LRN_CMD 0xce0 206662306a36Sopenharmony_ci#define A_MC5_ACK_SRCH_CMD 0xce4 206762306a36Sopenharmony_ci#define A_MC5_ACK_LRN_CMD 0xce8 206862306a36Sopenharmony_ci#define A_MC5_ILOOKUP_CMD 0xcec 206962306a36Sopenharmony_ci#define A_MC5_ELOOKUP_CMD 0xcf0 207062306a36Sopenharmony_ci#define A_MC5_DATA_WRITE_CMD 0xcf4 207162306a36Sopenharmony_ci#define A_MC5_DATA_READ_CMD 0xcf8 207262306a36Sopenharmony_ci#define A_MC5_MASK_WRITE_CMD 0xcfc 207362306a36Sopenharmony_ci 207462306a36Sopenharmony_ci/* PCICFG registers */ 207562306a36Sopenharmony_ci#define A_PCICFG_PM_CSR 0x44 207662306a36Sopenharmony_ci#define A_PCICFG_VPD_ADDR 0x4a 207762306a36Sopenharmony_ci 207862306a36Sopenharmony_ci#define S_VPD_ADDR 0 207962306a36Sopenharmony_ci#define M_VPD_ADDR 0x7fff 208062306a36Sopenharmony_ci#define V_VPD_ADDR(x) ((x) << S_VPD_ADDR) 208162306a36Sopenharmony_ci#define G_VPD_ADDR(x) (((x) >> S_VPD_ADDR) & M_VPD_ADDR) 208262306a36Sopenharmony_ci 208362306a36Sopenharmony_ci#define S_VPD_OP_FLAG 15 208462306a36Sopenharmony_ci#define V_VPD_OP_FLAG(x) ((x) << S_VPD_OP_FLAG) 208562306a36Sopenharmony_ci#define F_VPD_OP_FLAG V_VPD_OP_FLAG(1U) 208662306a36Sopenharmony_ci 208762306a36Sopenharmony_ci#define A_PCICFG_VPD_DATA 0x4c 208862306a36Sopenharmony_ci#define A_PCICFG_PCIX_CMD 0x60 208962306a36Sopenharmony_ci#define A_PCICFG_INTR_ENABLE 0xf4 209062306a36Sopenharmony_ci 209162306a36Sopenharmony_ci#define S_MASTER_PARITY_ERR 0 209262306a36Sopenharmony_ci#define V_MASTER_PARITY_ERR(x) ((x) << S_MASTER_PARITY_ERR) 209362306a36Sopenharmony_ci#define F_MASTER_PARITY_ERR V_MASTER_PARITY_ERR(1U) 209462306a36Sopenharmony_ci 209562306a36Sopenharmony_ci#define S_SIG_TARGET_ABORT 1 209662306a36Sopenharmony_ci#define V_SIG_TARGET_ABORT(x) ((x) << S_SIG_TARGET_ABORT) 209762306a36Sopenharmony_ci#define F_SIG_TARGET_ABORT V_SIG_TARGET_ABORT(1U) 209862306a36Sopenharmony_ci 209962306a36Sopenharmony_ci#define S_RCV_TARGET_ABORT 2 210062306a36Sopenharmony_ci#define V_RCV_TARGET_ABORT(x) ((x) << S_RCV_TARGET_ABORT) 210162306a36Sopenharmony_ci#define F_RCV_TARGET_ABORT V_RCV_TARGET_ABORT(1U) 210262306a36Sopenharmony_ci 210362306a36Sopenharmony_ci#define S_RCV_MASTER_ABORT 3 210462306a36Sopenharmony_ci#define V_RCV_MASTER_ABORT(x) ((x) << S_RCV_MASTER_ABORT) 210562306a36Sopenharmony_ci#define F_RCV_MASTER_ABORT V_RCV_MASTER_ABORT(1U) 210662306a36Sopenharmony_ci 210762306a36Sopenharmony_ci#define S_SIG_SYS_ERR 4 210862306a36Sopenharmony_ci#define V_SIG_SYS_ERR(x) ((x) << S_SIG_SYS_ERR) 210962306a36Sopenharmony_ci#define F_SIG_SYS_ERR V_SIG_SYS_ERR(1U) 211062306a36Sopenharmony_ci 211162306a36Sopenharmony_ci#define S_DET_PARITY_ERR 5 211262306a36Sopenharmony_ci#define V_DET_PARITY_ERR(x) ((x) << S_DET_PARITY_ERR) 211362306a36Sopenharmony_ci#define F_DET_PARITY_ERR V_DET_PARITY_ERR(1U) 211462306a36Sopenharmony_ci 211562306a36Sopenharmony_ci#define S_PIO_PARITY_ERR 6 211662306a36Sopenharmony_ci#define V_PIO_PARITY_ERR(x) ((x) << S_PIO_PARITY_ERR) 211762306a36Sopenharmony_ci#define F_PIO_PARITY_ERR V_PIO_PARITY_ERR(1U) 211862306a36Sopenharmony_ci 211962306a36Sopenharmony_ci#define S_WF_PARITY_ERR 7 212062306a36Sopenharmony_ci#define V_WF_PARITY_ERR(x) ((x) << S_WF_PARITY_ERR) 212162306a36Sopenharmony_ci#define F_WF_PARITY_ERR V_WF_PARITY_ERR(1U) 212262306a36Sopenharmony_ci 212362306a36Sopenharmony_ci#define S_RF_PARITY_ERR 8 212462306a36Sopenharmony_ci#define M_RF_PARITY_ERR 0x3 212562306a36Sopenharmony_ci#define V_RF_PARITY_ERR(x) ((x) << S_RF_PARITY_ERR) 212662306a36Sopenharmony_ci#define G_RF_PARITY_ERR(x) (((x) >> S_RF_PARITY_ERR) & M_RF_PARITY_ERR) 212762306a36Sopenharmony_ci 212862306a36Sopenharmony_ci#define S_CF_PARITY_ERR 10 212962306a36Sopenharmony_ci#define M_CF_PARITY_ERR 0x3 213062306a36Sopenharmony_ci#define V_CF_PARITY_ERR(x) ((x) << S_CF_PARITY_ERR) 213162306a36Sopenharmony_ci#define G_CF_PARITY_ERR(x) (((x) >> S_CF_PARITY_ERR) & M_CF_PARITY_ERR) 213262306a36Sopenharmony_ci 213362306a36Sopenharmony_ci#define A_PCICFG_INTR_CAUSE 0xf8 213462306a36Sopenharmony_ci#define A_PCICFG_MODE 0xfc 213562306a36Sopenharmony_ci 213662306a36Sopenharmony_ci#define S_PCI_MODE_64BIT 0 213762306a36Sopenharmony_ci#define V_PCI_MODE_64BIT(x) ((x) << S_PCI_MODE_64BIT) 213862306a36Sopenharmony_ci#define F_PCI_MODE_64BIT V_PCI_MODE_64BIT(1U) 213962306a36Sopenharmony_ci 214062306a36Sopenharmony_ci#define S_PCI_MODE_66MHZ 1 214162306a36Sopenharmony_ci#define V_PCI_MODE_66MHZ(x) ((x) << S_PCI_MODE_66MHZ) 214262306a36Sopenharmony_ci#define F_PCI_MODE_66MHZ V_PCI_MODE_66MHZ(1U) 214362306a36Sopenharmony_ci 214462306a36Sopenharmony_ci#define S_PCI_MODE_PCIX_INITPAT 2 214562306a36Sopenharmony_ci#define M_PCI_MODE_PCIX_INITPAT 0x7 214662306a36Sopenharmony_ci#define V_PCI_MODE_PCIX_INITPAT(x) ((x) << S_PCI_MODE_PCIX_INITPAT) 214762306a36Sopenharmony_ci#define G_PCI_MODE_PCIX_INITPAT(x) (((x) >> S_PCI_MODE_PCIX_INITPAT) & M_PCI_MODE_PCIX_INITPAT) 214862306a36Sopenharmony_ci 214962306a36Sopenharmony_ci#define S_PCI_MODE_PCIX 5 215062306a36Sopenharmony_ci#define V_PCI_MODE_PCIX(x) ((x) << S_PCI_MODE_PCIX) 215162306a36Sopenharmony_ci#define F_PCI_MODE_PCIX V_PCI_MODE_PCIX(1U) 215262306a36Sopenharmony_ci 215362306a36Sopenharmony_ci#define S_PCI_MODE_CLK 6 215462306a36Sopenharmony_ci#define M_PCI_MODE_CLK 0x3 215562306a36Sopenharmony_ci#define V_PCI_MODE_CLK(x) ((x) << S_PCI_MODE_CLK) 215662306a36Sopenharmony_ci#define G_PCI_MODE_CLK(x) (((x) >> S_PCI_MODE_CLK) & M_PCI_MODE_CLK) 215762306a36Sopenharmony_ci 215862306a36Sopenharmony_ci#endif /* _CXGB_REGS_H_ */ 2159