|
@@ -23,8 +23,7 @@
|
|
|
#include "cam_cpas_api.h"
|
|
|
#include "cam_debug_util.h"
|
|
|
#include "hfi_reg.h"
|
|
|
-
|
|
|
-#define HFI_MAX_POLL_TRY 5
|
|
|
+#include "cam_common_util.h"
|
|
|
|
|
|
static int cam_ipe_cpas_vote(struct cam_ipe_device_core_info *core_info,
|
|
|
struct cam_icp_cpas_vote *cpas_vote)
|
|
@@ -288,13 +287,13 @@ static int cam_ipe_cmd_reset(struct cam_hw_soc_info *soc_info,
|
|
|
cam_io_w_mb(hw_info->cdm_rst_val,
|
|
|
soc_info->reg_map[0].mem_base + hw_info->cdm_rst_cmd);
|
|
|
while (retry_cnt < HFI_MAX_POLL_TRY) {
|
|
|
- readw_poll_timeout((soc_info->reg_map[0].mem_base +
|
|
|
+ cam_common_read_poll_timeout((soc_info->reg_map[0].mem_base +
|
|
|
hw_info->cdm_irq_status),
|
|
|
- status, ((status & IPE_RST_DONE_IRQ_STATUS_BIT) == 0x1),
|
|
|
- 100, 10000);
|
|
|
+ PC_POLL_DELAY_US, PC_POLL_TIMEOUT_US,
|
|
|
+ IPE_RST_DONE_IRQ_STATUS_BIT, IPE_RST_DONE_IRQ_STATUS_BIT,
|
|
|
+ &status);
|
|
|
|
|
|
CAM_DBG(CAM_HFI, "ipe_cdm_irq_status = %u", status);
|
|
|
-
|
|
|
if ((status & IPE_RST_DONE_IRQ_STATUS_BIT) == 0x1)
|
|
|
break;
|
|
|
retry_cnt++;
|
|
@@ -311,14 +310,14 @@ static int cam_ipe_cmd_reset(struct cam_hw_soc_info *soc_info,
|
|
|
cam_io_w_mb((uint32_t)0x3,
|
|
|
soc_info->reg_map[0].mem_base + hw_info->top_rst_cmd);
|
|
|
while (retry_cnt < HFI_MAX_POLL_TRY) {
|
|
|
- readw_poll_timeout((soc_info->reg_map[0].mem_base +
|
|
|
+ cam_common_read_poll_timeout((soc_info->reg_map[0].mem_base +
|
|
|
hw_info->top_irq_status),
|
|
|
- status, ((status & IPE_RST_DONE_IRQ_STATUS_BIT) == 0x1),
|
|
|
- 100, 10000);
|
|
|
+ PC_POLL_DELAY_US, PC_POLL_TIMEOUT_US,
|
|
|
+ IPE_RST_DONE_IRQ_STATUS_BIT, IPE_RST_DONE_IRQ_STATUS_BIT,
|
|
|
+ &status);
|
|
|
|
|
|
CAM_DBG(CAM_HFI, "ipe_top_irq_status = %u", status);
|
|
|
|
|
|
-
|
|
|
if ((status & IPE_RST_DONE_IRQ_STATUS_BIT) == 0x1)
|
|
|
break;
|
|
|
retry_cnt++;
|