iPXE
Data Structures | Defines | Enumerations | Functions | Variables
linda.h File Reference

QLogic Linda Infiniband HCA. More...

#include <ipxe/pseudobit.h>
#include "qib_7220_regs.h"

Go to the source code of this file.

Data Structures

struct  QIB_7220_GPIO_pb
 A Linda GPIO register. More...
struct  QIB_7220_GPIO
struct  QIB_7220_scalar_pb
 A Linda general scalar register. More...
struct  QIB_7220_scalar
struct  QIB_7220_SendPbc_pb
 Linda send per-buffer control word. More...
struct  QIB_7220_SendPbc
struct  QIB_7220_SendBufAvail_pb
 Linda send buffer availability. More...
struct  QIB_7220_SendBufAvail
struct  QIB_7220_RcvEgr_pb
 A Linda eager receive descriptor. More...
struct  QIB_7220_RcvEgr
struct  QIB_7220_RcvHdrFlags_pb
 Linda receive header flags. More...
struct  QIB_7220_RcvHdrFlags

Defines

#define PSEUDOBIT_LITTLE_ENDIAN
#define LINDA_SENDBUFAVAIL_ALIGN   64
 DMA alignment for send buffer availability.
#define LINDA_BAR0_SIZE   0x400000
 Linda memory BAR size.
#define LINDA_GPIO_SCL   0
 Linda I2C SCL line GPIO number.
#define LINDA_GPIO_SDA   1
 Linda I2C SDA line GPIO number.
#define LINDA_EEPROM_GUID_OFFSET   3
 GUID offset within EEPROM.
#define LINDA_EEPROM_GUID_SIZE   8
 GUID size within EEPROM.
#define LINDA_EEPROM_SERIAL_OFFSET   12
 Board serial number offset within EEPROM.
#define LINDA_EEPROM_SERIAL_SIZE   12
 Board serial number size within EEPROM.
#define LINDA_MAX_SEND_BUFS   32
 Maximum number of send buffers used.
#define LINDA_SEND_BUF_SIZE   4096
 Linda send buffer size.
#define LINDA_NUM_CONTEXTS   5
 Number of contexts (including kernel context)
#define LINDA_EAGER_ARRAY_SIZE_5CTX_0   2048
 PortCfg values for different numbers of contexts.
#define LINDA_EAGER_ARRAY_SIZE_5CTX_OTHER   4096
#define LINDA_EAGER_ARRAY_SIZE_9CTX_0   2048
#define LINDA_EAGER_ARRAY_SIZE_9CTX_OTHER   2048
#define LINDA_EAGER_ARRAY_SIZE_17CTX_0   2048
#define LINDA_EAGER_ARRAY_SIZE_17CTX_OTHER   1024
#define LINDA_EAGER_BUFFER_ALIGN   2048
 Eager buffer required alignment.
#define LINDA_RECV_HEADER_COUNT   8
 Number of RX headers per context.
#define LINDA_RECV_HEADER_SIZE   96
 Maximum size of each RX header.
#define LINDA_RECV_HEADERS_SIZE   ( LINDA_RECV_HEADER_SIZE * LINDA_RECV_HEADER_COUNT )
 Total size of an RX header ring.
#define LINDA_RECV_HEADERS_ALIGN   64
 RX header alignment.
#define LINDA_RECV_PAYLOAD_SIZE   2048
 RX payload size.
#define LINDA_QP_IDETH   0xdead0
 QPN used for Infinipath Packets.
#define LINDA_EPB_REQUEST_MAX_WAIT_US   500
 Maximum time for wait for external parallel bus request, in us.
#define LINDA_EPB_XACT_MAX_WAIT_US   500
 Maximum time for wait for external parallel bus transaction, in us.
#define LINDA_EPB_CS_SERDES   1
 Linda external parallel bus chip selects.
#define LINDA_EPB_CS_UC   2
#define LINDA_EPB_WRITE   0
 Linda external parallel bus read/write operations.
#define LINDA_EPB_READ   1
#define LINDA_EPB_ADDRESS(_channel, _element, _reg)   ( (_element) | ( (_channel) << 4 ) | ( (_reg) << 9 ) )
 Linda external parallel bus register addresses.
