From a27354c9021a8423ef8c7d2bffad49cbf639eec1 Mon Sep 17 00:00:00 2001 From: Roman Yeryomin Date: Thu, 13 Sep 2012 00:40:35 +0300 Subject: Add realtek target files Signed-off-by: Roman Yeryomin --- .../net/rtl819x/AsicDriver/rtl865x_hwPatch.h | 101 +++++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 target/linux/realtek/files/drivers/net/rtl819x/AsicDriver/rtl865x_hwPatch.h (limited to 'target/linux/realtek/files/drivers/net/rtl819x/AsicDriver/rtl865x_hwPatch.h') diff --git a/target/linux/realtek/files/drivers/net/rtl819x/AsicDriver/rtl865x_hwPatch.h b/target/linux/realtek/files/drivers/net/rtl819x/AsicDriver/rtl865x_hwPatch.h new file mode 100644 index 000000000..f6586f746 --- /dev/null +++ b/target/linux/realtek/files/drivers/net/rtl819x/AsicDriver/rtl865x_hwPatch.h @@ -0,0 +1,101 @@ +/* + * + * The header file collects the information about the IC's different Version/Sub-version. + * => It's used by DRIVER to determine how to implement features for different ICs. + * + */ + +#ifndef RTL865x_hwPatch_H +#define RTL865x_hwPatch_H + +/* Chip Version */ +#define RTL865X_CHIP_VER_RTL865XB 0x01 +#define RTL865X_CHIP_VER_RTL865XC 0x02 +#define RTL865X_CHIP_VER_RTL8196B 0x03 +#define RTL865X_CHIP_VER_RTL8196C 0x04 + +/* Revision ID of each chip */ +#define RTL865X_CHIP_REV_A 0x00 +#define RTL865X_CHIP_REV_B 0x01 +#define RTL865X_CHIP_REV_C 0x02 +#define RTL865X_CHIP_REV_D 0x03 +#define RTL865X_CHIP_REV_E 0x04 + +/* features' and patchs' related definitions */ + +/* ===================================================================== + = + = ADD feature-related MACROs HERE + = + = => Please ALWAYS add "CHIP" and "REV" for MACROs + = + ===================================================================== */ + +/* RTL865xB */ +/* ================================== */ +/* Rev-A/B/C: Their Refill token interval of Rate Limit table is large */ +#define RTL865X_LARGE_RATELIMIT_REFILLINTERVAL ( (( RtkHomeGatewayChipNameID == RTL865X_CHIP_VER_RTL865XB /* CHIP */ ) && \ + ( RtkHomeGatewayChipRevisionID <= RTL865X_CHIP_REV_C /* REV */ )) || \ + ( RtkHomeGatewayChipNameID == RTL865X_CHIP_VER_RTL865XC /* CHIP */ ) || \ + ( RtkHomeGatewayChipNameID == RTL865X_CHIP_VER_RTL8196B /* CHIP */ )) + + +/* RTL865xC */ +/* ================================== */ +/* Rev-A: It would cause HW process when dynamically stop HW table lookup. */ +#define RTL865X_TLU_BUG_FIXED ( (( RtkHomeGatewayChipNameID == RTL865X_CHIP_VER_RTL865XC /* CHIP */ ) && \ + ( RtkHomeGatewayChipRevisionID >= RTL865X_CHIP_REV_B /* REV */ )) || \ + ( RtkHomeGatewayChipNameID == RTL865X_CHIP_VER_RTL8196B /* CHIP */ ) ||\ + ( RtkHomeGatewayChipNameID == RTL865X_CHIP_VER_RTL8196C /* CHIP */ )) + +/* Rev-A: The PHY-ID of PHY6 is set to 0 and conflicts to PHY0 */ +#define RTL865X_PHY6_DSP_BUG ( ( RtkHomeGatewayChipNameID == RTL865X_CHIP_VER_RTL865XC /* CHIP */ ) && \ + (RtkHomeGatewayChipRevisionID == RTL865X_CHIP_REV_A /* REV */ ) ) + +/* + Patch for A-CUT & B-Cut RTL865xC hardware bug: + if A2EO = (2*n) 8 byte cipher OK + if A2EO = (2*n+1) 8 byte the sequence of cipher would be reversal in 8-byte units + this bug would be fixed in C-Cut and later version +*/ +#define RTL865X_AES_BUG (( RtkHomeGatewayChipNameID == RTL865X_CHIP_VER_RTL865XC /*CHIP*/)&& (RtkHomeGatewayChipRevisionID < RTL865X_CHIP_REV_C /*REV*/)) + +/* + * Patch for All RTL865xC default value setting problem. + * The default value of IQFCTCR in ASIC is opposite to correct one. + * + */ +#define RTL865X_IQFCTCR_DEFAULT_VALUE_BUG ( (RtkHomeGatewayChipNameID == RTL865X_CHIP_VER_RTL865XC /* CHIP*/) || \ + ( RtkHomeGatewayChipNameID == RTL865X_CHIP_VER_RTL8196B /* CHIP */ )) + +/* + * Patch for All RTL865xC NAT-base Priority bit3 auto-clean problem. + * The nat base priority should be always<4. + * + */ +#define RTL865X_NATBASE_PRIOTIY_AUTOCLEAN_BUG ( ((RtkHomeGatewayChipNameID == RTL865X_CHIP_VER_RTL865XC /* CHIP*/) && \ + ( RtkHomeGatewayChipRevisionID < RTL865X_CHIP_REV_D /* ALL Revisions */ ) ) || \ + ( RtkHomeGatewayChipNameID == RTL865X_CHIP_VER_RTL8196B /* CHIP */ ) ) + +/* + * Patch for All RTL865xC TX Link Down problem. + * mantis bug 2570 + * + */ +#define RTL865X_TX_LINKDOWN_BUG ( ((RtkHomeGatewayChipNameID == RTL865X_CHIP_VER_RTL865XC /* CHIP*/) && \ + ( RtkHomeGatewayChipRevisionID < RTL865X_CHIP_REV_D /* ALL Revisions */ ) ) || \ + (0) ) + +/* + *Patch for RTL865xC D-cut new ip multicast hash algorithm. + * + */ +#define RTL865X_IP_MCAST_NEW_HASH ( ((RtkHomeGatewayChipNameID == RTL865X_CHIP_VER_RTL865XC /* CHIP*/) && \ + ( RtkHomeGatewayChipRevisionID >= RTL865X_CHIP_REV_D /*REV */ ) )|| \ + ( RtkHomeGatewayChipNameID == RTL865X_CHIP_VER_RTL8196B /* CHIP */ )) +/* =============================================================================== */ + +/* =============================================================================== */ + +#endif + -- cgit v1.2.3