@@ -362,6 +362,23 @@ int ispccdc_lsc_wait_prefetch(struct isp_device *isp)
return -ETIMEDOUT;
}
+int isp_sbl_busy(struct isp_device *isp, enum isp_sbl_resource res)
+{
+ int ret = 0;
+
+ if (res & OMAP3_ISP_SBL_CCDC_WRITE) {
+ ret |= (isp_reg_readl(isp, OMAP3_ISP_IOMEM_SBL, ISPSBL_CCDC_WR_0) &
+ ISPSBL_CCDC_WR_0_DATA_READY)
+ | (isp_reg_readl(isp, OMAP3_ISP_IOMEM_SBL, ISPSBL_CCDC_WR_1) &
+ ISPSBL_CCDC_WR_0_DATA_READY)
+ | (isp_reg_readl(isp, OMAP3_ISP_IOMEM_SBL, ISPSBL_CCDC_WR_2) &
+ ISPSBL_CCDC_WR_0_DATA_READY)
+ | (isp_reg_readl(isp, OMAP3_ISP_IOMEM_SBL, ISPSBL_CCDC_WR_3) &
+ ISPSBL_CCDC_WR_0_DATA_READY);
+ }
+
+ return ret;
+}
static inline void isp_isr_dbg(struct isp_device *isp, u32 irqstatus)
{
@@ -282,6 +282,8 @@ void isphist_dma_done(struct isp_device *isp);
int ispccdc_lsc_wait_prefetch(struct isp_device *isp);
+int isp_sbl_busy(struct isp_device *isp, enum isp_sbl_resource res);
+
void isp_flush(struct isp_device *isp);
int isp_pipeline_set_stream(struct isp_pipeline *pipe,
@@ -1217,15 +1217,7 @@ static int ispccdc_sbl_busy(struct isp_ccdc_device *ccdc)
{
struct isp_device *isp = to_isp_device(ccdc);
- return ispccdc_busy(ccdc)
- | (isp_reg_readl(isp, OMAP3_ISP_IOMEM_SBL, ISPSBL_CCDC_WR_0) &
- ISPSBL_CCDC_WR_0_DATA_READY)
- | (isp_reg_readl(isp, OMAP3_ISP_IOMEM_SBL, ISPSBL_CCDC_WR_1) &
- ISPSBL_CCDC_WR_0_DATA_READY)
- | (isp_reg_readl(isp, OMAP3_ISP_IOMEM_SBL, ISPSBL_CCDC_WR_2) &
- ISPSBL_CCDC_WR_0_DATA_READY)
- | (isp_reg_readl(isp, OMAP3_ISP_IOMEM_SBL, ISPSBL_CCDC_WR_3) &
- ISPSBL_CCDC_WR_0_DATA_READY);
+ return ispccdc_busy(ccdc) | isp_sbl_busy(isp, OMAP3_ISP_SBL_CCDC_WRITE);
}
/*