struct fimc_is_device_csi {
/* channel information */
u32 instance;
- u32 num_of_scm;
enum subdev_ch_mode scm;
u32 __iomem *base_reg;
u32 __iomem *vc_reg[SCM_MAX][CSI_VIRTUAL_CH_MAX];
unsigned long vc_irq_state;
/* csi common dma */
- struct fimc_is_device_csi_dma *csi_dma;
+ struct fimc_is_device_csi_dma *csi_dma;
/* for settle time */
struct fimc_is_sensor_cfg *sensor_cfg;
else
csi->scm = SCM_W_PAF_HW;
- if (csi->scm >= csi->num_of_scm) {
+ if (csi->scm >= device->num_of_ch_mode) {
merr("invalid sub-device channel mode(%d/%d)", csi,
- csi->scm, csi->num_of_scm);
+ csi->scm, device->num_of_ch_mode);
return -EINVAL;
}
u32 sensor_width;
u32 sensor_height;
+ int num_of_ch_mode;
bool dma_abstract;
u32 use_standby;
u32 sstream;
/* DMA abstraction */
device->dma_abstract = device->pdata->dma_abstract;
if (device->dma_abstract) {
+ device->num_of_ch_mode = device->pdata->num_of_ch_mode;
+
for (scm = SCM_WO_PAF_HW;
- (scm < device->pdata->num_of_ch_mode) && (scm < SCM_MAX); scm++) {
+ (scm < device->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];