drivers/net/ethernet/freescale/fman/fman_port.h

Source file repositories/reference/linux-study-clean/drivers/net/ethernet/freescale/fman/fman_port.h

File Facts

System
Linux kernel
Corpus path
drivers/net/ethernet/freescale/fman/fman_port.h
Extension
.h
Size
4988 bytes
Lines
136
Domain
Driver Families
Bucket
drivers/net
Inferred role
Driver Families: implementation source
Status
source implementation candidate

Why This File Exists

Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.

Dependency Surface

Detected Declarations

Annotated Snippet

struct fman_port_rx_params {
	u32 err_fqid;			/* Error Queue Id. */
	u32 dflt_fqid;			/* Default Queue Id. */
	u32 pcd_base_fqid;		/* PCD base Queue Id. */
	u32 pcd_fqs_count;		/* Number of PCD FQs. */

	/* Which external buffer pools are used
	 * (up to FMAN_PORT_MAX_EXT_POOLS_NUM), and their sizes.
	 */
	struct fman_ext_pools ext_buf_pools;
};

/* A structure for additional non-Rx port parameters */
struct fman_port_non_rx_params {
	/* Error Queue Id. */
	u32 err_fqid;
	/* For Tx - Default Confirmation queue, 0 means no Tx confirmation
	 * for processed frames. For OP port - default Rx queue.
	 */
	u32 dflt_fqid;
};

/* A union for additional parameters depending on port type */
union fman_port_specific_params {
	/* Rx port parameters structure */
	struct fman_port_rx_params rx_params;
	/* Non-Rx port parameters structure */
	struct fman_port_non_rx_params non_rx_params;
};

/* A structure representing FM initialization parameters */
struct fman_port_params {
	/* Virtual Address of memory mapped FM Port registers. */
	void *fm;
	union fman_port_specific_params specific_params;
	/* Additional parameters depending on port type. */
};

int fman_port_config(struct fman_port *port, struct fman_port_params *params);

void fman_port_use_kg_hash(struct fman_port *port, bool enable);

int fman_port_init(struct fman_port *port);

int fman_port_cfg_buf_prefix_content(struct fman_port *port,
				     struct fman_buffer_prefix_content
				     *buffer_prefix_content);

int fman_port_disable(struct fman_port *port);

int fman_port_enable(struct fman_port *port);

u32 fman_port_get_qman_channel_id(struct fman_port *port);

int fman_port_get_hash_result_offset(struct fman_port *port, u32 *offset);

int fman_port_get_tstamp(struct fman_port *port, const void *data, u64 *tstamp);

struct fman_port *fman_port_bind(struct device *dev);

struct device *fman_port_get_device(struct fman_port *port);

#endif /* __FMAN_PORT_H */

Annotation

Implementation Notes