#define LINDA_EPB_ADDRESS_CHANNEL(_address)   ( ( (_address) >> 4 ) & 0x1f )
#define LINDA_EPB_ADDRESS_ELEMENT(_address)   ( ( (_address) >> 0 ) & 0x0f )
#define LINDA_EPB_ADDRESS_REG(_address)   ( ( (_address) >> 9 ) & 0x3f )
#define LINDA_EPB_LOC(_cs, _channel, _element, _reg)   ( ( (_cs) << 16 ) | LINDA_EPB_ADDRESS ( _channel, _element, _reg ) )
 Linda external parallel bus locations.
#define LINDA_EPB_LOC_ADDRESS(_loc)   ( (_loc) & 0xffff )
#define LINDA_EPB_LOC_CS(_loc)   ( (_loc) >> 16 )
#define LINDA_EPB_UC_CHANNEL   6
 Linda external parallel bus microcontroller register addresses.
#define LINDA_EPB_UC_LOC(_reg)   LINDA_EPB_LOC ( LINDA_EPB_CS_UC, LINDA_EPB_UC_CHANNEL, 0, (_reg) )
#define LINDA_EPB_UC_CTL   LINDA_EPB_UC_LOC ( 0 )
#define LINDA_EPB_UC_CTL_WRITE   1
#define LINDA_EPB_UC_CTL_READ   2
#define LINDA_EPB_UC_ADDR_LO   LINDA_EPB_UC_LOC ( 2 )
#define LINDA_EPB_UC_ADDR_HI   LINDA_EPB_UC_LOC ( 3 )
#define LINDA_EPB_UC_DATA   LINDA_EPB_UC_LOC ( 4 )
#define LINDA_EPB_UC_CHUNK_SIZE   64
#define LINDA_TRIM_DONE_MAX_WAIT_MS   1000
 Maximum time to wait for "trim done" signal, in ms.
#define LINDA_LINK_STATE_MAX_WAIT_US   20
 Maximum time to wait for link state changes, in us.

Enumerations

enum  linda_portcfg { LINDA_PORTCFG_5CTX = 0, LINDA_PORTCFG_9CTX = 1, LINDA_PORTCFG_17CTX = 2 }
 PortCfg values for different numbers of contexts. More...
enum  linda_eager_buffer_size {
  LINDA_EAGER_BUFFER_NONE = 0, LINDA_EAGER_BUFFER_2K = 1, LINDA_EAGER_BUFFER_4K = 2, LINDA_EAGER_BUFFER_8K = 3,
  LINDA_EAGER_BUFFER_16K = 4, LINDA_EAGER_BUFFER_32K = 5, LINDA_EAGER_BUFFER_64K = 6
}
 Eager buffer size encodings. More...
enum  linda_link_state {
  LINDA_LINK_STATE_DOWN = 0, LINDA_LINK_STATE_INIT = 1, LINDA_LINK_STATE_ARM = 2, LINDA_LINK_STATE_ACTIVE = 3,
  LINDA_LINK_STATE_ACT_DEFER = 4
}
 Linda link states. More...

Functions

 FILE_LICENCE (GPL2_OR_LATER_OR_UBDL)

Variables

uint8_t linda_ib_fw [8192]

Detailed Description

QLogic Linda Infiniband HCA.

Definition in file linda.h.


Define Documentation

Definition at line 36 of file linda.h.

#define LINDA_SENDBUFAVAIL_ALIGN   64

DMA alignment for send buffer availability.

Definition at line 85 of file linda.h.

Referenced by linda_init_send().

#define LINDA_BAR0_SIZE   0x400000

Linda memory BAR size.

Definition at line 124 of file linda.h.

Referenced by linda_probe().

#define LINDA_GPIO_SCL   0

Linda I2C SCL line GPIO number.

Definition at line 127 of file linda.h.

#define LINDA_GPIO_SDA   1

Linda I2C SDA line GPIO number.

Definition at line 130 of file linda.h.

#define LINDA_EEPROM_GUID_OFFSET   3

GUID offset within EEPROM.

Definition at line 133 of file linda.h.

Referenced by linda_read_eeprom().

#define LINDA_EEPROM_GUID_SIZE   8

GUID size within EEPROM.

Definition at line 136 of file linda.h.

#define LINDA_EEPROM_SERIAL_OFFSET   12

Board serial number offset within EEPROM.

Definition at line 139 of file linda.h.

Referenced by linda_read_eeprom().

#define LINDA_EEPROM_SERIAL_SIZE   12

Board serial number size within EEPROM.

Definition at line 142 of file linda.h.

