drivers/net/wwan/iosm/iosm_ipc_devlink.h

Source file repositories/reference/linux-study-clean/drivers/net/wwan/iosm/iosm_ipc_devlink.h

File Facts

System
Linux kernel
Corpus path
drivers/net/wwan/iosm/iosm_ipc_devlink.h
Extension
.h
Size
6109 bytes
Lines
206
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 iosm_devlink_sio {
	struct sk_buff_head rx_list;
	struct completion read_sem;
	int channel_id;
	struct ipc_mem_channel *channel;
	u32 devlink_read_pend;
};

/**
 * struct iosm_flash_params - List of flash params required for flashing
 * @erase_full_flash:   To set the flashing mode
 *                      erase_full_flash = 1; full erase
 *                      erase_full_flash = 0; no erase
 * @erase_full_flash_done: Flag to check if it is a full erase
 */
struct iosm_flash_params {
	u8 erase_full_flash;
	u8 erase_full_flash_done;
};

/**
 * struct iosm_devlink_image - Structure with Fls file header info
 * @magic_header:	Header of the firmware image
 * @image_type:		Firmware image type
 * @region_address:	Address of the region to be flashed
 * @download_region:	Field to identify if it is a region
 * @last_region:	Field to identify if it is last region
 * @reserved:		Reserved field
 */
struct iosm_devlink_image {
	char magic_header[IOSM_DEVLINK_MAGIC_HEADER_LEN];
	char image_type[IOSM_DEVLINK_IMG_TYPE];
	__le32 region_address;
	u8 download_region;
	u8 last_region;
	u8 reserved[IOSM_DEVLINK_RESERVED];
} __packed;

/**
 * struct iosm_ebl_ctx_data -  EBL ctx data used during flashing
 * @ebl_sw_info_version: SWID version info obtained from EBL
 * @m_ebl_resp:         Buffer used to read and write the ebl data
 */
struct iosm_ebl_ctx_data {
	u8 ebl_sw_info_version;
	u8 m_ebl_resp[IOSM_EBL_RSP_SIZE];
};

/**
 * struct iosm_coredump_file_info -  Coredump file info
 * @filename:		Name of coredump file
 * @default_size:	Default size of coredump file
 * @actual_size:	Actual size of coredump file
 * @entry:		Index of the coredump file
 */
struct iosm_coredump_file_info {
	char filename[IOSM_MAX_FILENAME_LEN];
	u32 default_size;
	u32 actual_size;
	u32 entry;
};

/**
 * struct iosm_devlink - IOSM Devlink structure
 * @devlink_sio:        SIO instance for read/write functionality
 * @pcie:               Pointer to PCIe component
 * @dev:                Pointer to device struct
 * @devlink_ctx:	Pointer to devlink context
 * @param:		Params required for flashing
 * @ebl_ctx:		Data to be read and written to Modem
 * @cd_file_info:	coredump file info
 * @iosm_devlink_mdm_coredump:	region ops for coredump collection
 * @cd_regions:		coredump regions
 */
struct iosm_devlink {
	struct iosm_devlink_sio devlink_sio;
	struct iosm_pcie *pcie;
	struct device *dev;
	struct devlink *devlink_ctx;
	struct iosm_flash_params param;
	struct iosm_ebl_ctx_data ebl_ctx;
	struct iosm_coredump_file_info *cd_file_info;
	struct devlink_region_ops iosm_devlink_mdm_coredump[IOSM_NOF_CD_REGION];
	struct devlink_region *cd_regions[IOSM_NOF_CD_REGION];
};

/**
 * union iosm_rpsi_param_u - RPSI cmd param for CRC calculation
 * @word:	Words member used in CRC calculation
 * @dword:	Actual data

Annotation

Implementation Notes