Browse Source

Merge changes I2680a98d,I9af73cc2 into camera-kernel.lnx.4.0

* changes:
  msm: camera: icp: Rename debugfs entries to be proc hw agnostic
  msm: camera: icp: Generalize proc references within hw manager
Haritha Chintalapati 4 years ago
parent
commit
09b1fe7b55

+ 2 - 2
drivers/cam_icp/fw_inc/hfi_intf.h

@@ -112,10 +112,10 @@ void hfi_send_system_cmd(uint32_t type, uint64_t data, uint32_t size);
 void cam_hfi_deinit(void);
 /**
  * hfi_set_debug_level() - set debug level
- * @a5_dbg_type: 1 for debug_q & 2 for qdss
+ * @icp_dbg_type: 1 for debug_q & 2 for qdss
  * @lvl: FW debug message level
  */
-int hfi_set_debug_level(u64 a5_dbg_type, uint32_t lvl);
+int hfi_set_debug_level(u64 icp_dbg_type, uint32_t lvl);
 
 /**
  * hfi_set_fw_dump_level() - set firmware dump level

+ 2 - 2
drivers/cam_icp/hfi.c

@@ -382,7 +382,7 @@ int hfi_enable_ipe_bps_pc(bool enable, uint32_t core_info)
 	return 0;
 }
 
-int hfi_set_debug_level(u64 a5_dbg_type, uint32_t lvl)
+int hfi_set_debug_level(u64 icp_dbg_type, uint32_t lvl)
 {
 	uint8_t *prop;
 	struct hfi_cmd_prop *dbg_prop;
@@ -413,7 +413,7 @@ int hfi_set_debug_level(u64 a5_dbg_type, uint32_t lvl)
 	dbg_prop->num_prop = 1;
 	dbg_prop->prop_data[0] = HFI_PROP_SYS_DEBUG_CFG;
 	dbg_prop->prop_data[1] = lvl;
-	dbg_prop->prop_data[2] = a5_dbg_type;
+	dbg_prop->prop_data[2] = icp_dbg_type;
 	hfi_write_cmd(prop);
 
 	kfree(prop);

+ 15 - 15
drivers/cam_icp/icp_hw/a5_hw/a5_core.c

@@ -549,7 +549,7 @@ int cam_a5_process_cmd(void *device_priv, uint32_t cmd_type,
 		return -EINVAL;
 	}
 
-	if (cmd_type >= CAM_ICP_A5_CMD_MAX) {
+	if (cmd_type >= CAM_ICP_CMD_MAX) {
 		CAM_ERR(CAM_ICP, "Invalid command : %x", cmd_type);
 		return -EINVAL;
 	}
@@ -559,16 +559,16 @@ 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_A5_CMD_FW_DOWNLOAD:
+	case CAM_ICP_CMD_FW_DOWNLOAD:
 		rc = cam_a5_download_fw(device_priv);
 		break;
-	case CAM_ICP_A5_CMD_POWER_COLLAPSE:
+	case CAM_ICP_CMD_POWER_COLLAPSE:
 		rc = cam_a5_power_collapse(a5_dev);
 		break;
-	case CAM_ICP_A5_CMD_POWER_RESUME:
+	case CAM_ICP_CMD_POWER_RESUME:
 		rc = cam_a5_power_resume(a5_dev, *((bool *)cmd_args));
 		break;
-	case CAM_ICP_A5_CMD_SET_FW_BUF: {
+	case CAM_ICP_CMD_SET_FW_BUF: {
 		struct cam_icp_a5_set_fw_buf_info *fw_buf_info = cmd_args;
 
 		if (!cmd_args) {
@@ -585,8 +585,8 @@ int cam_a5_process_cmd(void *device_priv, uint32_t cmd_type,
 			core_info->fw_buf_len);
 		break;
 	}
-	case CAM_ICP_A5_SET_IRQ_CB: {
-		struct cam_icp_a5_set_irq_cb *irq_cb = cmd_args;
+	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");
@@ -600,15 +600,15 @@ int cam_a5_process_cmd(void *device_priv, uint32_t cmd_type,
 		break;
 	}
 
-	case CAM_ICP_A5_SEND_INIT:
+	case CAM_ICP_SEND_INIT:
 		hfi_send_system_cmd(HFI_CMD_SYS_INIT, 0, 0);
 		break;
 
-	case CAM_ICP_A5_CMD_PC_PREP:
+	case CAM_ICP_CMD_PC_PREP:
 		hfi_send_system_cmd(HFI_CMD_SYS_PC_PREP, 0, 0);
 		break;
 
-	case CAM_ICP_A5_CMD_VOTE_CPAS: {
+	case CAM_ICP_CMD_VOTE_CPAS: {
 		struct cam_icp_cpas_vote *cpas_vote = cmd_args;
 
 		if (!cmd_args) {
@@ -620,7 +620,7 @@ int cam_a5_process_cmd(void *device_priv, uint32_t cmd_type,
 		break;
 	}
 
-	case CAM_ICP_A5_CMD_CPAS_START: {
+	case CAM_ICP_CMD_CPAS_START: {
 		struct cam_icp_cpas_vote *cpas_vote = cmd_args;
 
 		if (!cmd_args) {
@@ -637,13 +637,13 @@ int cam_a5_process_cmd(void *device_priv, uint32_t cmd_type,
 		break;
 	}
 
-	case CAM_ICP_A5_CMD_CPAS_STOP:
+	case CAM_ICP_CMD_CPAS_STOP:
 		if (core_info->cpas_start) {
 			cam_cpas_stop(core_info->cpas_handle);
 			core_info->cpas_start = false;
 		}
 		break;
-	case CAM_ICP_A5_CMD_UBWC_CFG: {
+	case CAM_ICP_CMD_UBWC_CFG: {
 		struct a5_ubwc_cfg_ext *ubwc_cfg_ext = NULL;
 
 		a5_soc = soc_info->soc_private;
@@ -676,7 +676,7 @@ int cam_a5_process_cmd(void *device_priv, uint32_t cmd_type,
 
 		break;
 	}
-	case CAM_ICP_A5_CMD_CLK_UPDATE: {
+	case CAM_ICP_CMD_CLK_UPDATE: {
 		int32_t clk_level = 0;
 		struct cam_ahb_vote ahb_vote;
 
@@ -700,7 +700,7 @@ int cam_a5_process_cmd(void *device_priv, uint32_t cmd_type,
 			core_info->cpas_handle, &ahb_vote);
 		break;
 	}
-	case CAM_ICP_A5_CMD_HW_DUMP: {
+	case CAM_ICP_CMD_HW_DUMP: {
 		struct cam_icp_hw_dump_args *dump_args = cmd_args;
 
 		rc = cam_a5_fw_dump(dump_args, core_info);

+ 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_a5_set_irq_cb irq_cb;
+	struct cam_icp_set_irq_cb irq_cb;
 	uint32_t cpas_handle;
 	bool cpas_start;
 };

+ 1 - 2
drivers/cam_icp/icp_hw/bps_hw/bps_core.c

@@ -411,8 +411,7 @@ int cam_bps_process_cmd(void *device_priv, uint32_t cmd_type,
 		rc = cam_bps_handle_resume(bps_dev);
 		break;
 	case CAM_ICP_BPS_CMD_UPDATE_CLK: {
-		struct cam_a5_clk_update_cmd *clk_upd_cmd =
-			(struct cam_a5_clk_update_cmd *)cmd_args;
+		struct cam_icp_clk_update_cmd *clk_upd_cmd = cmd_args;
 		struct cam_ahb_vote ahb_vote;
 		uint32_t clk_rate = clk_upd_cmd->curr_clk_rate;
 		int32_t clk_level  = 0, err = 0;

+ 140 - 155
drivers/cam_icp/icp_hw/icp_hw_mgr/cam_icp_hw_mgr.c

@@ -111,20 +111,18 @@ static const char *cam_icp_dev_type_to_name(
 
 static int cam_icp_send_ubwc_cfg(struct cam_icp_hw_mgr *hw_mgr)
 {
-	struct cam_hw_intf *a5_dev_intf = NULL;
+	struct cam_hw_intf *icp_dev_intf = hw_mgr->icp_dev_intf;
 	int rc;
 
-	a5_dev_intf = hw_mgr->a5_dev_intf;
-	if (!a5_dev_intf) {
-		CAM_ERR(CAM_ICP, "a5_dev_intf is NULL");
+	if (!icp_dev_intf) {
+		CAM_ERR(CAM_ICP, "ICP device interface is NULL");
 		return -EINVAL;
 	}
 
-	rc = a5_dev_intf->hw_ops.process_cmd(
-		a5_dev_intf->hw_priv,
-		CAM_ICP_A5_CMD_UBWC_CFG, NULL, 0);
+	rc = icp_dev_intf->hw_ops.process_cmd(icp_dev_intf->hw_priv,
+			CAM_ICP_CMD_UBWC_CFG, NULL, 0);
 	if (rc)
-		CAM_ERR(CAM_ICP, "CAM_ICP_A5_CMD_UBWC_CFG is failed");
+		CAM_ERR(CAM_ICP, "CAM_ICP_CMD_UBWC_CFG is failed");
 
 	return rc;
 }
@@ -348,7 +346,7 @@ static int32_t cam_icp_deinit_idle_clk(void *priv, void *data)
 	struct cam_hw_intf *ipe1_dev_intf = NULL;
 	struct cam_hw_intf *bps_dev_intf = NULL;
 	struct cam_hw_intf *dev_intf = NULL;
-	struct cam_a5_clk_update_cmd clk_upd_cmd;
+	struct cam_icp_clk_update_cmd clk_upd_cmd;
 	int rc = 0;
 	bool busy = false;
 
@@ -407,14 +405,13 @@ static int32_t cam_icp_deinit_idle_clk(void *priv, void *data)
 	clk_upd_cmd.ipe_bps_pc_enable = icp_hw_mgr.ipe_bps_pc_flag;
 
 	dev_intf->hw_ops.process_cmd(dev_intf->hw_priv, id,
-		&clk_upd_cmd, sizeof(struct cam_a5_clk_update_cmd));
+		&clk_upd_cmd, sizeof(clk_upd_cmd));
 
 	if (clk_info->hw_type != ICP_CLK_HW_BPS)
 		if (ipe1_dev_intf)
 			ipe1_dev_intf->hw_ops.process_cmd(
 				ipe1_dev_intf->hw_priv, id,
-				&clk_upd_cmd,
-				sizeof(struct cam_a5_clk_update_cmd));
+				&clk_upd_cmd, sizeof(clk_upd_cmd));
 
 done:
 	mutex_unlock(&hw_mgr->hw_mgr_mutex);
@@ -1436,14 +1433,14 @@ static int cam_icp_update_clk_rate(struct cam_icp_hw_mgr *hw_mgr,
 	struct cam_hw_intf *ipe0_dev_intf = NULL;
 	struct cam_hw_intf *ipe1_dev_intf = NULL;
 	struct cam_hw_intf *bps_dev_intf = NULL;
-	struct cam_hw_intf *a5_dev_intf = NULL;
+	struct cam_hw_intf *icp_dev_intf = NULL;
 	struct cam_hw_intf *dev_intf = NULL;
-	struct cam_a5_clk_update_cmd clk_upd_cmd;
+	struct cam_icp_clk_update_cmd clk_upd_cmd;
 
 	ipe0_dev_intf = hw_mgr->ipe0_dev_intf;
 	ipe1_dev_intf = hw_mgr->ipe1_dev_intf;
 	bps_dev_intf = hw_mgr->bps_dev_intf;
-	a5_dev_intf = hw_mgr->a5_dev_intf;
+	icp_dev_intf = hw_mgr->icp_dev_intf;
 
 
 	if ((!ipe0_dev_intf) || (!bps_dev_intf)) {
@@ -1468,21 +1465,20 @@ static int cam_icp_update_clk_rate(struct cam_icp_hw_mgr *hw_mgr,
 	clk_upd_cmd.clk_level = -1;
 
 	dev_intf->hw_ops.process_cmd(dev_intf->hw_priv, id,
-		&clk_upd_cmd, sizeof(struct cam_a5_clk_update_cmd));
+		&clk_upd_cmd, sizeof(clk_upd_cmd));
 
 	if (ctx_data->icp_dev_acquire_info->dev_type != CAM_ICP_RES_TYPE_BPS) {
 		if (ipe1_dev_intf) {
 			ipe1_dev_intf->hw_ops.process_cmd(
 				ipe1_dev_intf->hw_priv, id,
-				&clk_upd_cmd,
-				sizeof(struct cam_a5_clk_update_cmd));
+				&clk_upd_cmd, sizeof(clk_upd_cmd));
 		}
 
 		/* update a5 clock */
 		CAM_DBG(CAM_PERF, "Update ICP clk to level [%d]",
 			clk_upd_cmd.clk_level);