Referenced by linda_read_eeprom().

#define LINDA_MAX_SEND_BUFS   32

Maximum number of send buffers used.

This is a policy decision. Must be less than or equal to the total number of send buffers supported by the hardware (128).

Definition at line 149 of file linda.h.

Referenced by linda_alloc_send_buf(), linda_create_send_wq(), linda_free_send_buf(), and linda_init_send().

#define LINDA_SEND_BUF_SIZE   4096

Linda send buffer size.

Definition at line 152 of file linda.h.

Referenced by linda_send_buffer_offset().

#define LINDA_NUM_CONTEXTS   5

Number of contexts (including kernel context)

This is a policy decision. Must be 5, 9 or 17.

Definition at line 158 of file linda.h.

Referenced by linda_alloc_ctx(), and linda_init_recv().

#define LINDA_EAGER_ARRAY_SIZE_5CTX_0   2048

PortCfg values for different numbers of contexts.

Definition at line 168 of file linda.h.

Referenced by linda_init_recv().

Definition at line 169 of file linda.h.

Referenced by linda_init_recv().

#define LINDA_EAGER_ARRAY_SIZE_9CTX_0   2048

Definition at line 170 of file linda.h.

Referenced by linda_init_recv().

Definition at line 171 of file linda.h.

Referenced by linda_init_recv().

#define LINDA_EAGER_ARRAY_SIZE_17CTX_0   2048

Definition at line 172 of file linda.h.

Referenced by linda_init_recv().

Definition at line 173 of file linda.h.

Referenced by linda_init_recv().

#define LINDA_EAGER_BUFFER_ALIGN   2048

Eager buffer required alignment.

Definition at line 176 of file linda.h.

Referenced by linda_post_recv().

#define LINDA_RECV_HEADER_COUNT   8

Number of RX headers per context.

This is a policy decision.

Definition at line 193 of file linda.h.

Referenced by linda_init_recv().

#define LINDA_RECV_HEADER_SIZE   96

Maximum size of each RX header.

This is a policy decision. Must be divisible by 4.

Definition at line 199 of file linda.h.

Referenced by linda_complete_recv(), linda_init_ib_serdes(), linda_init_recv(), and linda_poll_recv_wq().

Total size of an RX header ring.

Definition at line 202 of file linda.h.

Referenced by linda_create_recv_wq(), linda_destroy_recv_wq(), and linda_poll_recv_wq().

#define LINDA_RECV_HEADERS_ALIGN   64

RX header alignment.

Definition at line 206 of file linda.h.

Referenced by linda_create_recv_wq().

#define LINDA_RECV_PAYLOAD_SIZE   2048

RX payload size.

This is a policy decision. Must be a valid eager buffer size.

Definition at line 212 of file linda.h.

Referenced by linda_init_ib_serdes(), and linda_post_recv().

#define LINDA_QP_IDETH   0xdead0

QPN used for Infinipath Packets.

This is a policy decision. Must have bit 0 clear. Must not be a QPN that we will use.

Definition at line 219 of file linda.h.

Referenced by linda_init_recv().

Maximum time for wait for external parallel bus request, in us.

Definition at line 222 of file linda.h.

Referenced by linda_ib_epb_request().

#define LINDA_EPB_XACT_MAX_WAIT_US   500

Maximum time for wait for external parallel bus transaction, in us.

Definition at line 225 of file linda.h.

Referenced by linda_ib_epb_wait().

#define LINDA_EPB_CS_SERDES   1

Linda external parallel bus chip selects.

Definition at line 228 of file linda.h.

Referenced by linda_set_serdes_param().

#define LINDA_EPB_CS_UC   2

Definition at line 229 of file linda.h.

#define LINDA_EPB_WRITE   0

Linda external parallel bus read/write operations.

Definition at line 232 of file linda.h.

Referenced by linda_ib_epb_write().

#define LINDA_EPB_READ   1

Definition at line 233 of file linda.h.

Referenced by linda_ib_epb_read().

#define LINDA_EPB_ADDRESS (   _channel,
  _element,
  _reg 
)    ( (_element) | ( (_channel) << 4 ) | ( (_reg) << 9 ) )

Linda external parallel bus register addresses.

Definition at line 236 of file linda.h.

#define LINDA_EPB_ADDRESS_CHANNEL (   _address)    ( ( (_address) >> 4 ) & 0x1f )

