Quellcode durchsuchen

msm: camera: icp: Introduce processor boot/shutdown sequence

Abstract the firmware loading and processor boot/shutdown
mechanisms. The device interface is best suited to dealing
with the sequence.

Note this also cleans up some descriptions in struct cam_icp_hw_mgr
that were left over when the debugfs entries were renamed.

CRs-Fixed: 2842016
Change-Id: I1574c799a2b023c02137b32572f8284fe7523188
Signed-off-by: Karthik Anantha Ram <[email protected]>
Karthik Anantha Ram vor 4 Jahren
Ursprung
Commit
f7c65899fc

+ 87 - 38
drivers/cam_icp/icp_hw/a5_hw/a5_core.c

@@ -471,6 +471,86 @@ static int cam_a5_power_collapse(struct cam_hw_info *a5_info)
 	return 0;
 }
 
+static void prepare_boot(struct cam_hw_info *a5_dev,
+			struct cam_icp_boot_args *args)
+{
+	struct cam_a5_device_core_info *core_info = a5_dev->core_info;
+	unsigned long flags;
+
+	core_info->fw_buf = args->firmware.iova;
+	core_info->fw_kva_addr = args->firmware.kva;
+	core_info->fw_buf_len = args->firmware.len;
+
+	spin_lock_irqsave(&a5_dev->hw_lock, flags);
+	core_info->irq_cb.data = args->irq_cb.data;
+	core_info->irq_cb.cb = args->irq_cb.cb;
+	spin_unlock_irqrestore(&a5_dev->hw_lock, flags);
+}
+
+static void prepare_shutdown(struct cam_hw_info *a5_dev)
+{
+	struct cam_a5_device_core_info *core_info = a5_dev->core_info;
+	unsigned long flags;
+
+	core_info->fw_buf = 0;
+	core_info->fw_kva_addr = 0;
+	core_info->fw_buf_len = 0;
+
+	spin_lock_irqsave(&a5_dev->hw_lock, flags);
+	core_info->irq_cb.data = NULL;
+	core_info->irq_cb.cb = NULL;
+	spin_unlock_irqrestore(&a5_dev->hw_lock, flags);
+}
+
+static int cam_a5_boot(struct cam_hw_info *a5_dev,
+		struct cam_icp_boot_args *args, size_t arg_size)
+{
+	int rc;
+
+	if (!a5_dev || !args) {
+		CAM_ERR(CAM_ICP,
+			"invalid args: a5_dev=%pK args=%pK",
+			a5_dev, args);
+		return -EINVAL;
+	}
+
+	if (arg_size != sizeof(struct cam_icp_boot_args)) {
+		CAM_ERR(CAM_ICP, "invalid boot args size");
+		return -EINVAL;
+	}
+
+	prepare_boot(a5_dev, args);
+
+	rc = cam_a5_download_fw(a5_dev);
+	if (rc) {
+		CAM_ERR(CAM_ICP, "firmware download failed rc=%d", rc);
+		goto err;
+	}
+
+	rc = cam_a5_power_resume(a5_dev, args->debug_enabled);
+	if (rc) {
+		CAM_ERR(CAM_ICP, "A5 boot failed rc=%d", rc);
+		goto err;
+	}
+
+	return 0;
+err:
+	prepare_shutdown(a5_dev);
+	return rc;
+}
+
+static int cam_a5_shutdown(struct cam_hw_info *a5_dev)
+{
+	if (!a5_dev) {
+		CAM_ERR(CAM_ICP, "invalid A5 device info");
+		return -EINVAL;
+	}
+
+	prepare_shutdown(a5_dev);
+	cam_a5_power_collapse(a5_dev);
+	return 0;
+}
+
 irqreturn_t cam_a5_irq(int irq_num, void *data)
 {
 	struct cam_hw_info *a5_dev = data;
@@ -509,9 +589,8 @@ irqreturn_t cam_a5_irq(int irq_num, void *data)
 	}
 
 	spin_lock(&a5_dev->hw_lock);