-		a5_dev_intf->hw_ops.process_cmd(a5_dev_intf->hw_priv,
-			CAM_ICP_A5_CMD_CLK_UPDATE, &clk_upd_cmd.clk_level,
+		icp_dev_intf->hw_ops.process_cmd(icp_dev_intf->hw_priv,
+			CAM_ICP_CMD_CLK_UPDATE, &clk_upd_cmd.clk_level,
 			sizeof(clk_upd_cmd.clk_level));
 	}
 
@@ -1840,53 +1836,53 @@ DEFINE_SIMPLE_ATTRIBUTE(cam_icp_debug_default_clk,
 	cam_icp_get_dbg_default_clk,
 	cam_icp_set_dbg_default_clk, "%16llu");
 
-static int cam_icp_set_a5_dbg_lvl(void *data, u64 val)
+static int cam_icp_set_icp_dbg_lvl(void *data, u64 val)
 {
-	icp_hw_mgr.a5_dbg_lvl = val;
+	icp_hw_mgr.icp_dbg_lvl = val;
 	return 0;
 }
 
-static int cam_icp_get_a5_dbg_lvl(void *data, u64 *val)
+static int cam_icp_get_icp_dbg_lvl(void *data, u64 *val)
 {
-	*val = icp_hw_mgr.a5_dbg_lvl;
+	*val = icp_hw_mgr.icp_dbg_lvl;
 	return 0;
 }
 