Definition at line 238 of file linda.h.

Referenced by linda_set_serdes_param().

#define LINDA_EPB_ADDRESS_ELEMENT (   _address)    ( ( (_address) >> 0 ) & 0x0f )

Definition at line 239 of file linda.h.

Referenced by linda_set_serdes_param().

#define LINDA_EPB_ADDRESS_REG (   _address)    ( ( (_address) >> 9 ) & 0x3f )

Definition at line 240 of file linda.h.

Referenced by linda_set_serdes_param().

#define LINDA_EPB_LOC (   _cs,
  _channel,
  _element,
  _reg 
)    ( ( (_cs) << 16 ) | LINDA_EPB_ADDRESS ( _channel, _element, _reg ) )

Linda external parallel bus locations.

The location is used by the driver to encode both the chip select and the EPB address.

Definition at line 247 of file linda.h.

Referenced by linda_ib_epb_mod_reg().

#define LINDA_EPB_LOC_ADDRESS (   _loc)    ( (_loc) & 0xffff )

Definition at line 249 of file linda.h.

Referenced by linda_ib_epb_read(), and linda_ib_epb_write().

#define LINDA_EPB_LOC_CS (   _loc)    ( (_loc) >> 16 )

Definition at line 250 of file linda.h.

Referenced by linda_ib_epb_read(), and linda_ib_epb_write().

#define LINDA_EPB_UC_CHANNEL   6

Linda external parallel bus microcontroller register addresses.

Definition at line 253 of file linda.h.

#define LINDA_EPB_UC_LOC (   _reg)    LINDA_EPB_LOC ( LINDA_EPB_CS_UC, LINDA_EPB_UC_CHANNEL, 0, (_reg) )

Definition at line 254 of file linda.h.

#define LINDA_EPB_UC_CTL   LINDA_EPB_UC_LOC ( 0 )

Definition at line 256 of file linda.h.

Referenced by linda_ib_epb_ram_xfer().

#define LINDA_EPB_UC_CTL_WRITE   1

Definition at line 257 of file linda.h.

Referenced by linda_ib_epb_ram_xfer().

#define LINDA_EPB_UC_CTL_READ   2

Definition at line 258 of file linda.h.

Referenced by linda_ib_epb_ram_xfer().

Definition at line 259 of file linda.h.

Referenced by linda_ib_epb_ram_xfer().

Definition at line 260 of file linda.h.

Referenced by linda_ib_epb_ram_xfer().

#define LINDA_EPB_UC_DATA   LINDA_EPB_UC_LOC ( 4 )

Definition at line 261 of file linda.h.

Referenced by linda_ib_epb_ram_xfer().

#define LINDA_EPB_UC_CHUNK_SIZE   64

Definition at line 262 of file linda.h.

Referenced by linda_ib_epb_ram_xfer(), and linda_verify_uc_ram().

#define LINDA_TRIM_DONE_MAX_WAIT_MS   1000

Maximum time to wait for "trim done" signal, in ms.

Definition at line 267 of file linda.h.

Referenced by linda_trim_ib().

Maximum time to wait for link state changes, in us.

Definition at line 279 of file linda.h.

Referenced by linda_link_state_check().


Enumeration Type Documentation

PortCfg values for different numbers of contexts.

Enumerator:
LINDA_PORTCFG_5CTX 
LINDA_PORTCFG_9CTX 
LINDA_PORTCFG_17CTX 

Definition at line 161 of file linda.h.

Eager buffer size encodings.

Enumerator:
LINDA_EAGER_BUFFER_NONE 
LINDA_EAGER_BUFFER_2K 
LINDA_EAGER_BUFFER_4K 
LINDA_EAGER_BUFFER_8K 
LINDA_EAGER_BUFFER_16K 
LINDA_EAGER_BUFFER_32K 
LINDA_EAGER_BUFFER_64K 

Definition at line 179 of file linda.h.

Linda link states.

Enumerator:
LINDA_LINK_STATE_DOWN 
LINDA_LINK_STATE_INIT 
LINDA_LINK_STATE_ARM 
LINDA_LINK_STATE_ACTIVE 
LINDA_LINK_STATE_ACT_DEFER 

Definition at line 270 of file linda.h.


Function Documentation

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL  )

Variable Documentation

Definition at line 44 of file linda_fw.c.

Referenced by linda_program_uc_ram(), and linda_verify_uc_ram().