UNM_CRB_NIU
ql_8021_wr_32(ha, UNM_CRB_NIU + 0x40, 0xff);
ql_8021_wr_32(ha, UNM_CRB_NIU + 0x70000, 0x0);
ql_8021_wr_32(ha, UNM_CRB_NIU + 0x80000, 0x0);
ql_8021_wr_32(ha, UNM_CRB_NIU + 0x90000, 0x0);
ql_8021_wr_32(ha, UNM_CRB_NIU + 0xa0000, 0x0);
ql_8021_wr_32(ha, UNM_CRB_NIU + 0xb0000, 0x0);
#define UNM_MAC_ADDR_CNTL_REG (UNM_CRB_NIU + 0x1000)
#define UNM_MULTICAST_ADDR_HI_0 (UNM_CRB_NIU + 0x1010)
#define UNM_MULTICAST_ADDR_HI_1 (UNM_CRB_NIU + 0x1014)
#define UNM_MULTICAST_ADDR_HI_2 (UNM_CRB_NIU + 0x1018)
#define UNM_MULTICAST_ADDR_HI_3 (UNM_CRB_NIU + 0x101c)
#define M_UNICAST_ADDR_BASE (UNM_CRB_NIU + 0x1080)
#define UNM_UNICAST_ADDR_LO_0_0 (UNM_CRB_NIU + 0x1080) // port 0
#define UNM_UNICAST_ADDR_HI_0_0 (UNM_CRB_NIU + 0x1084)
#define UNM_UNICAST_ADDR_LO_0_1 (UNM_CRB_NIU + 0x1088)
#define UNM_UNICAST_ADDR_HI_0_1 (UNM_CRB_NIU + 0x108c)
#define UNM_UNICAST_ADDR_LO_0_2 (UNM_CRB_NIU + 0x1090)
#define UNM_UNICAST_ADDR_HI_0_2 (UNM_CRB_NIU + 0x1084)
#define UNM_UNICAST_ADDR_LO_0_3 (UNM_CRB_NIU + 0x1098)
#define UNM_UNICAST_ADDR_HI_0_3 (UNM_CRB_NIU + 0x109c)
#define UNM_UNICAST_ADDR_LO_1_0 (UNM_CRB_NIU + 0x10a0)
#define UNM_UNICAST_ADDR_HI_1_0 (UNM_CRB_NIU + 0x10a4)
#define UNM_UNICAST_ADDR_LO_1_1 (UNM_CRB_NIU + 0x10a8)
#define UNM_UNICAST_ADDR_HI_1_1 (UNM_CRB_NIU + 0x10ac)
#define UNM_UNICAST_ADDR_LO_1_2 (UNM_CRB_NIU + 0x10b0)
#define UNM_UNICAST_ADDR_HI_1_2 (UNM_CRB_NIU + 0x10b4)
#define UNM_UNICAST_ADDR_LO_1_3 (UNM_CRB_NIU + 0x10b8)
#define UNM_UNICAST_ADDR_HI_1_3 (UNM_CRB_NIU + 0x10bc)
#define UNM_UNICAST_ADDR_LO_2_0 (UNM_CRB_NIU + 0x10c0)
#define UNM_UNICAST_ADDR_HI_2_0 (UNM_CRB_NIU + 0x10c4)
#define UNM_UNICAST_ADDR_LO_2_1 (UNM_CRB_NIU + 0x10c8)
#define UNM_UNICAST_ADDR_HI_2_1 (UNM_CRB_NIU + 0x10cc)
#define UNM_UNICAST_ADDR_LO_2_2 (UNM_CRB_NIU + 0x10d0)
#define UNM_UNICAST_ADDR_HI_2_2 (UNM_CRB_NIU + 0x10d4)
#define UNM_UNICAST_ADDR_LO_2_3 (UNM_CRB_NIU + 0x10d8)
#define UNM_UNICAST_ADDR_HI_2_3 (UNM_CRB_NIU + 0x10dc)
#define UNM_UNICAST_ADDR_LO_3_0 (UNM_CRB_NIU + 0x10e0)
#define UNM_UNICAST_ADDR_HI_3_0 (UNM_CRB_NIU + 0x10e4)
#define UNM_UNICAST_ADDR_LO_3_1 (UNM_CRB_NIU + 0x10e8)
#define UNM_UNICAST_ADDR_HI_3_1 (UNM_CRB_NIU + 0x10ec)
#define UNM_UNICAST_ADDR_LO_3_2 (UNM_CRB_NIU + 0x10f0)
#define UNM_UNICAST_ADDR_HI_3_2 (UNM_CRB_NIU + 0x10f4)
#define UNM_UNICAST_ADDR_LO_3_3 (UNM_CRB_NIU + 0x10f8)
#define UNM_UNICAST_ADDR_HI_3_3 (UNM_CRB_NIU + 0x10fc)
#define UNM_MULTICAST_ADDR_BASE (UNM_CRB_NIU + 0x1100)
#define UNM_MULTICAST_ADDR_LO_0 (UNM_CRB_NIU + 0x1100)
#define UNM_MULTICAST_ADDR_LO_1 (UNM_CRB_NIU + 0x1180)
#define UNM_MULTICAST_ADDR_LO_2 (UNM_CRB_NIU + 0x1200)
#define UNM_MULTICAST_ADDR_LO_3 (UNM_CRB_NIU + 0x1280)
#define UNM_NIU_MODE (UNM_CRB_NIU + 0x00000)
#define UNM_NIU_XG_SINGLE_TERM (UNM_CRB_NIU + 0x00004)
#define UNM_NIU_XG_DRIVE_HI (UNM_CRB_NIU + 0x00008)
#define UNM_NIU_XG_DRIVE_LO (UNM_CRB_NIU + 0x0000c)
#define UNM_NIU_XG_DTX (UNM_CRB_NIU + 0x00010)
#define UNM_NIU_XG_DEQ (UNM_CRB_NIU + 0x00014)
#define UNM_NIU_XG_WORD_ALIGN (UNM_CRB_NIU + 0x00018)
#define UNM_NIU_XG_RESET (UNM_CRB_NIU + 0x0001c)
#define UNM_NIU_XG_POWER_DOWN (UNM_CRB_NIU + 0x00020)
#define UNM_NIU_XG_RESET_PLL (UNM_CRB_NIU + 0x00024)
#define UNM_NIU_XG_SERDES_LOOPBACK (UNM_CRB_NIU + 0x00028)
#define UNM_NIU_XG_DO_BYTE_ALIGN (UNM_CRB_NIU + 0x0002c)
#define UNM_NIU_XG_TX_ENABLE (UNM_CRB_NIU + 0x00030)
#define UNM_NIU_XG_RX_ENABLE (UNM_CRB_NIU + 0x00034)
#define UNM_NIU_XG_STATUS (UNM_CRB_NIU + 0x00038)
#define UNM_NIU_XG_PAUSE_THRESHOLD (UNM_CRB_NIU + 0x0003c)
#define UNM_NIU_INT_MASK (UNM_CRB_NIU + 0x00040)
#define UNM_NIU_ACTIVE_INT (UNM_CRB_NIU + 0x00044)
#define UNM_NIU_MASKABLE_INT (UNM_CRB_NIU + 0x00048)
#define UNM_NIU_TEST_MUX_CTL (UNM_CRB_NIU + 0x00094)
#define UNM_NIU_XG_PAUSE_CTL (UNM_CRB_NIU + 0x00098)
#define UNM_NIU_XG_PAUSE_LEVEL (UNM_CRB_NIU + 0x000dc)
#define UNM_NIU_XG_SEL (UNM_CRB_NIU + 0x00128)
#define UNM_NIU_GB_PAUSE_CTL (UNM_CRB_NIU + 0x0030c)
#define UNM_NIU_FULL_LEVEL_XG (UNM_CRB_NIU + 0x00450)
#define UNM_NIU_XG1_RESET (UNM_CRB_NIU + 0x0011c)
#define UNM_NIU_XG1_POWER_DOWN (UNM_CRB_NIU + 0x00120)
#define UNM_NIU_XG1_RESET_PLL (UNM_CRB_NIU + 0x00124)
#define UNM_NIU_STRAP_VALUE_SAVE_HIGHER (UNM_CRB_NIU + 0x0004c)
#define UNM_NIU_GB_SERDES_RESET (UNM_CRB_NIU + 0x00050)
#define UNM_NIU_GB0_GMII_MODE (UNM_CRB_NIU + 0x00054)
#define UNM_NIU_GB0_MII_MODE (UNM_CRB_NIU + 0x00058)
#define UNM_NIU_GB1_GMII_MODE (UNM_CRB_NIU + 0x0005c)
#define UNM_NIU_GB1_MII_MODE (UNM_CRB_NIU + 0x00060)
#define UNM_NIU_GB2_GMII_MODE (UNM_CRB_NIU + 0x00064)
#define UNM_NIU_GB2_MII_MODE (UNM_CRB_NIU + 0x00068)
#define UNM_NIU_GB3_GMII_MODE (UNM_CRB_NIU + 0x0006c)
#define UNM_NIU_GB3_MII_MODE (UNM_CRB_NIU + 0x00070)
#define UNM_NIU_REMOTE_LOOPBACK (UNM_CRB_NIU + 0x00074)
#define UNM_NIU_GB0_HALF_DUPLEX (UNM_CRB_NIU + 0x00078)
#define UNM_NIU_GB1_HALF_DUPLEX (UNM_CRB_NIU + 0x0007c)
#define UNM_NIU_GB2_HALF_DUPLEX (UNM_CRB_NIU + 0x00080)
#define UNM_NIU_GB3_HALF_DUPLEX (UNM_CRB_NIU + 0x00084)
#define UNM_NIU_RESET_SYS_FIFOS (UNM_CRB_NIU + 0x00088)
#define UNM_NIU_GB_CRC_DROP (UNM_CRB_NIU + 0x0008c)
#define UNM_NIU_GB_DROP_WRONGADDR (UNM_CRB_NIU + 0x00090)
#define UNM_NIU_TEST_MUX_CTL (UNM_CRB_NIU + 0x00094)
#define UNM_NIU_XG_PAUSE_CTL (UNM_CRB_NIU + 0x00098)
#define UNM_NIU_GB0_PAUSE_LEVEL (UNM_CRB_NIU + 0x000cc)
#define UNM_NIU_GB1_PAUSE_LEVEL (UNM_CRB_NIU + 0x000d0)
#define UNM_NIU_GB2_PAUSE_LEVEL (UNM_CRB_NIU + 0x000d4)
#define UNM_NIU_GB3_PAUSE_LEVEL (UNM_CRB_NIU + 0x000d8)
#define UNM_NIU_XG_PAUSE_LEVEL (UNM_CRB_NIU + 0x000dc)
#define UNM_NIU_FRAME_COUNT_SELECT (UNM_CRB_NIU + 0x000ac)
#define UNM_NIU_FRAME_COUNT (UNM_CRB_NIU + 0x000b0)
#define UNM_NIU_XG_SE (UNM_CRB_NIU + 0x00128)
#define UNM_NIU_FULL_LEVEL_XG (UNM_CRB_NIU + 0x00450)
#define UNM_NIU_FC_RX_STATUS(I) (UNM_CRB_NIU + 0x10000 + (I)*0x10000)
#define UNM_NIU_FC_RX_COMMA_DETECT(I) (UNM_CRB_NIU + 0x10004 + (I)*0x10000)
#define UNM_NIU_FC_LASER_UNSAFE(I) (UNM_CRB_NIU + 0x10008 + (I)*0x10000)
#define UNM_NIU_FC_TX_CONTROL(I) (UNM_CRB_NIU + 0x1000c + (I)*0x10000)
#define UNM_NIU_FC_ON_OFFLINE_CTL(I) (UNM_CRB_NIU + 0x10010 + (I)*0x10000)
#define UNM_NIU_FC_PORT_ACTIVE_STAT(I) (UNM_CRB_NIU + 0x10014 + (I)*0x10000)
#define UNM_NIU_FC_PORT_INACTIVE_STAT(I)(UNM_CRB_NIU + 0x10018 + (I)*0x10000)
#define UNM_NIU_FC_LINK_FAILURE_CNT(I) (UNM_CRB_NIU + 0x1001c + (I)*0x10000)
#define UNM_NIU_FC_LOSS_SYNC_CNT(I) (UNM_CRB_NIU + 0x10020 + (I)*0x10000)
#define UNM_NIU_FC_LOSS_SIGNAL_CNT(I) (UNM_CRB_NIU + 0x10024 + (I)*0x10000)
#define UNM_NIU_FC_PRIM_SEQ_ERR_CNT(I) (UNM_CRB_NIU + 0x10028 + (I)*0x10000)
#define UNM_NIU_FC_INVLD_TX_WORD_CNT(I) (UNM_CRB_NIU + 0x1002c + (I)*0x10000)
#define UNM_NIU_FC_INVLD_CRC_CNT(I) (UNM_CRB_NIU + 0x10030 + (I)*0x10000)
#define UNM_NIU_FC_RX_CELL_CNT(I) (UNM_CRB_NIU + 0x10034 + (I)*0x10000)
#define UNM_NIU_FC_TX_CELL_CNT(I) (UNM_CRB_NIU + 0x10038 + (I)*0x10000)
#define UNM_NIU_FC_B2B_CREDIT(I) (UNM_CRB_NIU + 0x1003c + (I)*0x10000)
#define UNM_NIU_FC_LOGIN_DONE(I) (UNM_CRB_NIU + 0x10040 + (I)*0x10000)
#define UNM_NIU_FC_OPERATING_SPEED(I) (UNM_CRB_NIU + 0x10044 + (I)*0x10000)
#define UNM_NIU_GB_MAC_CONFIG_0(I) (UNM_CRB_NIU + 0x30000 + (I)*0x10000)
#define UNM_NIU_GB_MAC_CONFIG_1(I) (UNM_CRB_NIU + 0x30004 + (I)*0x10000)
#define UNM_NIU_GB_MAC_IPG_IFG(I) (UNM_CRB_NIU + 0x30008 + (I)*0x10000)
#define UNM_NIU_GB_HALF_DUPLEX_CTRL(I) (UNM_CRB_NIU + 0x3000c + (I)*0x10000)
#define UNM_NIU_GB_MAX_FRAME_SIZE(I) (UNM_CRB_NIU + 0x30010 + (I)*0x10000)
#define UNM_NIU_GB_TEST_REG(I) (UNM_CRB_NIU + 0x3001c + (I)*0x10000)
#define UNM_NIU_GB_MII_MGMT_CONFIG(I) (UNM_CRB_NIU + 0x30020 + (I)*0x10000)
#define UNM_NIU_GB_MII_MGMT_COMMAND(I) (UNM_CRB_NIU + 0x30024 + (I)*0x10000)
#define UNM_NIU_GB_MII_MGMT_ADDR(I) (UNM_CRB_NIU + 0x30028 + (I)*0x10000)
#define UNM_NIU_GB_MII_MGMT_CTRL(I) (UNM_CRB_NIU + 0x3002c + (I)*0x10000)
#define UNM_NIU_GB_MII_MGMT_STATUS(I) (UNM_CRB_NIU + 0x30030 + (I)*0x10000)
#define UNM_NIU_GB_MII_MGMT_INDICATE(I) (UNM_CRB_NIU + 0x30034 + (I)*0x10000)
#define UNM_NIU_GB_INTERFACE_CTRL(I) (UNM_CRB_NIU + 0x30038 + (I)*0x10000)
#define UNM_NIU_GB_INTERFACE_STATUS(I) (UNM_CRB_NIU + 0x3003c + (I)*0x10000)
#define UNM_NIU_GB_STATION_ADDR_0(I) (UNM_CRB_NIU + 0x30040 + (I)*0x10000)
#define UNM_NIU_GB_STATION_ADDR_1(I) (UNM_CRB_NIU + 0x30044 + (I)*0x10000)
#define UNM_NIU_XGE_CONFIG_0 (UNM_CRB_NIU + 0x70000)
#define UNM_NIU_XGE_CONFIG_1 (UNM_CRB_NIU + 0x70004)
#define UNM_NIU_XGE_IPG (UNM_CRB_NIU + 0x70008)
#define UNM_NIU_XGE_STATION_ADDR_0_HI (UNM_CRB_NIU + 0x7000c)
#define UNM_NIU_XGE_STATION_ADDR_0_1 (UNM_CRB_NIU + 0x70010)
#define UNM_NIU_XGE_STATION_ADDR_1_LO (UNM_CRB_NIU + 0x70014)
#define UNM_NIU_XGE_STATUS (UNM_CRB_NIU + 0x70018)
#define UNM_NIU_XGE_MAX_FRAME_SIZE (UNM_CRB_NIU + 0x7001c)
#define UNM_NIU_XGE_PAUSE_FRAME_VALUE (UNM_CRB_NIU + 0x70020)
#define UNM_NIU_XGE_TX_BYTE_CNT (UNM_CRB_NIU + 0x70024)
#define UNM_NIU_XGE_TX_FRAME_CNT (UNM_CRB_NIU + 0x70028)
#define UNM_NIU_XGE_RX_BYTE_CNT (UNM_CRB_NIU + 0x7002c)
#define UNM_NIU_XGE_RX_FRAME_CNT (UNM_CRB_NIU + 0x70030)
#define UNM_NIU_XGE_AGGR_ERROR_CNT (UNM_CRB_NIU + 0x70034)
#define UNM_NIU_XGE_MULTICAST_FRAME_CNT (UNM_CRB_NIU + 0x70038)
#define UNM_NIU_XGE_UNICAST_FRAME_CNT (UNM_CRB_NIU + 0x7003c)
#define UNM_NIU_XGE_CRC_ERROR_CNT (UNM_CRB_NIU + 0x70040)
#define UNM_NIU_XGE_OVERSIZE_FRAME_ERR (UNM_CRB_NIU + 0x70044)
#define UNM_NIU_XGE_UNDERSIZE_FRAME_ERR (UNM_CRB_NIU + 0x70048)
#define UNM_NIU_XGE_LOCAL_ERROR_CNT (UNM_CRB_NIU + 0x7004c)
#define UNM_NIU_XGE_REMOTE_ERROR_CNT (UNM_CRB_NIU + 0x70050)
#define UNM_NIU_XGE_CONTROL_CHAR_CNT (UNM_CRB_NIU + 0x70054)
#define UNM_NIU_XGE_PAUSE_FRAME_CNT (UNM_CRB_NIU + 0x70058)
#define UNM_NIU_XG1_CONFIG_0 (UNM_CRB_NIU + 0x80000)
#define UNM_NIU_XG1_CONFIG_1 (UNM_CRB_NIU + 0x80004)
#define UNM_NIU_XG1_IPG (UNM_CRB_NIU + 0x80008)
#define UNM_NIU_XG1_STATION_ADDR_0_HI (UNM_CRB_NIU + 0x8000c)
#define UNM_NIU_XG1_STATION_ADDR_0_1 (UNM_CRB_NIU + 0x80010)
#define UNM_NIU_XG1_STATION_ADDR_1_LO (UNM_CRB_NIU + 0x80014)
#define UNM_NIU_XG1_STATUS (UNM_CRB_NIU + 0x80018)
#define UNM_NIU_XG1_MAX_FRAME_SIZE (UNM_CRB_NIU + 0x8001c)
#define UNM_NIU_XG1_PAUSE_FRAME_VALUE (UNM_CRB_NIU + 0x80020)
#define UNM_NIU_XG1_TX_BYTE_CNT (UNM_CRB_NIU + 0x80024)
#define UNM_NIU_XG1_TX_FRAME_CNT (UNM_CRB_NIU + 0x80028)
#define UNM_NIU_XG1_RX_BYTE_CNT (UNM_CRB_NIU + 0x8002c)
#define UNM_NIU_XG1_RX_FRAME_CNT (UNM_CRB_NIU + 0x80030)
#define UNM_NIU_XG1_AGGR_ERROR_CNT (UNM_CRB_NIU + 0x80034)
#define UNM_NIU_XG1_MULTICAST_FRAME_CNT (UNM_CRB_NIU + 0x80038)
#define UNM_NIU_XG1_UNICAST_FRAME_CNT (UNM_CRB_NIU + 0x8003c)
#define UNM_NIU_XG1_CRC_ERROR_CNT (UNM_CRB_NIU + 0x80040)
#define UNM_NIU_XG1_OVERSIZE_FRAME_ERR (UNM_CRB_NIU + 0x80044)
#define UNM_NIU_XG1_UNDERSIZE_FRAME_ERR (UNM_CRB_NIU + 0x80048)
#define UNM_NIU_XG1_LOCAL_ERROR_CNT (UNM_CRB_NIU + 0x8004c)
#define UNM_NIU_XG1_REMOTE_ERROR_CNT (UNM_CRB_NIU + 0x80050)
#define UNM_NIU_XG1_CONTROL_CHAR_CNT (UNM_CRB_NIU + 0x80054)
#define UNM_NIU_XG1_PAUSE_FRAME_CNT (UNM_CRB_NIU + 0x80058)
#define UNM_NIU_AP_MAC_CONFIG_0(I) (UNM_CRB_NIU + 0xa0000 + (I)*0x10000)
#define UNM_NIU_AP_MAC_CONFIG_1(I) (UNM_CRB_NIU + 0xa0004 + (I)*0x10000)
#define UNM_NIU_AP_MAC_IPG_IFG(I) (UNM_CRB_NIU + 0xa0008 + (I)*0x10000)
#define UNM_NIU_AP_HALF_DUPLEX_CTRL(I) (UNM_CRB_NIU + 0xa000c + (I)*0x10000)
#define UNM_NIU_AP_MAX_FRAME_SIZE(I) (UNM_CRB_NIU + 0xa0010 + (I)*0x10000)
#define UNM_NIU_AP_TEST_REG(I) (UNM_CRB_NIU + 0xa001c + (I)*0x10000)
#define UNM_NIU_AP_MII_MGMT_CONFIG(I) (UNM_CRB_NIU + 0xa0020 + (I)*0x10000)
#define UNM_NIU_AP_MII_MGMT_COMMAND(I) (UNM_CRB_NIU + 0xa0024 + (I)*0x10000)
#define UNM_NIU_AP_MII_MGMT_ADDR(I) (UNM_CRB_NIU + 0xa0028 + (I)*0x10000)
#define UNM_NIU_AP_MII_MGMT_CTRL(I) (UNM_CRB_NIU + 0xa002c + (I)*0x10000)
#define UNM_NIU_AP_MII_MGMT_STATUS(I) (UNM_CRB_NIU + 0xa0030 + (I)*0x10000)
#define UNM_NIU_AP_MII_MGMT_INDICATE(I) (UNM_CRB_NIU + 0xa0034 + (I)*0x10000)
#define UNM_NIU_AP_INTERFACE_CTRL(I) (UNM_CRB_NIU + 0xa0038 + (I)*0x10000)
#define UNM_NIU_AP_INTERFACE_STATUS(I) (UNM_CRB_NIU + 0xa003c + (I)*0x10000)
#define UNM_NIU_AP_STATION_ADDR_0(I) (UNM_CRB_NIU + 0xa0040 + (I)*0x10000)
#define UNM_NIU_AP_STATION_ADDR_1(I) (UNM_CRB_NIU + 0xa0044 + (I)*0x10000)
#define UNM_NIU_MODE (UNM_CRB_NIU + 0x00000)