net: wwan: iosm: transport layer support for fw flashing/cd
Subsystems (4)
PATCH v2 4/6 net: wwan: iosm: transport layer support for fw flashing/cd
Implements transport layer protocol for fw flashing/coredump collection.
Signed-off-by M Chetan Kumar <[email protected]>
---
v2: Removed "stdbool.h" inclusion in iosm_ipc_imem.h to fix
linux-net build error.
--- drivers/net/wwan/iosm/iosm_ipc_chnl_cfg.c | 6 +- drivers/net/wwan/iosm/iosm_ipc_chnl_cfg.h | 1 + drivers/net/wwan/iosm/iosm_ipc_imem.c | 103 +++++-- drivers/net/wwan/iosm/iosm_ipc_imem.h | 18 +- drivers/net/wwan/iosm/iosm_ipc_imem_ops.c | 317 ++++++++++++++++++++++ drivers/net/wwan/iosm/iosm_ipc_imem_ops.h | 49 +++- 6 files changed, 464 insertions(+), 30 deletions(-)
drivers/net/wwan/iosm/iosm_ipc_chnl_cfg.c +5 -1
@@ -8,7 +8,7 @@#include "iosm_ipc_chnl_cfg.h" /* Max. sizes of a downlink buffers */ -#define IPC_MEM_MAX_DL_FLASH_BUF_SIZE (16 * 1024) +#define IPC_MEM_MAX_DL_FLASH_BUF_SIZE (64 * 1024)#define IPC_MEM_MAX_DL_LOOPBACK_SIZE (1 * 1024 * 1024)#define IPC_MEM_MAX_DL_AT_BUF_SIZE 2048#define IPC_MEM_MAX_DL_RPC_BUF_SIZE (32 * 1024)
@@ -60,6 +60,10 @@ static struct ipc_chnl_cfg modem_cfg[] = { {IPC_MEM_CTRL_CHL_ID_6 ,IPC_MEM_PIPE_12 ,IPC_MEM_PIPE_13 ,IPC_MEM_MAX_TDS_MBIM ,IPC_MEM_MAX_TDS_MBIM , IPC_MEM_MAX_DL_MBIM_BUF_SIZE, WWAN_PORT_MBIM }, +/* Flash Channel/Coredump Channel */ + { IPC_MEM_CTRL_CHL_ID_7, IPC_MEM_PIPE_0, IPC_MEM_PIPE_1, +IPC_MEM_MAX_TDS_FLASH_UL ,IPC_MEM_MAX_TDS_FLASH_DL , + IPC_MEM_MAX_DL_FLASH_BUF_SIZE, WWAN_PORT_UNKNOWN }, };int ipc_chnl_cfg_get (struct ipc_chnl_cfg *chnl_cfg,int index)
drivers/net/wwan/iosm/iosm_ipc_chnl_cfg.h +1 -0
@@ -23,6 +23,7 @@ enum ipc_channel_id {IPC_MEM_CTRL_CHL_ID_4 ,IPC_MEM_CTRL_CHL_ID_5 ,IPC_MEM_CTRL_CHL_ID_6 , + IPC_MEM_CTRL_CHL_ID_7, };/**
drivers/net/wwan/iosm/iosm_ipc_imem.c +78 -25
162 lines not on this page · raw message
drivers/net/wwan/iosm/iosm_ipc_imem.h +15 -3
@@ -69,7 +69,7 @@ struct ipc_chnl_cfg;#define IMEM_IRQ_DONT_CARE (-1) -#define IPC_MEM_MAX_CHANNELS 7 +#define IPC_MEM_MAX_CHANNELS 8#define IPC_MEM_MUX_IP_SESSION_ENTRIES 8
@@ -98,6 +98,7 @@ struct ipc_chnl_cfg;#define IPC_MEM_DL_ETH_OFFSET 16#define IPC_CB (skb) ((struct ipc_skb_cb *)((skb)->cb)) +#define IOSM_CHIP_INFO_SIZE_MAX 100#define FULLY_FUNCTIONAL 0
@@ -304,9 +305,9 @@ enum ipc_phase {* @ipc_port: IPC PORT data structure pointer * @pcie: IPC PCIe * @dev: Pointer to device structure -* @flash_channel_id: Reserved channel id for flashing to RAM. * @ipc_requested_state: Expected IPC state on CP. * @channels: Channel list with UL/DL pipe pairs. +* @ipc_devlink: IPC Devlink data structure pointer * @ipc_status: local ipc_status * @nr_of_channels: number of configured channels * @startup_timer: startup timer for NAND support.
@@ -349,9 +350,9 @@ struct iosm_imem {struct iosm_cdev *ipc_port[IPC_MEM_MAX_CHANNELS ];struct iosm_pcie *pcie;struct device *dev; -int flash_channel_id;enum ipc_mem_device_ipc_state ipc_requested_state;struct ipc_mem_channel channels[IPC_MEM_MAX_CHANNELS ]; +struct iosm_devlink *ipc_devlink;u32 ipc_status;u32 nr_of_channels;struct hrtimer startup_timer;
@@ -575,4 +576,15 @@ void ipc_imem_ipc_init_check(struct iosm_imem *ipc_imem);*/ void ipc_imem_channel_init (struct iosm_imem *ipc_imem,enum ipc_ctype ctype,struct ipc_chnl_cfg chnl_cfg,u32 irq_moderation); + +/** +* ipc_imem_devlink_trigger_chip_info - Inform devlink that the chip +* information are available if the +* flashing to RAM interworking shall be +* executed. +* @ipc_imem: Pointer to imem structure +* +* Returns: 0 on success, -1 on failure +*/ +int ipc_imem_devlink_trigger_chip_info (struct iosm_imem *ipc_imem);#endif
drivers/net/wwan/iosm/iosm_ipc_imem_ops.c +317 -0
326 lines not on this page · raw message
drivers/net/wwan/iosm/iosm_ipc_imem_ops.h +48 -1
59 lines not on this page · raw message
Signature · 1 line
2.25.1