Logo Search packages:      
Sourcecode: linux-fsl-imx51 version File versions  Download package

int _ipu_csi_init ( ipu_channel_t  channel,
uint32_t  csi 
)

_ipu_csi_init

Parameters:
channel IDMAC channel
csi csi 0 or csi 1
Returns:
Returns 0 on success or negative error code on fail

Definition at line 684 of file ipu_capture.c.

{
      uint32_t csi_sens_conf, csi_dest;
      int retval = 0;

      switch (channel) {
      case CSI_MEM0:
      case CSI_MEM1:
      case CSI_MEM2:
      case CSI_MEM3:
            csi_dest = CSI_DATA_DEST_IDMAC;
            break;
      case CSI_PRP_ENC_MEM:
      case CSI_PRP_VF_MEM:
            csi_dest = CSI_DATA_DEST_IC;
            break;
      default:
            retval = -EINVAL;
            goto err;
      }

      csi_sens_conf = __raw_readl(CSI_SENS_CONF(csi));
      csi_sens_conf &= ~CSI_SENS_CONF_DATA_DEST_MASK;
      __raw_writel(csi_sens_conf | (csi_dest <<
            CSI_SENS_CONF_DATA_DEST_SHIFT), CSI_SENS_CONF(csi));
err:
      return retval;
}


Generated by  Doxygen 1.6.0   Back to index