cxgb3 - TP SRAM update
Subsystems (2)
PATCH 3/3 cxgb3 - TP SRAM update
From: Divy Le Ray <[email protected]>
The chip executes microcode present in internal RAM, whose content is loaded from EEPROM on power cycle. This patch allows an update of the microcode through PIO without forcing a power cycle.
Signed-off-by Divy Le Ray <[email protected]>
---
drivers/net/cxgb3/common.h | 28 +++++++++++++ drivers/net/cxgb3/cxgb3_main.c | 43 ++++++++++++++++++++ drivers/net/cxgb3/regs.h | 7 +++ drivers/net/cxgb3/t3_hw.c | 86 ++++++++++++++++++++++++++++++++++++++++ 4 files changed, 164 insertions(+), 0 deletions(-)
drivers/net/cxgb3/common.h +28 -0
@@ -101,6 +101,7 @@ enum {TCB_SIZE =128 ,/* TCB size */ NMTUS =16 ,/* size of MTU table */ NCCTRL_WIN =32 ,/* # of congestion control windows */ + PROTO_SRAM_LINES = 128, /* size of TP sram */ };#define MAX_RX_COALESCING_LEN 16224U
@@ -124,6 +125,30 @@ enum { /* adapter interrupt-maintaine };enum { +TP_VERSION_MAJOR =1 , +TP_VERSION_MINOR =0 , +TP_VERSION_MICRO =44 +}; + +#define S_TP_VERSION_MAJOR 16 +#define M_TP_VERSION_MAJOR 0xFF +#define V_TP_VERSION_MAJOR (x) ((x) << S_TP_VERSION_MAJOR) +#define G_TP_VERSION_MAJOR (x) \ + (((x) >> S_TP_VERSION_MAJOR) & M_TP_VERSION_MAJOR) + +#define S_TP_VERSION_MINOR 8 +#define M_TP_VERSION_MINOR 0xFF +#define V_TP_VERSION_MINOR (x) ((x) << S_TP_VERSION_MINOR) +#define G_TP_VERSION_MINOR (x) \ + (((x) >> S_TP_VERSION_MINOR) & M_TP_VERSION_MINOR) + +#define S_TP_VERSION_MICRO 0 +#define M_TP_VERSION_MICRO 0xFF +#define V_TP_VERSION_MICRO (x) ((x) << S_TP_VERSION_MICRO) +#define G_TP_VERSION_MICRO (x) \ + (((x) >> S_TP_VERSION_MICRO) & M_TP_VERSION_MICRO) + +enum {SGE_QSETS =8 ,/* # of SGE Tx/Rx/RspQ sets */ SGE_RXQ_PER_SET =2 ,/* # of Rx queues per set */ SGE_TXQ_PER_SET =3 /* # of Tx queues per set */
@@ -654,6 +679,9 @@ const struct adapter_info *t3_get_adapteint t3_seeprom_read (struct adapter *adapter,u32 addr,u32 *data);int t3_seeprom_write (struct adapter *adapter,u32 addr,u32 data);int t3_seeprom_wp (struct adapter *adapter,int enable); +int t3_check_tpsram_version (struct adapter *adapter); +int t3_check_tpsram (struct adapter *adapter,u8 *tp_ram,unsigned int size); +int t3_set_proto_sram (struct adapter *adap,u8 *data);int t3_read_flash (struct adapter *adapter,unsigned int addr,unsigned int nwords,u32 *data,int byte_oriented);int t3_load_fw (struct adapter *adapter,const u8 * fw_data,unsigned int size);
drivers/net/cxgb3/cxgb3_main.c +43 -0
55 lines not on this page · raw message
drivers/net/cxgb3/regs.h +7 -0
@@ -1218,6 +1218,13 @@#define A_TP_PROXY_FLOW_CNTL 0x4b0 +#define A_TP_EMBED_OP_FIELD0 0x4e8 +#define A_TP_EMBED_OP_FIELD1 0x4ec +#define A_TP_EMBED_OP_FIELD2 0x4f0 +#define A_TP_EMBED_OP_FIELD3 0x4f4 +#define A_TP_EMBED_OP_FIELD4 0x4f8 +#define A_TP_EMBED_OP_FIELD5 0x4fc +#define A_ULPRX_CTL 0x500#define S_ROUND_ROBIN 4
drivers/net/cxgb3/t3_hw.c +86 -0
98 lines not on this page · raw message