-DEFINE_SIMPLE_ATTRIBUTE(cam_icp_debug_fs, cam_icp_get_a5_dbg_lvl,
-	cam_icp_set_a5_dbg_lvl, "%08llu");
+DEFINE_SIMPLE_ATTRIBUTE(cam_icp_debug_fs, cam_icp_get_icp_dbg_lvl,
+	cam_icp_set_icp_dbg_lvl, "%08llu");
 
-static int cam_icp_set_a5_dbg_type(void *data, u64 val)
+static int cam_icp_set_icp_dbg_type(void *data, u64 val)
 {
 	if (val <= NUM_HFI_DEBUG_MODE)
-		icp_hw_mgr.a5_debug_type = val;
+		icp_hw_mgr.icp_debug_type = val;
 	return 0;
 }
 
-static int cam_icp_get_a5_dbg_type(void *data, u64 *val)
+static int cam_icp_get_icp_dbg_type(void *data, u64 *val)
 {
-	*val = icp_hw_mgr.a5_debug_type;
+	*val = icp_hw_mgr.icp_debug_type;
 	return 0;
 }
 
 
-DEFINE_SIMPLE_ATTRIBUTE(cam_icp_debug_type_fs, cam_icp_get_a5_dbg_type,
-	cam_icp_set_a5_dbg_type, "%08llu");
+DEFINE_SIMPLE_ATTRIBUTE(cam_icp_debug_type_fs, cam_icp_get_icp_dbg_type,
+	cam_icp_set_icp_dbg_type, "%08llu");
 
-static int cam_icp_set_a5_fw_dump_lvl(void *data, u64 val)
+static int cam_icp_set_icp_fw_dump_lvl(void *data, u64 val)
 {
 	if (val < NUM_HFI_DUMP_LVL)
-		icp_hw_mgr.a5_fw_dump_lvl = val;
+		icp_hw_mgr.icp_fw_dump_lvl = val;
 	return 0;
 }
 
-static int cam_icp_get_a5_fw_dump_lvl(void *data, u64 *val)
+static int cam_icp_get_icp_fw_dump_lvl(void *data, u64 *val)
 {
-	*val = icp_hw_mgr.a5_fw_dump_lvl;
+	*val = icp_hw_mgr.icp_fw_dump_lvl;
 	return 0;
 }
 
