struct fimc_is_core *core;
struct fimc_is_device_sensor *device;
void *pdata;
+ enum subdev_ch_mode scm;
FIMC_BUG(!pdev);
/* DMA abstraction */
device->dma_abstract = device->pdata->dma_abstract;
- device->ssvc0.dma_ch[SCM_WO_PAF_HW] = device->pdata->dma_ch[0];
- device->ssvc1.dma_ch[SCM_WO_PAF_HW] = device->pdata->dma_ch[1];
- device->ssvc2.dma_ch[SCM_WO_PAF_HW] = device->pdata->dma_ch[2];
- device->ssvc3.dma_ch[SCM_WO_PAF_HW] = device->pdata->dma_ch[3];
-
- device->ssvc0.dma_ch[SCM_W_PAF_HW] = device->pdata->dma_ch[4];
- device->ssvc1.dma_ch[SCM_W_PAF_HW] = device->pdata->dma_ch[5];
- device->ssvc2.dma_ch[SCM_W_PAF_HW] = device->pdata->dma_ch[6];
- device->ssvc3.dma_ch[SCM_W_PAF_HW] = device->pdata->dma_ch[7];
-
- /* VC abstraction */
- device->ssvc0.vc_ch[SCM_WO_PAF_HW] = device->pdata->vc_ch[0];
- device->ssvc1.vc_ch[SCM_WO_PAF_HW] = device->pdata->vc_ch[1];
- device->ssvc2.vc_ch[SCM_WO_PAF_HW] = device->pdata->vc_ch[2];
- device->ssvc3.vc_ch[SCM_WO_PAF_HW] = device->pdata->vc_ch[3];
-
- device->ssvc0.vc_ch[SCM_W_PAF_HW] = device->pdata->vc_ch[4];
- device->ssvc1.vc_ch[SCM_W_PAF_HW] = device->pdata->vc_ch[5];
- device->ssvc2.vc_ch[SCM_W_PAF_HW] = device->pdata->vc_ch[6];
- device->ssvc3.vc_ch[SCM_W_PAF_HW] = device->pdata->vc_ch[7];
+ if (device->dma_abstract) {
+ for (scm = SCM_WO_PAF_HW;
+ (scm < device->pdata->num_of_ch_mode) && (scm < SCM_MAX); scm++) {
+ /* DMA abstraction */
+ device->ssvc0.dma_ch[scm]
+ = device->pdata->dma_ch[(scm * CSI_VIRTUAL_CH_MAX) + CSI_VIRTUAL_CH_0];
+ device->ssvc1.dma_ch[scm]
+ = device->pdata->dma_ch[(scm * CSI_VIRTUAL_CH_MAX) + CSI_VIRTUAL_CH_1];
+ device->ssvc2.dma_ch[scm]
+ = device->pdata->dma_ch[(scm * CSI_VIRTUAL_CH_MAX) + CSI_VIRTUAL_CH_2];
+ device->ssvc3.dma_ch[scm]
+ = device->pdata->dma_ch[(scm * CSI_VIRTUAL_CH_MAX) + CSI_VIRTUAL_CH_3];
+
+ /* VC abstraction */
+ device->ssvc0.vc_ch[scm]
+ = device->pdata->vc_ch[(scm * CSI_VIRTUAL_CH_MAX) + CSI_VIRTUAL_CH_0];
+ device->ssvc1.vc_ch[scm]
+ = device->pdata->vc_ch[(scm * CSI_VIRTUAL_CH_MAX) + CSI_VIRTUAL_CH_1];
+ device->ssvc2.vc_ch[scm]
+ = device->pdata->vc_ch[(scm * CSI_VIRTUAL_CH_MAX) + CSI_VIRTUAL_CH_2];
+ device->ssvc3.vc_ch[scm]
+ = device->pdata->vc_ch[(scm * CSI_VIRTUAL_CH_MAX) + CSI_VIRTUAL_CH_3];
+ }
+ }
set_bit(FIMC_IS_SENSOR_PROBE, &device->state);