18c2ecf20Sopenharmony_ci/* 28c2ecf20Sopenharmony_ci * This file is part of the Chelsio T4 Ethernet driver for Linux. 38c2ecf20Sopenharmony_ci * 48c2ecf20Sopenharmony_ci * Copyright (c) 2003-2014 Chelsio Communications, Inc. All rights reserved. 58c2ecf20Sopenharmony_ci * 68c2ecf20Sopenharmony_ci * This software is available to you under a choice of one of two 78c2ecf20Sopenharmony_ci * licenses. You may choose to be licensed under the terms of the GNU 88c2ecf20Sopenharmony_ci * General Public License (GPL) Version 2, available from the file 98c2ecf20Sopenharmony_ci * COPYING in the main directory of this source tree, or the 108c2ecf20Sopenharmony_ci * OpenIB.org BSD license below: 118c2ecf20Sopenharmony_ci * 128c2ecf20Sopenharmony_ci * Redistribution and use in source and binary forms, with or 138c2ecf20Sopenharmony_ci * without modification, are permitted provided that the following 148c2ecf20Sopenharmony_ci * conditions are met: 158c2ecf20Sopenharmony_ci * 168c2ecf20Sopenharmony_ci * - Redistributions of source code must retain the above 178c2ecf20Sopenharmony_ci * copyright notice, this list of conditions and the following 188c2ecf20Sopenharmony_ci * disclaimer. 198c2ecf20Sopenharmony_ci * 208c2ecf20Sopenharmony_ci * - Redistributions in binary form must reproduce the above 218c2ecf20Sopenharmony_ci * copyright notice, this list of conditions and the following 228c2ecf20Sopenharmony_ci * disclaimer in the documentation and/or other materials 238c2ecf20Sopenharmony_ci * provided with the distribution. 248c2ecf20Sopenharmony_ci * 258c2ecf20Sopenharmony_ci * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 268c2ecf20Sopenharmony_ci * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 278c2ecf20Sopenharmony_ci * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 288c2ecf20Sopenharmony_ci * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS 298c2ecf20Sopenharmony_ci * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 308c2ecf20Sopenharmony_ci * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 318c2ecf20Sopenharmony_ci * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 328c2ecf20Sopenharmony_ci * SOFTWARE. 338c2ecf20Sopenharmony_ci */ 348c2ecf20Sopenharmony_ci 358c2ecf20Sopenharmony_ci#ifndef __T4_HW_H 368c2ecf20Sopenharmony_ci#define __T4_HW_H 378c2ecf20Sopenharmony_ci 388c2ecf20Sopenharmony_ci#include <linux/types.h> 398c2ecf20Sopenharmony_ci 408c2ecf20Sopenharmony_cienum { 418c2ecf20Sopenharmony_ci NCHAN = 4, /* # of HW channels */ 428c2ecf20Sopenharmony_ci MAX_MTU = 9600, /* max MAC MTU, excluding header + FCS */ 438c2ecf20Sopenharmony_ci EEPROMSIZE = 17408,/* Serial EEPROM physical size */ 448c2ecf20Sopenharmony_ci EEPROMVSIZE = 32768,/* Serial EEPROM virtual address space size */ 458c2ecf20Sopenharmony_ci EEPROMPFSIZE = 1024, /* EEPROM writable area size for PFn, n>0 */ 468c2ecf20Sopenharmony_ci RSS_NENTRIES = 2048, /* # of entries in RSS mapping table */ 478c2ecf20Sopenharmony_ci T6_RSS_NENTRIES = 4096, /* # of entries in RSS mapping table */ 488c2ecf20Sopenharmony_ci TCB_SIZE = 128, /* TCB size */ 498c2ecf20Sopenharmony_ci NMTUS = 16, /* size of MTU table */ 508c2ecf20Sopenharmony_ci NCCTRL_WIN = 32, /* # of congestion control windows */ 518c2ecf20Sopenharmony_ci NTX_SCHED = 8, /* # of HW Tx scheduling queues */ 528c2ecf20Sopenharmony_ci PM_NSTATS = 5, /* # of PM stats */ 538c2ecf20Sopenharmony_ci T6_PM_NSTATS = 7, /* # of PM stats in T6 */ 548c2ecf20Sopenharmony_ci MBOX_LEN = 64, /* mailbox size in bytes */ 558c2ecf20Sopenharmony_ci TRACE_LEN = 112, /* length of trace data and mask */ 568c2ecf20Sopenharmony_ci FILTER_OPT_LEN = 36, /* filter tuple width for optional components */ 578c2ecf20Sopenharmony_ci}; 588c2ecf20Sopenharmony_ci 598c2ecf20Sopenharmony_cienum { 608c2ecf20Sopenharmony_ci CIM_NUM_IBQ = 6, /* # of CIM IBQs */ 618c2ecf20Sopenharmony_ci CIM_NUM_OBQ = 6, /* # of CIM OBQs */ 628c2ecf20Sopenharmony_ci CIM_NUM_OBQ_T5 = 8, /* # of CIM OBQs for T5 adapter */ 638c2ecf20Sopenharmony_ci CIMLA_SIZE = 2048, /* # of 32-bit words in CIM LA */ 648c2ecf20Sopenharmony_ci CIM_PIFLA_SIZE = 64, /* # of 192-bit words in CIM PIF LA */ 658c2ecf20Sopenharmony_ci CIM_MALA_SIZE = 64, /* # of 160-bit words in CIM MA LA */ 668c2ecf20Sopenharmony_ci CIM_IBQ_SIZE = 128, /* # of 128-bit words in a CIM IBQ */ 678c2ecf20Sopenharmony_ci CIM_OBQ_SIZE = 128, /* # of 128-bit words in a CIM OBQ */ 688c2ecf20Sopenharmony_ci TPLA_SIZE = 128, /* # of 64-bit words in TP LA */ 698c2ecf20Sopenharmony_ci ULPRX_LA_SIZE = 512, /* # of 256-bit words in ULP_RX LA */ 708c2ecf20Sopenharmony_ci}; 718c2ecf20Sopenharmony_ci 728c2ecf20Sopenharmony_ci/* SGE context types */ 738c2ecf20Sopenharmony_cienum ctxt_type { 748c2ecf20Sopenharmony_ci CTXT_EGRESS, 758c2ecf20Sopenharmony_ci CTXT_INGRESS, 768c2ecf20Sopenharmony_ci CTXT_FLM, 778c2ecf20Sopenharmony_ci CTXT_CNM, 788c2ecf20Sopenharmony_ci}; 798c2ecf20Sopenharmony_ci 808c2ecf20Sopenharmony_cienum { 818c2ecf20Sopenharmony_ci SF_PAGE_SIZE = 256, /* serial flash page size */ 828c2ecf20Sopenharmony_ci SF_SEC_SIZE = 64 * 1024, /* serial flash sector size */ 838c2ecf20Sopenharmony_ci}; 848c2ecf20Sopenharmony_ci 858c2ecf20Sopenharmony_cienum { RSP_TYPE_FLBUF, RSP_TYPE_CPL, RSP_TYPE_INTR }; /* response entry types */ 868c2ecf20Sopenharmony_ci 878c2ecf20Sopenharmony_cienum { MBOX_OWNER_NONE, MBOX_OWNER_FW, MBOX_OWNER_DRV }; /* mailbox owners */ 888c2ecf20Sopenharmony_ci 898c2ecf20Sopenharmony_cienum { 908c2ecf20Sopenharmony_ci SGE_MAX_WR_LEN = 512, /* max WR size in bytes */ 918c2ecf20Sopenharmony_ci SGE_CTXT_SIZE = 24, /* size of SGE context */ 928c2ecf20Sopenharmony_ci SGE_NTIMERS = 6, /* # of interrupt holdoff timer values */ 938c2ecf20Sopenharmony_ci SGE_NCOUNTERS = 4, /* # of interrupt packet counter values */ 948c2ecf20Sopenharmony_ci SGE_NDBQTIMERS = 8, /* # of Doorbell Queue Timer values */ 958c2ecf20Sopenharmony_ci SGE_MAX_IQ_SIZE = 65520, 968c2ecf20Sopenharmony_ci 978c2ecf20Sopenharmony_ci SGE_TIMER_RSTRT_CNTR = 6, /* restart RX packet threshold counter */ 988c2ecf20Sopenharmony_ci SGE_TIMER_UPD_CIDX = 7, /* update cidx only */ 998c2ecf20Sopenharmony_ci 1008c2ecf20Sopenharmony_ci SGE_EQ_IDXSIZE = 64, /* egress queue pidx/cidx unit size */ 1018c2ecf20Sopenharmony_ci 1028c2ecf20Sopenharmony_ci SGE_INTRDST_PCI = 0, /* interrupt destination is PCI-E */ 1038c2ecf20Sopenharmony_ci SGE_INTRDST_IQ = 1, /* destination is an ingress queue */ 1048c2ecf20Sopenharmony_ci 1058c2ecf20Sopenharmony_ci SGE_UPDATEDEL_NONE = 0, /* ingress queue pidx update delivery */ 1068c2ecf20Sopenharmony_ci SGE_UPDATEDEL_INTR = 1, /* interrupt */ 1078c2ecf20Sopenharmony_ci SGE_UPDATEDEL_STPG = 2, /* status page */ 1088c2ecf20Sopenharmony_ci SGE_UPDATEDEL_BOTH = 3, /* interrupt and status page */ 1098c2ecf20Sopenharmony_ci 1108c2ecf20Sopenharmony_ci SGE_HOSTFCMODE_NONE = 0, /* egress queue cidx updates */ 1118c2ecf20Sopenharmony_ci SGE_HOSTFCMODE_IQ = 1, /* sent to ingress queue */ 1128c2ecf20Sopenharmony_ci SGE_HOSTFCMODE_STPG = 2, /* sent to status page */ 1138c2ecf20Sopenharmony_ci SGE_HOSTFCMODE_BOTH = 3, /* ingress queue and status page */ 1148c2ecf20Sopenharmony_ci 1158c2ecf20Sopenharmony_ci SGE_FETCHBURSTMIN_16B = 0,/* egress queue descriptor fetch minimum */ 1168c2ecf20Sopenharmony_ci SGE_FETCHBURSTMIN_32B = 1, 1178c2ecf20Sopenharmony_ci SGE_FETCHBURSTMIN_64B = 2, 1188c2ecf20Sopenharmony_ci SGE_FETCHBURSTMIN_128B = 3, 1198c2ecf20Sopenharmony_ci 1208c2ecf20Sopenharmony_ci SGE_FETCHBURSTMAX_64B = 0,/* egress queue descriptor fetch maximum */ 1218c2ecf20Sopenharmony_ci SGE_FETCHBURSTMAX_128B = 1, 1228c2ecf20Sopenharmony_ci SGE_FETCHBURSTMAX_256B = 2, 1238c2ecf20Sopenharmony_ci SGE_FETCHBURSTMAX_512B = 3, 1248c2ecf20Sopenharmony_ci 1258c2ecf20Sopenharmony_ci SGE_CIDXFLUSHTHRESH_1 = 0,/* egress queue cidx flush threshold */ 1268c2ecf20Sopenharmony_ci SGE_CIDXFLUSHTHRESH_2 = 1, 1278c2ecf20Sopenharmony_ci SGE_CIDXFLUSHTHRESH_4 = 2, 1288c2ecf20Sopenharmony_ci SGE_CIDXFLUSHTHRESH_8 = 3, 1298c2ecf20Sopenharmony_ci SGE_CIDXFLUSHTHRESH_16 = 4, 1308c2ecf20Sopenharmony_ci SGE_CIDXFLUSHTHRESH_32 = 5, 1318c2ecf20Sopenharmony_ci SGE_CIDXFLUSHTHRESH_64 = 6, 1328c2ecf20Sopenharmony_ci SGE_CIDXFLUSHTHRESH_128 = 7, 1338c2ecf20Sopenharmony_ci 1348c2ecf20Sopenharmony_ci SGE_INGPADBOUNDARY_SHIFT = 5,/* ingress queue pad boundary */ 1358c2ecf20Sopenharmony_ci}; 1368c2ecf20Sopenharmony_ci 1378c2ecf20Sopenharmony_ci/* PCI-e memory window access */ 1388c2ecf20Sopenharmony_cienum pcie_memwin { 1398c2ecf20Sopenharmony_ci MEMWIN_NIC = 0, 1408c2ecf20Sopenharmony_ci MEMWIN_RSVD1 = 1, 1418c2ecf20Sopenharmony_ci MEMWIN_RSVD2 = 2, 1428c2ecf20Sopenharmony_ci MEMWIN_RDMA = 3, 1438c2ecf20Sopenharmony_ci MEMWIN_RSVD4 = 4, 1448c2ecf20Sopenharmony_ci MEMWIN_FOISCSI = 5, 1458c2ecf20Sopenharmony_ci MEMWIN_CSIOSTOR = 6, 1468c2ecf20Sopenharmony_ci MEMWIN_RSVD7 = 7, 1478c2ecf20Sopenharmony_ci}; 1488c2ecf20Sopenharmony_ci 1498c2ecf20Sopenharmony_cistruct sge_qstat { /* data written to SGE queue status entries */ 1508c2ecf20Sopenharmony_ci __be32 qid; 1518c2ecf20Sopenharmony_ci __be16 cidx; 1528c2ecf20Sopenharmony_ci __be16 pidx; 1538c2ecf20Sopenharmony_ci}; 1548c2ecf20Sopenharmony_ci 1558c2ecf20Sopenharmony_ci/* 1568c2ecf20Sopenharmony_ci * Structure for last 128 bits of response descriptors 1578c2ecf20Sopenharmony_ci */ 1588c2ecf20Sopenharmony_cistruct rsp_ctrl { 1598c2ecf20Sopenharmony_ci __be32 hdrbuflen_pidx; 1608c2ecf20Sopenharmony_ci __be32 pldbuflen_qid; 1618c2ecf20Sopenharmony_ci union { 1628c2ecf20Sopenharmony_ci u8 type_gen; 1638c2ecf20Sopenharmony_ci __be64 last_flit; 1648c2ecf20Sopenharmony_ci }; 1658c2ecf20Sopenharmony_ci}; 1668c2ecf20Sopenharmony_ci 1678c2ecf20Sopenharmony_ci#define RSPD_NEWBUF_S 31 1688c2ecf20Sopenharmony_ci#define RSPD_NEWBUF_V(x) ((x) << RSPD_NEWBUF_S) 1698c2ecf20Sopenharmony_ci#define RSPD_NEWBUF_F RSPD_NEWBUF_V(1U) 1708c2ecf20Sopenharmony_ci 1718c2ecf20Sopenharmony_ci#define RSPD_LEN_S 0 1728c2ecf20Sopenharmony_ci#define RSPD_LEN_M 0x7fffffff 1738c2ecf20Sopenharmony_ci#define RSPD_LEN_G(x) (((x) >> RSPD_LEN_S) & RSPD_LEN_M) 1748c2ecf20Sopenharmony_ci 1758c2ecf20Sopenharmony_ci#define RSPD_QID_S RSPD_LEN_S 1768c2ecf20Sopenharmony_ci#define RSPD_QID_M RSPD_LEN_M 1778c2ecf20Sopenharmony_ci#define RSPD_QID_G(x) RSPD_LEN_G(x) 1788c2ecf20Sopenharmony_ci 1798c2ecf20Sopenharmony_ci#define RSPD_GEN_S 7 1808c2ecf20Sopenharmony_ci 1818c2ecf20Sopenharmony_ci#define RSPD_TYPE_S 4 1828c2ecf20Sopenharmony_ci#define RSPD_TYPE_M 0x3 1838c2ecf20Sopenharmony_ci#define RSPD_TYPE_G(x) (((x) >> RSPD_TYPE_S) & RSPD_TYPE_M) 1848c2ecf20Sopenharmony_ci 1858c2ecf20Sopenharmony_ci/* Rx queue interrupt deferral fields: counter enable and timer index */ 1868c2ecf20Sopenharmony_ci#define QINTR_CNT_EN_S 0 1878c2ecf20Sopenharmony_ci#define QINTR_CNT_EN_V(x) ((x) << QINTR_CNT_EN_S) 1888c2ecf20Sopenharmony_ci#define QINTR_CNT_EN_F QINTR_CNT_EN_V(1U) 1898c2ecf20Sopenharmony_ci 1908c2ecf20Sopenharmony_ci#define QINTR_TIMER_IDX_S 1 1918c2ecf20Sopenharmony_ci#define QINTR_TIMER_IDX_M 0x7 1928c2ecf20Sopenharmony_ci#define QINTR_TIMER_IDX_V(x) ((x) << QINTR_TIMER_IDX_S) 1938c2ecf20Sopenharmony_ci#define QINTR_TIMER_IDX_G(x) (((x) >> QINTR_TIMER_IDX_S) & QINTR_TIMER_IDX_M) 1948c2ecf20Sopenharmony_ci 1958c2ecf20Sopenharmony_ci/* 1968c2ecf20Sopenharmony_ci * Flash layout. 1978c2ecf20Sopenharmony_ci */ 1988c2ecf20Sopenharmony_ci#define FLASH_START(start) ((start) * SF_SEC_SIZE) 1998c2ecf20Sopenharmony_ci#define FLASH_MAX_SIZE(nsecs) ((nsecs) * SF_SEC_SIZE) 2008c2ecf20Sopenharmony_ci 2018c2ecf20Sopenharmony_cienum { 2028c2ecf20Sopenharmony_ci /* 2038c2ecf20Sopenharmony_ci * Various Expansion-ROM boot images, etc. 2048c2ecf20Sopenharmony_ci */ 2058c2ecf20Sopenharmony_ci FLASH_EXP_ROM_START_SEC = 0, 2068c2ecf20Sopenharmony_ci FLASH_EXP_ROM_NSECS = 6, 2078c2ecf20Sopenharmony_ci FLASH_EXP_ROM_START = FLASH_START(FLASH_EXP_ROM_START_SEC), 2088c2ecf20Sopenharmony_ci FLASH_EXP_ROM_MAX_SIZE = FLASH_MAX_SIZE(FLASH_EXP_ROM_NSECS), 2098c2ecf20Sopenharmony_ci 2108c2ecf20Sopenharmony_ci /* 2118c2ecf20Sopenharmony_ci * iSCSI Boot Firmware Table (iBFT) and other driver-related 2128c2ecf20Sopenharmony_ci * parameters ... 2138c2ecf20Sopenharmony_ci */ 2148c2ecf20Sopenharmony_ci FLASH_IBFT_START_SEC = 6, 2158c2ecf20Sopenharmony_ci FLASH_IBFT_NSECS = 1, 2168c2ecf20Sopenharmony_ci FLASH_IBFT_START = FLASH_START(FLASH_IBFT_START_SEC), 2178c2ecf20Sopenharmony_ci FLASH_IBFT_MAX_SIZE = FLASH_MAX_SIZE(FLASH_IBFT_NSECS), 2188c2ecf20Sopenharmony_ci 2198c2ecf20Sopenharmony_ci /* 2208c2ecf20Sopenharmony_ci * Boot configuration data. 2218c2ecf20Sopenharmony_ci */ 2228c2ecf20Sopenharmony_ci FLASH_BOOTCFG_START_SEC = 7, 2238c2ecf20Sopenharmony_ci FLASH_BOOTCFG_NSECS = 1, 2248c2ecf20Sopenharmony_ci FLASH_BOOTCFG_START = FLASH_START(FLASH_BOOTCFG_START_SEC), 2258c2ecf20Sopenharmony_ci FLASH_BOOTCFG_MAX_SIZE = FLASH_MAX_SIZE(FLASH_BOOTCFG_NSECS), 2268c2ecf20Sopenharmony_ci 2278c2ecf20Sopenharmony_ci /* 2288c2ecf20Sopenharmony_ci * Location of firmware image in FLASH. 2298c2ecf20Sopenharmony_ci */ 2308c2ecf20Sopenharmony_ci FLASH_FW_START_SEC = 8, 2318c2ecf20Sopenharmony_ci FLASH_FW_NSECS = 16, 2328c2ecf20Sopenharmony_ci FLASH_FW_START = FLASH_START(FLASH_FW_START_SEC), 2338c2ecf20Sopenharmony_ci FLASH_FW_MAX_SIZE = FLASH_MAX_SIZE(FLASH_FW_NSECS), 2348c2ecf20Sopenharmony_ci 2358c2ecf20Sopenharmony_ci /* Location of bootstrap firmware image in FLASH. 2368c2ecf20Sopenharmony_ci */ 2378c2ecf20Sopenharmony_ci FLASH_FWBOOTSTRAP_START_SEC = 27, 2388c2ecf20Sopenharmony_ci FLASH_FWBOOTSTRAP_NSECS = 1, 2398c2ecf20Sopenharmony_ci FLASH_FWBOOTSTRAP_START = FLASH_START(FLASH_FWBOOTSTRAP_START_SEC), 2408c2ecf20Sopenharmony_ci FLASH_FWBOOTSTRAP_MAX_SIZE = FLASH_MAX_SIZE(FLASH_FWBOOTSTRAP_NSECS), 2418c2ecf20Sopenharmony_ci 2428c2ecf20Sopenharmony_ci /* 2438c2ecf20Sopenharmony_ci * iSCSI persistent/crash information. 2448c2ecf20Sopenharmony_ci */ 2458c2ecf20Sopenharmony_ci FLASH_ISCSI_CRASH_START_SEC = 29, 2468c2ecf20Sopenharmony_ci FLASH_ISCSI_CRASH_NSECS = 1, 2478c2ecf20Sopenharmony_ci FLASH_ISCSI_CRASH_START = FLASH_START(FLASH_ISCSI_CRASH_START_SEC), 2488c2ecf20Sopenharmony_ci FLASH_ISCSI_CRASH_MAX_SIZE = FLASH_MAX_SIZE(FLASH_ISCSI_CRASH_NSECS), 2498c2ecf20Sopenharmony_ci 2508c2ecf20Sopenharmony_ci /* 2518c2ecf20Sopenharmony_ci * FCoE persistent/crash information. 2528c2ecf20Sopenharmony_ci */ 2538c2ecf20Sopenharmony_ci FLASH_FCOE_CRASH_START_SEC = 30, 2548c2ecf20Sopenharmony_ci FLASH_FCOE_CRASH_NSECS = 1, 2558c2ecf20Sopenharmony_ci FLASH_FCOE_CRASH_START = FLASH_START(FLASH_FCOE_CRASH_START_SEC), 2568c2ecf20Sopenharmony_ci FLASH_FCOE_CRASH_MAX_SIZE = FLASH_MAX_SIZE(FLASH_FCOE_CRASH_NSECS), 2578c2ecf20Sopenharmony_ci 2588c2ecf20Sopenharmony_ci /* 2598c2ecf20Sopenharmony_ci * Location of Firmware Configuration File in FLASH. Since the FPGA 2608c2ecf20Sopenharmony_ci * "FLASH" is smaller we need to store the Configuration File in a 2618c2ecf20Sopenharmony_ci * different location -- which will overlap the end of the firmware 2628c2ecf20Sopenharmony_ci * image if firmware ever gets that large ... 2638c2ecf20Sopenharmony_ci */ 2648c2ecf20Sopenharmony_ci FLASH_CFG_START_SEC = 31, 2658c2ecf20Sopenharmony_ci FLASH_CFG_NSECS = 1, 2668c2ecf20Sopenharmony_ci FLASH_CFG_START = FLASH_START(FLASH_CFG_START_SEC), 2678c2ecf20Sopenharmony_ci FLASH_CFG_MAX_SIZE = FLASH_MAX_SIZE(FLASH_CFG_NSECS), 2688c2ecf20Sopenharmony_ci 2698c2ecf20Sopenharmony_ci /* We don't support FLASH devices which can't support the full 2708c2ecf20Sopenharmony_ci * standard set of sections which we need for normal 2718c2ecf20Sopenharmony_ci * operations. 2728c2ecf20Sopenharmony_ci */ 2738c2ecf20Sopenharmony_ci FLASH_MIN_SIZE = FLASH_CFG_START + FLASH_CFG_MAX_SIZE, 2748c2ecf20Sopenharmony_ci 2758c2ecf20Sopenharmony_ci FLASH_FPGA_CFG_START_SEC = 15, 2768c2ecf20Sopenharmony_ci FLASH_FPGA_CFG_START = FLASH_START(FLASH_FPGA_CFG_START_SEC), 2778c2ecf20Sopenharmony_ci 2788c2ecf20Sopenharmony_ci /* 2798c2ecf20Sopenharmony_ci * Sectors 32-63 are reserved for FLASH failover. 2808c2ecf20Sopenharmony_ci */ 2818c2ecf20Sopenharmony_ci}; 2828c2ecf20Sopenharmony_ci 2838c2ecf20Sopenharmony_ci#undef FLASH_START 2848c2ecf20Sopenharmony_ci#undef FLASH_MAX_SIZE 2858c2ecf20Sopenharmony_ci 2868c2ecf20Sopenharmony_ci#define SGE_TIMESTAMP_S 0 2878c2ecf20Sopenharmony_ci#define SGE_TIMESTAMP_M 0xfffffffffffffffULL 2888c2ecf20Sopenharmony_ci#define SGE_TIMESTAMP_V(x) ((__u64)(x) << SGE_TIMESTAMP_S) 2898c2ecf20Sopenharmony_ci#define SGE_TIMESTAMP_G(x) (((__u64)(x) >> SGE_TIMESTAMP_S) & SGE_TIMESTAMP_M) 2908c2ecf20Sopenharmony_ci 2918c2ecf20Sopenharmony_ci#define I2C_DEV_ADDR_A0 0xa0 2928c2ecf20Sopenharmony_ci#define I2C_DEV_ADDR_A2 0xa2 2938c2ecf20Sopenharmony_ci#define I2C_PAGE_SIZE 0x100 2948c2ecf20Sopenharmony_ci#define SFP_DIAG_TYPE_ADDR 0x5c 2958c2ecf20Sopenharmony_ci#define SFP_DIAG_TYPE_LEN 0x1 2968c2ecf20Sopenharmony_ci#define SFP_DIAG_ADDRMODE BIT(2) 2978c2ecf20Sopenharmony_ci#define SFP_DIAG_IMPLEMENTED BIT(6) 2988c2ecf20Sopenharmony_ci#define SFF_8472_COMP_ADDR 0x5e 2998c2ecf20Sopenharmony_ci#define SFF_8472_COMP_LEN 0x1 3008c2ecf20Sopenharmony_ci#define SFF_REV_ADDR 0x1 3018c2ecf20Sopenharmony_ci#define SFF_REV_LEN 0x1 3028c2ecf20Sopenharmony_ci 3038c2ecf20Sopenharmony_ci#endif /* __T4_HW_H */ 304