-	if (core_info->irq_cb.icp_hw_mgr_cb)
-		core_info->irq_cb.icp_hw_mgr_cb(irq_status,
-					core_info->irq_cb.data);
+	if (core_info->irq_cb.cb)
+		core_info->irq_cb.cb(core_info->irq_cb.data, irq_status);
 	spin_unlock(&a5_dev->hw_lock);
 
 	return IRQ_HANDLED;
@@ -568,7 +647,6 @@ int cam_a5_process_cmd(void *device_priv, uint32_t cmd_type,
 	struct cam_a5_device_core_info *core_info = NULL;
 	struct cam_a5_device_hw_info *hw_info = NULL;
 	struct a5_soc_info *a5_soc = NULL;
-	unsigned long flags;
 	uint32_t ubwc_ipe_cfg[ICP_UBWC_MAX] = {0};
 	uint32_t ubwc_bps_cfg[ICP_UBWC_MAX] = {0};
 	uint32_t index = 0;
@@ -589,8 +667,11 @@ int cam_a5_process_cmd(void *device_priv, uint32_t cmd_type,
 	hw_info = core_info->a5_hw_info;
 
 	switch (cmd_type) {
-	case CAM_ICP_CMD_FW_DOWNLOAD:
-		rc = cam_a5_download_fw(device_priv);
+	case CAM_ICP_CMD_PROC_SHUTDOWN:
+		rc = cam_a5_shutdown(device_priv);
+		break;
+	case CAM_ICP_CMD_PROC_BOOT:
+		rc = cam_a5_boot(device_priv, cmd_args, arg_size);
 		break;
 	case CAM_ICP_CMD_POWER_COLLAPSE:
 		rc = cam_a5_power_collapse(a5_dev);
@@ -598,38 +679,6 @@ int cam_a5_process_cmd(void *device_priv, uint32_t cmd_type,
 	case CAM_ICP_CMD_POWER_RESUME:
 		rc = cam_a5_power_resume(a5_dev, *((bool *)cmd_args));
 		break;
-	case CAM_ICP_CMD_SET_FW_BUF: {
-		struct cam_icp_a5_set_fw_buf_info *fw_buf_info = cmd_args;
-
-		if (!cmd_args) {
-			CAM_ERR(CAM_ICP, "cmd args NULL");
-			return -EINVAL;
-		}
-
-		core_info->fw_buf = fw_buf_info->iova;
-		core_info->fw_kva_addr = fw_buf_info->kva;
-		core_info->fw_buf_len = fw_buf_info->len;
-
-		CAM_DBG(CAM_ICP, "fw buf info = %x %llx %lld",
-			core_info->fw_buf, core_info->fw_kva_addr,
-			core_info->fw_buf_len);
-		break;
-	}
-	case CAM_ICP_SET_IRQ_CB: {
-		struct cam_icp_set_irq_cb *irq_cb = cmd_args;
-
-		if (!cmd_args) {
-			CAM_ERR(CAM_ICP, "cmd args NULL");
-			return -EINVAL;
-		}
-
-		spin_lock_irqsave(&a5_dev->hw_lock, flags);
-		core_info->irq_cb.icp_hw_mgr_cb = irq_cb->icp_hw_mgr_cb;
-		core_info->irq_cb.data = irq_cb->data;
-		spin_unlock_irqrestore(&a5_dev->hw_lock, flags);
-		break;
-	}
-
 	case CAM_ICP_SEND_INIT:
 		hfi_send_system_cmd(HFI_CMD_SYS_INIT, 0, 0);
 		break;

+ 1 - 1
drivers/cam_icp/icp_hw/a5_hw/a5_core.h

@@ -67,7 +67,7 @@ struct cam_a5_device_core_info {
 	uint64_t fw_buf_len;
 	struct cam_icp_a5_query_cap query_cap;
 	struct cam_icp_a5_acquire_dev a5_acquire[8];
-	struct cam_icp_set_irq_cb irq_cb;
+	struct cam_icp_irq_cb irq_cb;
 	uint32_t cpas_handle;
 	bool cpas_start;
 };

+ 117 - 85
drivers/cam_icp/icp_hw/icp_hw_mgr/cam_icp_hw_mgr.c

@@ -2663,9 +2663,9 @@ static int32_t cam_icp_mgr_process_msg(void *priv, void *data)
 	return rc;
 }
 
-int32_t cam_icp_hw_mgr_cb(uint32_t irq_status, void *data)
+static int cam_icp_hw_mgr_cb(void *data, uint32_t irq_status)
 {
-	int32_t rc = 0;
+	int rc = 0;
 	unsigned long flags;
 	struct cam_icp_hw_mgr *hw_mgr = data;
 	struct crm_workq_task *task;
@@ -3069,14 +3069,19 @@ static int cam_icp_mgr_hw_close_k(void *hw_priv, void *hw_close_args)
 static int cam_icp_mgr_proc_resume(struct cam_icp_hw_mgr *hw_mgr)
 {
 	struct cam_hw_intf *icp_dev_intf = hw_mgr->icp_dev_intf;
+	int rc;
 
 	if (!icp_dev_intf)
 		return -EINVAL;
 
-	return icp_dev_intf->hw_ops.process_cmd(icp_dev_intf->hw_priv,
-						CAM_ICP_CMD_POWER_RESUME,
-						&hw_mgr->icp_jtag_debug,
-						sizeof(hw_mgr->icp_jtag_debug));
+	rc = icp_dev_intf->hw_ops.process_cmd(icp_dev_intf->hw_priv,
+					CAM_ICP_CMD_POWER_RESUME,
+					&hw_mgr->icp_jtag_debug,
+					sizeof(hw_mgr->icp_jtag_debug));
+	if (!rc)
+		hw_mgr->icp_resumed = true;
+
+	return rc;
 }
 
 static void cam_icp_mgr_proc_suspend(struct cam_icp_hw_mgr *hw_mgr)
@@ -3089,6 +3094,8 @@ static void cam_icp_mgr_proc_suspend(struct cam_icp_hw_mgr *hw_mgr)
 	icp_dev_intf->hw_ops.process_cmd(icp_dev_intf->hw_priv,
 					CAM_ICP_CMD_POWER_COLLAPSE,
 					NULL, 0);
+
+	hw_mgr->icp_resumed = false;
 }
 
 static int __power_collapse(struct cam_icp_hw_mgr *hw_mgr)
@@ -3128,6 +3135,96 @@ static int cam_icp_mgr_icp_power_collapse(struct cam_icp_hw_mgr *hw_mgr)
 	return rc;
 }
 
+static int cam_icp_mgr_proc_boot(struct cam_icp_hw_mgr *hw_mgr)
+{
+	struct cam_hw_intf *icp_dev_intf = hw_mgr->icp_dev_intf;
+	struct cam_icp_boot_args args;
+	int rc;
+
+	if (!icp_dev_intf) {
+		CAM_ERR(CAM_ICP, "invalid ICP device interface");
+		return -EINVAL;
+	}
+
+	args.firmware.iova = hw_mgr->hfi_mem.fw_buf.iova;
+	args.firmware.kva = hw_mgr->hfi_mem.fw_buf.kva;
+	args.firmware.len = hw_mgr->hfi_mem.fw_buf.len;
+
+	args.irq_cb.data = hw_mgr;
+	args.irq_cb.cb = cam_icp_hw_mgr_cb;
+
+	args.debug_enabled = hw_mgr->icp_jtag_debug;
+
+	rc = icp_dev_intf->hw_ops.process_cmd(
+			icp_dev_intf->hw_priv,
+			CAM_ICP_CMD_PROC_BOOT,
+			&args, sizeof(args));
+	if (!rc)
+		hw_mgr->icp_resumed = true;
+	else
+		CAM_ERR(CAM_ICP, "ICP processor boot failed rc=%d", rc);
+
+	return rc;
+}
+
+static int __resume_and_idle(struct cam_icp_hw_mgr *hw_mgr)
+{
+	struct cam_hw_intf *icp_dev_intf = hw_mgr->icp_dev_intf;
+	int rc;
+
+	rc = icp_dev_intf->hw_ops.init(icp_dev_intf->hw_priv, NULL, 0);
+	if (rc) {
+		CAM_ERR(CAM_ICP, "icp hw init failed rc=%d", rc);
+		return rc;
+	}
+
+	rc = cam_icp_mgr_proc_resume(hw_mgr);
+	if (rc) {
+		CAM_ERR(CAM_ICP, "icp resume failed rc=%d", rc);
+		goto out_deinit;
+	}
+
+	if (hw_mgr->icp_pc_flag) {
+		rc = cam_icp_mgr_send_pc_prep(hw_mgr);
+		if (rc) {
+			CAM_ERR(CAM_ICP,
+				"send power collapse prep failed rc=%d",
+				rc);
+			goto out_collapse;
+		}
+	}
+
+	return 0;
+
+out_collapse:
+	cam_icp_mgr_proc_suspend(hw_mgr);
+out_deinit:
+	icp_dev_intf->hw_ops.deinit(icp_dev_intf->hw_priv, NULL, 0);
+	return rc;
+}
+
+static void cam_icp_mgr_proc_shutdown(struct cam_icp_hw_mgr *hw_mgr)
+{
+	struct cam_hw_intf *icp_dev_intf = hw_mgr->icp_dev_intf;
+
+	if (!icp_dev_intf) {
+		CAM_ERR(CAM_ICP, "invalid ICP device interface");
+		return;
+	}
+
+	if (!hw_mgr->icp_resumed && __resume_and_idle(hw_mgr))
+		return;
+
+	icp_dev_intf->hw_ops.process_cmd(
+			icp_dev_intf->hw_priv,
+			CAM_ICP_CMD_PROC_SHUTDOWN,
+			NULL, 0);
+
+	icp_dev_intf->hw_ops.deinit(icp_dev_intf->hw_priv, NULL, 0);
+
+	hw_mgr->icp_resumed = false;
+}
+
 static int cam_icp_mgr_hfi_resume(struct cam_icp_hw_mgr *hw_mgr)
 {
 	struct hfi_mem_info hfi_mem;
@@ -3481,12 +3578,10 @@ static int cam_icp_mgr_hw_close(void *hw_priv, void *hw_close_args)
 {
 	struct cam_icp_hw_mgr *hw_mgr = hw_priv;
 	struct cam_hw_intf *icp_dev_intf = NULL;
-	struct cam_icp_set_irq_cb irq_cb;
-	struct cam_icp_a5_set_fw_buf_info fw_buf_info;
 	int rc = 0;
 
 	CAM_DBG(CAM_ICP, "E");
-	if (hw_mgr->fw_download == false) {
+	if (!hw_mgr->icp_booted) {
 		CAM_DBG(CAM_ICP, "hw mgr is already closed");
 		return 0;
 	}
@@ -3497,30 +3592,12 @@ static int cam_icp_mgr_hw_close(void *hw_priv, void *hw_close_args)
 		return -EINVAL;
 	}
 
-	fw_buf_info.kva = 0;
-	fw_buf_info.iova = 0;
-	fw_buf_info.len = 0;
-	rc = icp_dev_intf->hw_ops.process_cmd(
-		icp_dev_intf->hw_priv,
-		CAM_ICP_CMD_SET_FW_BUF,
-		&fw_buf_info,
-		sizeof(fw_buf_info));
-	if (rc)
-		CAM_ERR(CAM_ICP, "nullify the fw buf failed");
+	cam_icp_mgr_proc_shutdown(hw_mgr);
 
 	cam_hfi_deinit();
-
-	irq_cb.icp_hw_mgr_cb = NULL;
-	irq_cb.data = NULL;
-	rc = icp_dev_intf->hw_ops.process_cmd(
-		icp_dev_intf->hw_priv,
-		CAM_ICP_SET_IRQ_CB,
-		&irq_cb, sizeof(irq_cb));
-	if (rc)
-		CAM_ERR(CAM_ICP, "deregister irq call back failed");
-
 	cam_icp_free_hfi_mem();
-	hw_mgr->fw_download = false;
+
+	hw_mgr->icp_booted = false;
 
 	CAM_DBG(CAM_ICP, "Exit");
 	return rc;
@@ -3579,49 +3656,6 @@ icp_dev_init_failed:
 	return rc;
 }
 
-static int cam_icp_mgr_fw_download(struct cam_icp_hw_mgr *hw_mgr)
-{
-	int rc;
-	struct cam_hw_intf *icp_dev_intf = NULL;
-	struct cam_icp_set_irq_cb irq_cb;
-	struct cam_icp_a5_set_fw_buf_info fw_buf_info;
-
-	icp_dev_intf = hw_mgr->icp_dev_intf;
-	if (!icp_dev_intf) {
-		CAM_ERR(CAM_ICP, "ICP device interface is invalid");
-		return -EINVAL;
-	}
-
-	irq_cb.icp_hw_mgr_cb = cam_icp_hw_mgr_cb;
-	irq_cb.data = hw_mgr;
-	rc = icp_dev_intf->hw_ops.process_cmd(
-		icp_dev_intf->hw_priv,
-		CAM_ICP_SET_IRQ_CB,
-		&irq_cb, sizeof(irq_cb));
-	if (rc)
-		return rc;
-
-	fw_buf_info.kva = icp_hw_mgr.hfi_mem.fw_buf.kva;
-	fw_buf_info.iova = icp_hw_mgr.hfi_mem.fw_buf.iova;
-	fw_buf_info.len = icp_hw_mgr.hfi_mem.fw_buf.len;
-
-	rc = icp_dev_intf->hw_ops.process_cmd(
-		icp_dev_intf->hw_priv,
-		CAM_ICP_CMD_SET_FW_BUF,
-		&fw_buf_info, sizeof(fw_buf_info));
-	if (rc)
-		return rc;
-
-	rc = icp_dev_intf->hw_ops.process_cmd(
-		icp_dev_intf->hw_priv,
-		CAM_ICP_CMD_FW_DOWNLOAD,
-		NULL, 0);
-	if (rc)
-		return rc;
-
-	return cam_icp_mgr_proc_resume(hw_mgr);
-}
-
 static int cam_icp_mgr_hfi_init(struct cam_icp_hw_mgr *hw_mgr)
 {
 	struct cam_hw_intf *icp_dev_intf = NULL;
@@ -3771,11 +3805,9 @@ static int cam_icp_mgr_icp_resume(struct cam_icp_hw_mgr *hw_mgr)
 		return -EINVAL;
 	}
 
-	if (hw_mgr->fw_download  == false) {
-		CAM_DBG(CAM_ICP, "Downloading FW");
-		rc = cam_icp_mgr_hw_open_k(hw_mgr, &downloadFromResume);
-		CAM_DBG(CAM_ICP, "FW Download Done Exit");
-		return rc;
+	if (!hw_mgr->icp_booted) {
+		CAM_DBG(CAM_ICP, "booting ICP processor");
+		return cam_icp_mgr_hw_open_k(hw_mgr, &downloadFromResume);
 	}
 
 	rc = icp_dev_intf->hw_ops.init(icp_dev_intf->hw_priv, NULL, 0);
@@ -3812,8 +3844,8 @@ static int cam_icp_mgr_hw_open(void *hw_mgr_priv, void *download_fw_args)
 		return -EINVAL;
 	}
 
-	if (hw_mgr->fw_download) {
-		CAM_DBG(CAM_ICP, "FW already downloaded");
+	if (hw_mgr->icp_booted) {
+		CAM_DBG(CAM_ICP, "ICP already booted");
 		return rc;
 	}
 
@@ -3830,9 +3862,9 @@ static int cam_icp_mgr_hw_open(void *hw_mgr_priv, void *download_fw_args)
 	if (rc)
 		goto dev_init_fail;
 
-	rc = cam_icp_mgr_fw_download(hw_mgr);
+	rc = cam_icp_mgr_proc_boot(hw_mgr);
 	if (rc)
-		goto fw_download_failed;
+		goto boot_failed;
 
 	rc = cam_icp_mgr_hfi_init(hw_mgr);
 	if (rc)
@@ -3843,7 +3875,7 @@ static int cam_icp_mgr_hw_open(void *hw_mgr_priv, void *download_fw_args)
 		goto fw_init_failed;
 
 	hw_mgr->ctxt_cnt = 0;
-	hw_mgr->fw_download = true;
+	hw_mgr->icp_booted = true;
 	atomic_set(&hw_mgr->recovery, 0);
 
 	CAM_INFO(CAM_ICP, "FW download done successfully");
@@ -3869,8 +3901,8 @@ static int cam_icp_mgr_hw_open(void *hw_mgr_priv, void *download_fw_args)
 fw_init_failed:
 	cam_hfi_deinit();
 hfi_init_failed:
-	cam_icp_mgr_proc_suspend(hw_mgr);
-fw_download_failed:
+	cam_icp_mgr_proc_shutdown(hw_mgr);
+boot_failed:
 	cam_icp_mgr_device_deinit(hw_mgr);
 dev_init_fail:
 	cam_icp_free_hfi_mem();

+ 10 - 9
drivers/cam_icp/icp_hw/icp_hw_mgr/cam_icp_hw_mgr.h

@@ -314,7 +314,8 @@ struct cam_icp_clk_info {
  * @devices: Devices of ICP hardware manager
  * @ctx_data: Context data
  * @icp_caps: ICP capabilities
- * @fw_download: Firmware download state
+ * @icp_booted: Processor is booted i.e. firmware loaded
+ * @icp_resumed: Processor is powered on
  * @iommu_hdl: Non secure IOMMU handle
  * @iommu_sec_hdl: Secure IOMMU handle
  * @hfi_mem: Memory for hfi
@@ -323,7 +324,7 @@ struct cam_icp_clk_info {
  * @timer_work: Work queue for timer watchdog
  * @msg_buf: Buffer for message data from firmware
  * @dbg_buf: Buffer for debug data from firmware
- * @a5_complete: Completion info
+ * @icp_complete: Completion info
  * @cmd_work_data: Pointer to command work queue task
  * @msg_work_data: Pointer to message work queue task
  * @timer_work_data: Pointer to timer work queue task
@@ -331,7 +332,6 @@ struct cam_icp_clk_info {
  * @ipe_ctxt_cnt: IPE Active context count
  * @bps_ctxt_cnt: BPS Active context count
  * @dentry: Debugfs entry
- * @a5_debug: A5 debug flag
  * @icp_pc_flag: Flag to enable/disable power collapse
  * @ipe_bps_pc_flag: Flag to enable/disable
  *                   power collapse for ipe & bps
@@ -339,14 +339,14 @@ struct cam_icp_clk_info {
  * @icp_default_clk: Set this clok if user doesn't supply
  * @clk_info: Clock info of hardware
  * @secure_mode: Flag to enable/disable secure camera
- * @a5_jtag_debug: entry to enable A5 JTAG debugging
- * @a5_debug_type : entry to enable FW debug message/qdss
- * @a5_dbg_lvl : debug level set to FW.
- * @a5_fw_dump_lvl : level set for dumping the FW data
+ * @icp_jtag_debug: entry to enable ICP JTAG debugging
+ * @icp_debug_type : entry to enable FW debug message/qdss
+ * @icp_dbg_lvl : debug level set to FW.
+ * @icp_fw_dump_lvl : level set for dumping the FW data
  * @ipe0_enable: Flag for IPE0
  * @ipe1_enable: Flag for IPE1
  * @bps_enable: Flag for BPS
- * @a5_dev_intf : Device interface for A5
+ * @icp_dev_intf : Device interface for ICP
  * @ipe0_dev_intf: Device interface for IPE0
  * @ipe1_dev_intf: Device interface for IPE1
  * @bps_dev_intf: Device interface for BPS
@@ -365,7 +365,8 @@ struct cam_icp_hw_mgr {
 	struct cam_icp_hw_ctx_data ctx_data[CAM_ICP_CTX_MAX];
 	struct cam_icp_query_cap_cmd icp_caps;
 
-	bool fw_download;
+	bool icp_booted;
+	bool icp_resumed;
 	int32_t iommu_hdl;
 	int32_t iommu_sec_hdl;
 	struct icp_hfi_mem_info hfi_mem;

+ 0 - 6
drivers/cam_icp/icp_hw/icp_hw_mgr/include/cam_a5_hw_intf.h

@@ -12,12 +12,6 @@
 #include "cam_hw_mgr_intf.h"
 #include "cam_icp_hw_intf.h"
 
-struct cam_icp_a5_set_fw_buf_info {
-	uint32_t iova;
-	uint64_t kva;
-	uint64_t len;
-};
-
 /**
  * struct cam_icp_a5_query_cap - ICP query device capability payload
  * @fw_version: firmware version info

+ 24 - 5
drivers/cam_icp/icp_hw/icp_hw_mgr/include/cam_icp_hw_intf.h

@@ -23,12 +23,11 @@ enum cam_icp_hw_type {
 };
 
 enum cam_icp_cmd_type {
-	CAM_ICP_CMD_FW_DOWNLOAD,
+	CAM_ICP_CMD_PROC_SHUTDOWN,
+	CAM_ICP_CMD_PROC_BOOT,
 	CAM_ICP_CMD_POWER_COLLAPSE,
 	CAM_ICP_CMD_POWER_RESUME,
-	CAM_ICP_CMD_SET_FW_BUF,
 	CAM_ICP_CMD_ACQUIRE,
-	CAM_ICP_SET_IRQ_CB,
 	CAM_ICP_TEST_IRQ,
 	CAM_ICP_SEND_INIT,
 	CAM_ICP_CMD_VOTE_CPAS,
@@ -41,9 +40,29 @@ enum cam_icp_cmd_type {
 	CAM_ICP_CMD_MAX,
 };
 
-struct cam_icp_set_irq_cb {
-	int32_t (*icp_hw_mgr_cb)(uint32_t irq_status, void *data);
+struct cam_icp_irq_cb {
 	void *data;
+	int (*cb)(void *data, uint32_t irq_status);
+};
+
+/**
+ * struct cam_icp_boot_args - Boot arguments for ICP processor
+ *
+ * @firmware.iova: device vaddr to firmware region
+ * @firmware.kva: kernel vaddr to firmware region
+ * @firmware.len: length of firmware region
+ * @irq_cb: irq callback
+ * @debug_enabled: processor will be booted with debug enabled
+ */
+struct cam_icp_boot_args {
+	struct {
+		uint32_t iova;
+		uint64_t kva;
+		uint64_t len;
+	} firmware;
+
+	struct cam_icp_irq_cb irq_cb;
+	bool debug_enabled;
 };
 
 /**