-DEFINE_SIMPLE_ATTRIBUTE(cam_icp_debug_fw_dump, cam_icp_get_a5_fw_dump_lvl,
-	cam_icp_set_a5_fw_dump_lvl, "%08llu");
+DEFINE_SIMPLE_ATTRIBUTE(cam_icp_debug_fw_dump, cam_icp_get_icp_fw_dump_lvl,
+	cam_icp_set_icp_fw_dump_lvl, "%08llu");
 
 static int cam_icp_hw_mgr_create_debugfs_entry(void)
 {
@@ -1911,16 +1907,16 @@ static int cam_icp_hw_mgr_create_debugfs_entry(void)
 	dbgfileptr = debugfs_create_file("icp_debug_clk", 0644,
 		icp_hw_mgr.dentry, NULL, &cam_icp_debug_default_clk);
 
-	dbgfileptr = debugfs_create_bool("a5_jtag_debug", 0644,
-		icp_hw_mgr.dentry, &icp_hw_mgr.a5_jtag_debug);
+	dbgfileptr = debugfs_create_bool("icp_jtag_debug", 0644,
+		icp_hw_mgr.dentry, &icp_hw_mgr.icp_jtag_debug);
 
-	dbgfileptr = debugfs_create_file("a5_debug_type", 0644,
+	dbgfileptr = debugfs_create_file("icp_debug_type", 0644,
 		icp_hw_mgr.dentry, NULL, &cam_icp_debug_type_fs);
 
-	dbgfileptr = debugfs_create_file("a5_debug_lvl", 0644,
+	dbgfileptr = debugfs_create_file("icp_debug_lvl", 0644,
 		icp_hw_mgr.dentry, NULL, &cam_icp_debug_fs);
 
-	dbgfileptr = debugfs_create_file("a5_fw_dump_lvl", 0644,
+	dbgfileptr = debugfs_create_file("icp_fw_dump_lvl", 0644,
 		icp_hw_mgr.dentry, NULL, &cam_icp_debug_fw_dump);
 	if (IS_ERR(dbgfileptr)) {
 		if (PTR_ERR(dbgfileptr) == -ENODEV)
@@ -1930,7 +1926,7 @@ static int cam_icp_hw_mgr_create_debugfs_entry(void)
 	}
 end:
 	/* Set default hang dump lvl */
-	icp_hw_mgr.a5_fw_dump_lvl = HFI_FW_DUMP_ON_FAILURE;
+	icp_hw_mgr.icp_fw_dump_lvl = HFI_FW_DUMP_ON_FAILURE;
 	return rc;
 }
 
@@ -2330,16 +2326,11 @@ static int cam_icp_mgr_process_direct_ack_msg(uint32_t *msg_ptr)
 {
 	struct cam_icp_hw_ctx_data *ctx_data = NULL;
 	struct hfi_msg_ipebps_async_ack *ioconfig_ack = NULL;
-	struct cam_hw_intf *a5_dev_intf = NULL;
-	struct cam_hw_info *a5_dev = NULL;
 	int rc = 0;
 
-	a5_dev_intf = icp_hw_mgr.a5_dev_intf;
-	if (!a5_dev_intf) {
-		CAM_ERR(CAM_ICP, "a5_dev_intf is invalid");
+	if (!msg_ptr)
 		return -EINVAL;
-	}
-	a5_dev = (struct cam_hw_info *)a5_dev_intf->hw_priv;
+
 	switch (msg_ptr[ICP_PACKET_OPCODE]) {
 	case HFI_IPEBPS_CMD_OPCODE_IPE_ABORT:
 	case HFI_IPEBPS_CMD_OPCODE_BPS_ABORT:
@@ -2489,7 +2480,7 @@ static int cam_icp_mgr_process_fatal_error(
 			BUG();
 		}
 		rc = cam_icp_mgr_trigger_recovery(hw_mgr);
-		cam_icp_mgr_process_dbg_buf(icp_hw_mgr.a5_dbg_lvl);
+		cam_icp_mgr_process_dbg_buf(icp_hw_mgr.icp_dbg_lvl);
 	}
 
 	return rc;
@@ -2543,14 +2534,14 @@ static int cam_icp_process_msg_pkt_type(
 	switch (msg_ptr[ICP_PACKET_TYPE]) {
 	case HFI_MSG_SYS_INIT_DONE:
 		CAM_DBG(CAM_ICP, "received SYS_INIT_DONE");
-		complete(&hw_mgr->a5_complete);
+		complete(&hw_mgr->icp_complete);
 		size_processed = (
 			(struct hfi_msg_init_done *)msg_ptr)->size;
 		break;
 
 	case HFI_MSG_SYS_PC_PREP_DONE:
 		CAM_DBG(CAM_ICP, "HFI_MSG_SYS_PC_PREP_DONE is received\n");
-		complete(&hw_mgr->a5_complete);
+		complete(&hw_mgr->icp_complete);
 		size_processed = sizeof(struct hfi_msg_pc_prep_done);
 		break;
 
@@ -2644,7 +2635,7 @@ static int32_t cam_icp_mgr_process_msg(void *priv, void *data)
 		}
 	}
 
-	cam_icp_mgr_process_dbg_buf(icp_hw_mgr.a5_dbg_lvl);
+	cam_icp_mgr_process_dbg_buf(icp_hw_mgr.icp_dbg_lvl);
 
 	if ((task_data->irq_status & A5_WDT_0) ||
 		(task_data->irq_status & A5_WDT_1)) {
@@ -2968,25 +2959,24 @@ static void cam_icp_mgr_put_ctx(struct cam_icp_hw_ctx_data *ctx_data)
 static int cam_icp_mgr_send_pc_prep(struct cam_icp_hw_mgr *hw_mgr)
 {
 	int rc;
-	struct cam_hw_intf *a5_dev_intf = NULL;
+	struct cam_hw_intf *icp_dev_intf = hw_mgr->icp_dev_intf;
 	unsigned long rem_jiffies;
 	int timeout = 5000;
 
-	a5_dev_intf = hw_mgr->a5_dev_intf;
-	if (!a5_dev_intf) {
-		CAM_ERR(CAM_ICP, "a5_dev_intf is invalid\n");
+	if (!icp_dev_intf) {
+		CAM_ERR(CAM_ICP, "ICP device interface is NULL");
 		return -EINVAL;
 	}
 
-	reinit_completion(&hw_mgr->a5_complete);
+	reinit_completion(&hw_mgr->icp_complete);
 	CAM_DBG(CAM_ICP, "Sending HFI init command");
-	rc = a5_dev_intf->hw_ops.process_cmd(
-		a5_dev_intf->hw_priv, CAM_ICP_A5_CMD_PC_PREP, NULL, 0);
+	rc = icp_dev_intf->hw_ops.process_cmd(icp_dev_intf->hw_priv,
+					CAM_ICP_CMD_PC_PREP, NULL, 0);
 	if (rc)
 		return rc;
 
 	CAM_DBG(CAM_ICP, "Wait for PC_PREP_DONE Message\n");
-	rem_jiffies = wait_for_completion_timeout(&icp_hw_mgr.a5_complete,
+	rem_jiffies = wait_for_completion_timeout(&icp_hw_mgr.icp_complete,
 		msecs_to_jiffies((timeout)));
 	if (!rem_jiffies) {
 		rc = -ETIMEDOUT;
@@ -3062,26 +3052,26 @@ 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->a5_dev_intf;
+	struct cam_hw_intf *icp_dev_intf = hw_mgr->icp_dev_intf;
 
 	if (!icp_dev_intf)
 		return -EINVAL;
 
 	return icp_dev_intf->hw_ops.process_cmd(icp_dev_intf->hw_priv,
-						CAM_ICP_A5_CMD_POWER_RESUME,
-						&hw_mgr->a5_jtag_debug,
-						sizeof(hw_mgr->a5_jtag_debug));
+						CAM_ICP_CMD_POWER_RESUME,
+						&hw_mgr->icp_jtag_debug,
+						sizeof(hw_mgr->icp_jtag_debug));
 }
 
 static void cam_icp_mgr_proc_suspend(struct cam_icp_hw_mgr *hw_mgr)
 {
-	struct cam_hw_intf *icp_dev_intf = hw_mgr->a5_dev_intf;
+	struct cam_hw_intf *icp_dev_intf = hw_mgr->icp_dev_intf;
 
 	if (!icp_dev_intf)
 		return;
 
 	icp_dev_intf->hw_ops.process_cmd(icp_dev_intf->hw_priv,
-					CAM_ICP_A5_CMD_POWER_COLLAPSE,
+					CAM_ICP_CMD_POWER_COLLAPSE,
 					NULL, 0);
 }
 
@@ -3103,19 +3093,19 @@ static int __power_collapse(struct cam_icp_hw_mgr *hw_mgr)
 
 static int cam_icp_mgr_icp_power_collapse(struct cam_icp_hw_mgr *hw_mgr)
 {
-	struct cam_hw_intf *a5_dev_intf = hw_mgr->a5_dev_intf;
+	struct cam_hw_intf *icp_dev_intf = hw_mgr->icp_dev_intf;
 	int rc;
 
 	CAM_DBG(CAM_PERF, "ENTER");
 
-	if (!a5_dev_intf) {
-		CAM_ERR(CAM_ICP, "A5 device interface is NULL");
+	if (!icp_dev_intf) {
+		CAM_ERR(CAM_ICP, "ICP device interface is NULL");
 		return -EINVAL;
 	}
 
 	rc = __power_collapse(hw_mgr);
 
-	a5_dev_intf->hw_ops.deinit(a5_dev_intf->hw_priv, NULL, 0);
+	icp_dev_intf->hw_ops.deinit(icp_dev_intf->hw_priv, NULL, 0);
 
 	CAM_DBG(CAM_PERF, "EXIT");
 
@@ -3333,7 +3323,7 @@ static int cam_icp_mgr_abort_handle(
 			CAM_ERR(CAM_ICP,
 				"FW timeout/err in abort handle command ctx: %u",
 				ctx_data->ctx_id);
-			cam_icp_mgr_process_dbg_buf(icp_hw_mgr.a5_dbg_lvl);
+			cam_icp_mgr_process_dbg_buf(icp_hw_mgr.icp_dbg_lvl);
 			cam_hfi_queue_dump();
 		}
 	}
@@ -3389,7 +3379,7 @@ static int cam_icp_mgr_destroy_handle(
 		rc = -ETIMEDOUT;
 		CAM_ERR(CAM_ICP, "FW response timeout: %d for %u",
 			rc, ctx_data->ctx_id);
-		cam_icp_mgr_process_dbg_buf(icp_hw_mgr.a5_dbg_lvl);
+		cam_icp_mgr_process_dbg_buf(icp_hw_mgr.icp_dbg_lvl);
 		cam_hfi_queue_dump();
 	}
 	kfree(destroy_cmd);
@@ -3447,17 +3437,17 @@ static int cam_icp_mgr_release_ctx(struct cam_icp_hw_mgr *hw_mgr, int ctx_id)
 
 static void cam_icp_mgr_device_deinit(struct cam_icp_hw_mgr *hw_mgr)
 {
-	struct cam_hw_intf *a5_dev_intf = NULL;
+	struct cam_hw_intf *icp_dev_intf = NULL;
 	struct cam_hw_intf *ipe0_dev_intf = NULL;
 	struct cam_hw_intf *ipe1_dev_intf = NULL;
 	struct cam_hw_intf *bps_dev_intf = NULL;
 
-	a5_dev_intf = hw_mgr->a5_dev_intf;
+	icp_dev_intf = hw_mgr->icp_dev_intf;
 	ipe0_dev_intf = hw_mgr->ipe0_dev_intf;
 	ipe1_dev_intf = hw_mgr->ipe1_dev_intf;
 	bps_dev_intf = hw_mgr->bps_dev_intf;
 
-	if ((!a5_dev_intf) || (!ipe0_dev_intf) || (!bps_dev_intf)) {
+	if ((!icp_dev_intf) || (!ipe0_dev_intf) || (!bps_dev_intf)) {
 		CAM_ERR(CAM_ICP, "dev intfs are wrong, failed to close");
 		return;
 	}
@@ -3466,7 +3456,7 @@ static void cam_icp_mgr_device_deinit(struct cam_icp_hw_mgr *hw_mgr)
 		ipe1_dev_intf->hw_ops.deinit(ipe1_dev_intf->hw_priv, NULL, 0);
 	ipe0_dev_intf->hw_ops.deinit(ipe0_dev_intf->hw_priv, NULL, 0);
 	bps_dev_intf->hw_ops.deinit(bps_dev_intf->hw_priv, NULL, 0);
-	a5_dev_intf->hw_ops.deinit(a5_dev_intf->hw_priv, NULL, 0);
+	icp_dev_intf->hw_ops.deinit(icp_dev_intf->hw_priv, NULL, 0);
 	hw_mgr->bps_clk_state = false;
 	hw_mgr->ipe_clk_state = false;
 }
@@ -3474,8 +3464,8 @@ static void cam_icp_mgr_device_deinit(struct cam_icp_hw_mgr *hw_mgr)
 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 *a5_dev_intf = NULL;
-	struct cam_icp_a5_set_irq_cb irq_cb;
+	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;
 
@@ -3484,18 +3474,19 @@ static int cam_icp_mgr_hw_close(void *hw_priv, void *hw_close_args)
 		CAM_DBG(CAM_ICP, "hw mgr is already closed");
 		return 0;
 	}
-	a5_dev_intf = hw_mgr->a5_dev_intf;
-	if (!a5_dev_intf) {
-		CAM_DBG(CAM_ICP, "a5_dev_intf is NULL");
+
+	icp_dev_intf = hw_mgr->icp_dev_intf;
+	if (!icp_dev_intf) {
+		CAM_DBG(CAM_ICP, "ICP device interface is NULL");
 		return -EINVAL;
 	}
 
 	fw_buf_info.kva = 0;
 	fw_buf_info.iova = 0;
 	fw_buf_info.len = 0;
-	rc = a5_dev_intf->hw_ops.process_cmd(
-		a5_dev_intf->hw_priv,
-		CAM_ICP_A5_CMD_SET_FW_BUF,
+	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)
@@ -3505,9 +3496,9 @@ static int cam_icp_mgr_hw_close(void *hw_priv, void *hw_close_args)
 
 	irq_cb.icp_hw_mgr_cb = NULL;
 	irq_cb.data = NULL;
-	rc = a5_dev_intf->hw_ops.process_cmd(
-		a5_dev_intf->hw_priv,
-		CAM_ICP_A5_SET_IRQ_CB,
+	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");
@@ -3522,24 +3513,24 @@ static int cam_icp_mgr_hw_close(void *hw_priv, void *hw_close_args)
 static int cam_icp_mgr_device_init(struct cam_icp_hw_mgr *hw_mgr)
 {
 	int rc = 0;
-	struct cam_hw_intf *a5_dev_intf = NULL;
+	struct cam_hw_intf *icp_dev_intf = NULL;
 	struct cam_hw_intf *ipe0_dev_intf = NULL;
 	struct cam_hw_intf *ipe1_dev_intf = NULL;
 	struct cam_hw_intf *bps_dev_intf = NULL;
 
-	a5_dev_intf = hw_mgr->a5_dev_intf;
+	icp_dev_intf = hw_mgr->icp_dev_intf;
 	ipe0_dev_intf = hw_mgr->ipe0_dev_intf;
 	ipe1_dev_intf = hw_mgr->ipe1_dev_intf;
 	bps_dev_intf = hw_mgr->bps_dev_intf;
 
-	if ((!a5_dev_intf) || (!ipe0_dev_intf) || (!bps_dev_intf)) {
+	if ((!icp_dev_intf) || (!ipe0_dev_intf) || (!bps_dev_intf)) {
 		CAM_ERR(CAM_ICP, "dev intfs are wrong");
 		return -EINVAL;
 	}
 
-	rc = a5_dev_intf->hw_ops.init(a5_dev_intf->hw_priv, NULL, 0);
+	rc = icp_dev_intf->hw_ops.init(icp_dev_intf->hw_priv, NULL, 0);
 	if (rc)
-		goto a5_dev_init_failed;
+		goto icp_dev_init_failed;
 
 	rc = bps_dev_intf->hw_ops.init(bps_dev_intf->hw_priv, NULL, 0);
 	if (rc)
@@ -3567,29 +3558,29 @@ ipe0_dev_init_failed:
 	bps_dev_intf->hw_ops.deinit(bps_dev_intf->hw_priv, NULL, 0);
 	hw_mgr->bps_clk_state = false;
 bps_dev_init_failed:
-	a5_dev_intf->hw_ops.deinit(a5_dev_intf->hw_priv, NULL, 0);
-a5_dev_init_failed:
+	icp_dev_intf->hw_ops.deinit(icp_dev_intf->hw_priv, NULL, 0);
+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 *a5_dev_intf = NULL;
-	struct cam_icp_a5_set_irq_cb irq_cb;
+	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;
 
-	a5_dev_intf = hw_mgr->a5_dev_intf;
-	if (!a5_dev_intf) {
-		CAM_ERR(CAM_ICP, "a5_dev_intf is invalid");
+	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 = a5_dev_intf->hw_ops.process_cmd(
-		a5_dev_intf->hw_priv,
-		CAM_ICP_A5_SET_IRQ_CB,
+	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;
@@ -3598,16 +3589,16 @@ static int cam_icp_mgr_fw_download(struct cam_icp_hw_mgr *hw_mgr)
 	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 = a5_dev_intf->hw_ops.process_cmd(
-		a5_dev_intf->hw_priv,
-		CAM_ICP_A5_CMD_SET_FW_BUF,
+	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 = a5_dev_intf->hw_ops.process_cmd(
-		a5_dev_intf->hw_priv,
-		CAM_ICP_A5_CMD_FW_DOWNLOAD,
+	rc = icp_dev_intf->hw_ops.process_cmd(
+		icp_dev_intf->hw_priv,
+		CAM_ICP_CMD_FW_DOWNLOAD,
 		NULL, 0);
 	if (rc)
 		return rc;
@@ -3617,17 +3608,17 @@ static int cam_icp_mgr_fw_download(struct cam_icp_hw_mgr *hw_mgr)
 
 static int cam_icp_mgr_hfi_init(struct cam_icp_hw_mgr *hw_mgr)
 {
-	struct cam_hw_intf *a5_dev_intf = NULL;
-	struct cam_hw_info *a5_dev = NULL;
+	struct cam_hw_intf *icp_dev_intf = NULL;
+	struct cam_hw_info *icp_dev = NULL;
 	struct hfi_mem_info hfi_mem;
 	const struct hfi_ops *hfi_ops;
 
-	a5_dev_intf = hw_mgr->a5_dev_intf;
-	if (!a5_dev_intf) {
-		CAM_ERR(CAM_ICP, "a5_dev_intf is invalid");
+	icp_dev_intf = hw_mgr->icp_dev_intf;
+	if (!icp_dev_intf) {
+		CAM_ERR(CAM_ICP, "ICP device interface is invalid");
 		return -EINVAL;
 	}
-	a5_dev = (struct cam_hw_info *)a5_dev_intf->hw_priv;
+	icp_dev = (struct cam_hw_info *)icp_dev_intf->hw_priv;
 
 	hfi_mem.qtbl.kva = icp_hw_mgr.hfi_mem.qtbl.kva;
 	hfi_mem.qtbl.iova = icp_hw_mgr.hfi_mem.qtbl.iova;
@@ -3687,37 +3678,34 @@ static int cam_icp_mgr_hfi_init(struct cam_icp_hw_mgr *hw_mgr)
 
 	hfi_ops = &hfi_a5_ops;
 
-	return cam_hfi_init(&hfi_mem, hfi_ops, a5_dev, 0);
+	return cam_hfi_init(&hfi_mem, hfi_ops, icp_dev, 0);
 }
 
 static int cam_icp_mgr_send_fw_init(struct cam_icp_hw_mgr *hw_mgr)
 {
 	int rc;
-	struct cam_hw_intf *a5_dev_intf = NULL;
+	struct cam_hw_intf *icp_dev_intf = hw_mgr->icp_dev_intf;
 	unsigned long rem_jiffies;
 	int timeout = 5000;
 
-	a5_dev_intf = hw_mgr->a5_dev_intf;
-	if (!a5_dev_intf) {
-		CAM_ERR(CAM_ICP, "a5_dev_intf is invalid");
+	if (!icp_dev_intf) {
+		CAM_ERR(CAM_ICP, "ICP device interface is NULL");
 		return -EINVAL;
 	}
 
-	reinit_completion(&hw_mgr->a5_complete);
+	reinit_completion(&hw_mgr->icp_complete);
 	CAM_DBG(CAM_ICP, "Sending HFI init command");
-	rc = a5_dev_intf->hw_ops.process_cmd(
-		a5_dev_intf->hw_priv,
-		CAM_ICP_A5_SEND_INIT,
-		NULL, 0);
+	rc = icp_dev_intf->hw_ops.process_cmd(icp_dev_intf->hw_priv,
+					CAM_ICP_SEND_INIT, NULL, 0);
 	if (rc)
 		return rc;
 
-	rem_jiffies = wait_for_completion_timeout(&icp_hw_mgr.a5_complete,
+	rem_jiffies = wait_for_completion_timeout(&icp_hw_mgr.icp_complete,
 		msecs_to_jiffies((timeout)));
 	if (!rem_jiffies) {
 		rc = -ETIMEDOUT;
 		CAM_ERR(CAM_ICP, "FW response timed out %d", rc);
-		cam_icp_mgr_process_dbg_buf(icp_hw_mgr.a5_dbg_lvl);
+		cam_icp_mgr_process_dbg_buf(icp_hw_mgr.icp_dbg_lvl);
 		cam_hfi_queue_dump();
 	}
 	CAM_DBG(CAM_ICP, "Done Waiting for INIT DONE Message");
@@ -3757,14 +3745,13 @@ static int cam_icp_mgr_hw_open_k(void *hw_mgr_priv, void *download_fw_args)
 static int cam_icp_mgr_icp_resume(struct cam_icp_hw_mgr *hw_mgr)
 {
 	int rc = 0;
-	struct cam_hw_intf *a5_dev_intf = NULL;
+	struct cam_hw_intf *icp_dev_intf = hw_mgr->icp_dev_intf;
 	bool downloadFromResume = true;
 
 	CAM_DBG(CAM_ICP, "Enter");
-	a5_dev_intf = hw_mgr->devices[CAM_ICP_DEV_A5][0];
 
-	if (!a5_dev_intf) {
-		CAM_ERR(CAM_ICP, "a5 dev intf is wrong");
+	if (!icp_dev_intf) {
+		CAM_ERR(CAM_ICP, "ICP device interface is NULL");
 		return -EINVAL;
 	}
 
@@ -3775,7 +3762,7 @@ static int cam_icp_mgr_icp_resume(struct cam_icp_hw_mgr *hw_mgr)
 		return rc;
 	}
 
-	rc = a5_dev_intf->hw_ops.init(a5_dev_intf->hw_priv, NULL, 0);
+	rc = icp_dev_intf->hw_ops.init(icp_dev_intf->hw_priv, NULL, 0);
 	if (rc)
 		return -EINVAL;
 
@@ -3793,14 +3780,13 @@ static int cam_icp_mgr_icp_resume(struct cam_icp_hw_mgr *hw_mgr)
 power_collapse:
 	__power_collapse(hw_mgr);
 hw_deinit:
-	a5_dev_intf->hw_ops.deinit(a5_dev_intf->hw_priv, NULL, 0);
+	icp_dev_intf->hw_ops.deinit(icp_dev_intf->hw_priv, NULL, 0);
 
 	return rc;
 }
 
 static int cam_icp_mgr_hw_open(void *hw_mgr_priv, void *download_fw_args)
 {
-	struct cam_hw_intf *a5_dev_intf = NULL;
 	struct cam_icp_hw_mgr *hw_mgr = hw_mgr_priv;
 	bool icp_pc = false;
 	int rc = 0;
@@ -3815,9 +3801,8 @@ static int cam_icp_mgr_hw_open(void *hw_mgr_priv, void *download_fw_args)
 		return rc;
 	}
 
-	a5_dev_intf = hw_mgr->a5_dev_intf;
-	if (!a5_dev_intf) {
-		CAM_ERR(CAM_ICP, "a5_dev_intf is invalid");
+	if (!hw_mgr->icp_dev_intf) {
+		CAM_ERR(CAM_ICP, "ICP device interface is invalid");
 		return -EINVAL;
 	}
 
@@ -3976,7 +3961,7 @@ static int cam_icp_mgr_send_config_io(struct cam_icp_hw_ctx_data *ctx_data,
 	if (!rem_jiffies) {
 		rc = -ETIMEDOUT;
 		CAM_ERR(CAM_ICP, "FW response timed out %d", rc);
-		cam_icp_mgr_process_dbg_buf(icp_hw_mgr.a5_dbg_lvl);
+		cam_icp_mgr_process_dbg_buf(icp_hw_mgr.icp_dbg_lvl);
 		cam_hfi_queue_dump();
 	}
 
@@ -5145,7 +5130,7 @@ static int cam_icp_mgr_enqueue_abort(
 			CAM_ERR(CAM_ICP,
 				"FW timeout/err in abort handle command ctx: %u",
 				ctx_data->ctx_id);
-			cam_icp_mgr_process_dbg_buf(icp_hw_mgr.a5_dbg_lvl);
+			cam_icp_mgr_process_dbg_buf(icp_hw_mgr.icp_dbg_lvl);
 			cam_hfi_queue_dump();
 			return rc;
 		}
@@ -5167,7 +5152,7 @@ static int cam_icp_mgr_hw_dump(void *hw_priv, void *hw_dump_args)
 	struct timespec64                cur_ts;
 	struct timespec64                req_ts;
 	ktime_t                          cur_time;
-	struct cam_hw_intf              *a5_dev_intf;
+	struct cam_hw_intf              *icp_dev_intf;
 	struct cam_icp_hw_mgr           *hw_mgr;
 	struct cam_hw_dump_args         *dump_args;
 	struct cam_icp_hw_ctx_data      *ctx_data;
@@ -5253,10 +5238,10 @@ hw_dump:
 	dump_args->offset += (hdr->size + sizeof(struct cam_icp_dump_header));
 	/* Dumping the fw image*/
 	icp_dump_args.offset = dump_args->offset;
-	a5_dev_intf = hw_mgr->a5_dev_intf;
-	rc = a5_dev_intf->hw_ops.process_cmd(
-		a5_dev_intf->hw_priv,
-		CAM_ICP_A5_CMD_HW_DUMP, &icp_dump_args,
+	icp_dev_intf = hw_mgr->icp_dev_intf;
+	rc = icp_dev_intf->hw_ops.process_cmd(
+		icp_dev_intf->hw_priv,
+		CAM_ICP_CMD_HW_DUMP, &icp_dump_args,
 		sizeof(struct cam_icp_hw_dump_args));
 	CAM_DBG(CAM_ICP, "Offset before %zu after %zu",
 		dump_args->offset, icp_dump_args.offset);
@@ -5423,7 +5408,7 @@ static int cam_icp_mgr_create_handle(uint32_t dev_type,
 	if (!rem_jiffies) {
 		rc = -ETIMEDOUT;
 		CAM_ERR(CAM_ICP, "FW response timed out %d", rc);
-		cam_icp_mgr_process_dbg_buf(icp_hw_mgr.a5_dbg_lvl);
+		cam_icp_mgr_process_dbg_buf(icp_hw_mgr.icp_dbg_lvl);
 		cam_hfi_queue_dump();
 	}
 
@@ -5470,7 +5455,7 @@ static int cam_icp_mgr_send_ping(struct cam_icp_hw_ctx_data *ctx_data)
 	if (!rem_jiffies) {
 		rc = -ETIMEDOUT;
 		CAM_ERR(CAM_ICP, "FW response timed out %d", rc);
-		cam_icp_mgr_process_dbg_buf(icp_hw_mgr.a5_dbg_lvl);
+		cam_icp_mgr_process_dbg_buf(icp_hw_mgr.icp_dbg_lvl);
 		cam_hfi_queue_dump();
 	}
 
@@ -5637,11 +5622,11 @@ static int cam_icp_mgr_acquire_hw(void *hw_mgr_priv, void *acquire_hw_args)
 		if (rc)
 			goto get_io_buf_failed;
 
-		if (icp_hw_mgr.a5_debug_type)
-			hfi_set_debug_level(icp_hw_mgr.a5_debug_type,
-				icp_hw_mgr.a5_dbg_lvl);
+		if (icp_hw_mgr.icp_debug_type)
+			hfi_set_debug_level(icp_hw_mgr.icp_debug_type,
+				icp_hw_mgr.icp_dbg_lvl);
 
-		hfi_set_fw_dump_level(icp_hw_mgr.a5_fw_dump_lvl);
+		hfi_set_fw_dump_level(icp_hw_mgr.icp_fw_dump_lvl);
 
 		rc = cam_icp_send_ubwc_cfg(hw_mgr);
 		if (rc)
@@ -5760,7 +5745,7 @@ get_io_buf_failed:
 	hw_mgr->ctx_data[ctx_id].icp_dev_acquire_info = NULL;
 acquire_info_failed:
 	cam_icp_mgr_put_ctx(ctx_data);
-	cam_icp_mgr_process_dbg_buf(icp_hw_mgr.a5_dbg_lvl);
+	cam_icp_mgr_process_dbg_buf(icp_hw_mgr.icp_dbg_lvl);
 	mutex_unlock(&ctx_data->ctx_mutex);
 	mutex_unlock(&hw_mgr->hw_mgr_mutex);
 	return rc;
@@ -5932,7 +5917,7 @@ static int cam_icp_mgr_init_devs(struct device_node *of_node)
 		of_node_put(child_node);
 	}
 
-	icp_hw_mgr.a5_dev_intf = icp_hw_mgr.devices[CAM_ICP_DEV_A5][0];
+	icp_hw_mgr.icp_dev_intf = icp_hw_mgr.devices[CAM_ICP_DEV_A5][0];
 	icp_hw_mgr.bps_dev_intf = icp_hw_mgr.devices[CAM_ICP_DEV_BPS][0];
 	icp_hw_mgr.ipe0_dev_intf = icp_hw_mgr.devices[CAM_ICP_DEV_IPE][0];
 	if (icp_hw_mgr.ipe1_enable)
@@ -6174,7 +6159,7 @@ int cam_icp_hw_mgr_init(struct device_node *of_node, uint64_t *hw_mgr_hdl,
 	if (iommu_hdl)
 		*iommu_hdl = icp_hw_mgr.iommu_hdl;
 
-	init_completion(&icp_hw_mgr.a5_complete);
+	init_completion(&icp_hw_mgr.icp_complete);
 	return rc;
 
 icp_wq_create_failed:

+ 6 - 7
drivers/cam_icp/icp_hw/icp_hw_mgr/cam_icp_hw_mgr.h

@@ -373,7 +373,7 @@ struct cam_icp_hw_mgr {
 	struct cam_req_mgr_core_workq *timer_work;
 	uint32_t msg_buf[ICP_MSG_BUF_SIZE];
 	uint32_t dbg_buf[ICP_DBG_BUF_SIZE];
-	struct completion a5_complete;
+	struct completion icp_complete;
 	struct hfi_cmd_work_data *cmd_work_data;
 	struct hfi_msg_work_data *msg_work_data;
 	struct hfi_msg_work_data *timer_work_data;
@@ -381,21 +381,20 @@ struct cam_icp_hw_mgr {
 	uint32_t ipe_ctxt_cnt;
 	uint32_t bps_ctxt_cnt;
 	struct dentry *dentry;
-	bool a5_debug;
 	bool icp_pc_flag;
 	bool ipe_bps_pc_flag;
 	uint64_t icp_debug_clk;
 	uint64_t icp_default_clk;
 	struct cam_icp_clk_info clk_info[ICP_CLK_HW_MAX];
 	bool secure_mode;
-	bool a5_jtag_debug;
-	u64 a5_debug_type;
-	u64 a5_dbg_lvl;
-	u64 a5_fw_dump_lvl;
+	bool icp_jtag_debug;
+	u64 icp_debug_type;
+	u64 icp_dbg_lvl;
+	u64 icp_fw_dump_lvl;
 	bool ipe0_enable;
 	bool ipe1_enable;
 	bool bps_enable;
-	struct cam_hw_intf *a5_dev_intf;
+	struct cam_hw_intf *icp_dev_intf;
 	struct cam_hw_intf *ipe0_dev_intf;
 	struct cam_hw_intf *ipe1_dev_intf;
 	struct cam_hw_intf *bps_dev_intf;

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

@@ -12,25 +12,6 @@
 #include "cam_hw_mgr_intf.h"
 #include "cam_icp_hw_intf.h"
 
-enum cam_icp_a5_cmd_type {
-	CAM_ICP_A5_CMD_FW_DOWNLOAD,
-	CAM_ICP_A5_CMD_POWER_COLLAPSE,
-	CAM_ICP_A5_CMD_POWER_RESUME,
-	CAM_ICP_A5_CMD_SET_FW_BUF,
-	CAM_ICP_A5_CMD_ACQUIRE,
-	CAM_ICP_A5_SET_IRQ_CB,
-	CAM_ICP_A5_TEST_IRQ,
-	CAM_ICP_A5_SEND_INIT,
-	CAM_ICP_A5_CMD_VOTE_CPAS,
-	CAM_ICP_A5_CMD_CPAS_START,
-	CAM_ICP_A5_CMD_CPAS_STOP,
-	CAM_ICP_A5_CMD_UBWC_CFG,
-	CAM_ICP_A5_CMD_PC_PREP,
-	CAM_ICP_A5_CMD_CLK_UPDATE,
-	CAM_ICP_A5_CMD_HW_DUMP,
-	CAM_ICP_A5_CMD_MAX,
-};
-
 struct cam_icp_a5_set_fw_buf_info {
 	uint32_t iova;
 	uint64_t kva;
@@ -65,11 +46,6 @@ struct cam_icp_a5_acquire_dev {
 	uint32_t fw_handle;
 };
 
-struct cam_icp_a5_set_irq_cb {
-	int32_t (*icp_hw_mgr_cb)(uint32_t irq_status, void *data);
-	void *data;
-};
-
 struct cam_icp_a5_test_irq {
 	uint32_t test_irq;
 };

+ 28 - 4
drivers/cam_icp/icp_hw/icp_hw_mgr/include/cam_icp_hw_intf.h

@@ -1,6 +1,6 @@
 /* SPDX-License-Identifier: GPL-2.0-only */
 /*
- * Copyright (c) 2017-2019, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2017-2020, The Linux Foundation. All rights reserved.
  */
 
 #ifndef CAM_ICP_HW_INTF_H
@@ -13,15 +13,39 @@
 #define CAM_ICP_BW_CONFIG_V1      1
 #define CAM_ICP_BW_CONFIG_V2      2
 
-enum cam_a5_hw_type {
+enum cam_icp_hw_type {
 	CAM_ICP_DEV_A5,
 	CAM_ICP_DEV_IPE,
 	CAM_ICP_DEV_BPS,
 	CAM_ICP_DEV_MAX,
 };
 
+enum cam_icp_cmd_type {
+	CAM_ICP_CMD_FW_DOWNLOAD,
+	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,
+	CAM_ICP_CMD_CPAS_START,
+	CAM_ICP_CMD_CPAS_STOP,
+	CAM_ICP_CMD_UBWC_CFG,
+	CAM_ICP_CMD_PC_PREP,
+	CAM_ICP_CMD_CLK_UPDATE,
+	CAM_ICP_CMD_HW_DUMP,
+	CAM_ICP_CMD_MAX,
+};
+
+struct cam_icp_set_irq_cb {
+	int32_t (*icp_hw_mgr_cb)(uint32_t irq_status, void *data);
+	void *data;
+};
+
 /**
- * struct cam_a5_clk_update_cmd - Payload for hw manager command
+ * struct cam_icp_clk_update_cmd - Payload for hw manager command
  *
  * @curr_clk_rate:        clk rate to HW
  * @ipe_bps_pc_enable     power collpase enable flag
@@ -29,7 +53,7 @@ enum cam_a5_hw_type {
  *                        populated as output while the clk is being
  *                        updated to the given rate
  */
-struct cam_a5_clk_update_cmd {
+struct cam_icp_clk_update_cmd {
 	uint32_t  curr_clk_rate;
 	bool  ipe_bps_pc_enable;
 	int32_t clk_level;

+ 1 - 2
drivers/cam_icp/icp_hw/ipe_hw/ipe_core.c

@@ -404,8 +404,7 @@ int cam_ipe_process_cmd(void *device_priv, uint32_t cmd_type,
 		rc = cam_ipe_handle_resume(ipe_dev);
 		break;
 	case CAM_ICP_IPE_CMD_UPDATE_CLK: {
-		struct cam_a5_clk_update_cmd *clk_upd_cmd =
-			(struct cam_a5_clk_update_cmd *)cmd_args;
+		struct cam_icp_clk_update_cmd *clk_upd_cmd = cmd_args;
 		struct cam_ahb_vote ahb_vote;
 		uint32_t clk_rate = clk_upd_cmd->curr_clk_rate;
 		int32_t clk_level  = 0, err = 0;