/* Enum for defining port types */ enum fman_port_type {
FMAN_PORT_TYPE_TX = 0, /* TX Port */
FMAN_PORT_TYPE_RX, /* RX Port */
};
struct fman_rev_info {
u8 major; /* Major revision */
u8 minor; /* Minor revision */
};
enum fman_exceptions {
FMAN_EX_DMA_BUS_ERROR = 0, /* DMA bus error. */
FMAN_EX_DMA_READ_ECC, /* Read Buffer ECC error */
FMAN_EX_DMA_SYSTEM_WRITE_ECC, /* Write Buffer ECC err on sys side */
FMAN_EX_DMA_FM_WRITE_ECC, /* Write Buffer ECC error on FM side */
FMAN_EX_DMA_SINGLE_PORT_ECC, /* Single Port ECC error on FM side */
FMAN_EX_FPM_STALL_ON_TASKS, /* Stall of tasks on FPM */
FMAN_EX_FPM_SINGLE_ECC, /* Single ECC on FPM. */
FMAN_EX_FPM_DOUBLE_ECC, /* Double ECC error on FPM ram access */
FMAN_EX_QMI_SINGLE_ECC, /* Single ECC on QMI. */
FMAN_EX_QMI_DOUBLE_ECC, /* Double bit ECC occurred on QMI */
FMAN_EX_QMI_DEQ_FROM_UNKNOWN_PORTID,/* DeQ from unknown port id */
FMAN_EX_BMI_LIST_RAM_ECC, /* Linked List RAM ECC error */
FMAN_EX_BMI_STORAGE_PROFILE_ECC,/* storage profile */
FMAN_EX_BMI_STATISTICS_RAM_ECC,/* Statistics RAM ECC Err Enable */
FMAN_EX_BMI_DISPATCH_RAM_ECC, /* Dispatch RAM ECC Error Enable */
FMAN_EX_IRAM_ECC, /* Double bit ECC occurred on IRAM */
FMAN_EX_MURAM_ECC /* Double bit ECC occurred on MURAM */
};
/* Parse results memory layout */ struct fman_prs_result {
u8 lpid; /* Logical port id */
u8 shimr; /* Shim header result */
__be16 l2r; /* Layer 2 result */
__be16 l3r; /* Layer 3 result */
u8 l4r; /* Layer 4 result */
u8 cplan; /* Classification plan id */
__be16 nxthdr; /* Next Header */
__be16 cksum; /* Running-sum */ /* Flags&fragment-offset field of the last IP-header */
__be16 flags_frag_off; /* Routing type field of a IPV6 routing extension header */
u8 route_type; /* Routing Extension Header Present; last bit is IP valid */
u8 rhp_ip_valid;
u8 shim_off[2]; /* Shim offset */
u8 ip_pid_off; /* IP PID (last IP-proto) offset */
u8 eth_off; /* ETH offset */
u8 llc_snap_off; /* LLC_SNAP offset */
u8 vlan_off[2]; /* VLAN offset */
u8 etype_off; /* ETYPE offset */
u8 pppoe_off; /* PPP offset */
u8 mpls_off[2]; /* MPLS offset */
u8 ip_off[2]; /* IP offset */
u8 gre_off; /* GRE offset */
u8 l4_off; /* Layer 4 offset */
u8 nxthdr_off; /* Parser end point */
};
/* A structure for defining buffer prefix area content. */ struct fman_buffer_prefix_content { /* Number of bytes to be left at the beginning of the external * buffer; Note that the private-area will start from the base * of the buffer address.
*/
u16 priv_data_size; /* true to pass the parse result to/from the FM; * User may use FM_PORT_GetBufferPrsResult() in * order to get the parser-result from a buffer.
*/ bool pass_prs_result; /* true to pass the timeStamp to/from the FM User */ bool pass_time_stamp; /* true to pass the KG hash result to/from the FM User may * use FM_PORT_GetBufferHashResult() in order to get the * parser-result from a buffer.
*/ bool pass_hash_result; /* Add all other Internal-Context information: AD, * hash-result, key, etc.
*/
u16 data_align;
};
/* A structure of information about each of the external * buffer pools used by a port or storage-profile.
*/ struct fman_ext_pool_params {
u8 id; /* External buffer pool id */
u16 size; /* External buffer pool buffer size */
};
/* A structure for informing the driver about the external * buffer pools allocated in the BM and used by a port or a * storage-profile.
*/ struct fman_ext_pools {
u8 num_of_pools_used; /* Number of pools use by this port */ struct fman_ext_pool_params ext_buf_pool[FMAN_PORT_MAX_EXT_POOLS_NUM]; /* Parameters for each port */
};
/* A structure for defining BM pool depletion criteria */ struct fman_buf_pool_depletion { /* select mode in which pause frames will be sent after a * number of pools (all together!) are depleted
*/ bool pools_grp_mode_enable; /* the number of depleted pools that will invoke pause * frames transmission.
*/
u8 num_of_pools; /* For each pool, true if it should be considered for * depletion (Note - this pool must be used by this port!).
*/ bool pools_to_consider[BM_MAX_NUM_OF_POOLS]; /* select mode in which pause frames will be sent * after a single-pool is depleted;
*/ bool single_pool_mode_enable; /* For each pool, true if it should be considered * for depletion (Note - this pool must be used by this port!)
*/ bool pools_to_consider_for_single_mode[BM_MAX_NUM_OF_POOLS];
};
/** fman_exceptions_cb * fman - Pointer to FMan * exception - The exception. * * Exceptions user callback routine, will be called upon an exception * passing the exception identification. * * Return: irq status
*/ typedef irqreturn_t (fman_exceptions_cb)(struct fman *fman, enum fman_exceptions exception); /** fman_bus_error_cb * fman - Pointer to FMan * port_id - Port id * addr - Address that caused the error * tnum - Owner of error * liodn - Logical IO device number * * Bus error user callback routine, will be called upon bus error, * passing parameters describing the errors and the owner. * * Return: IRQ status
*/ typedef irqreturn_t (fman_bus_error_cb)(struct fman *fman, u8 port_id,
u64 addr, u8 tnum, u16 liodn);
/* Structure that holds information received from device tree */ struct fman_dts_params { void __iomem *base_addr; /* FMan virtual address */ struct resource *res; /* FMan memory resource */
u8 id; /* FMan ID */
int err_irq; /* FMan Error IRQ */
u16 clk_freq; /* FMan clock freq (In Mhz) */
u32 qman_channel_base; /* QMan channels base */
u32 num_of_qman_channels; /* Number of QMan channels */
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.