media: atmel: atmel-isc: specialize dma cfg
The dma configuration (DCFG) is specific to the product. Move this configuration in the product specific driver, and add the field inside the driver struct. Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
This commit is contained in:
committed by
Mauro Carvalho Chehab
parent
f794bc16a5
commit
cd5af39467
@ -724,8 +724,7 @@ static int isc_configure(struct isc_device *isc)
|
|||||||
rlp_mode = isc->config.rlp_cfg_mode;
|
rlp_mode = isc->config.rlp_cfg_mode;
|
||||||
pipeline = isc->config.bits_pipeline;
|
pipeline = isc->config.bits_pipeline;
|
||||||
|
|
||||||
dcfg = isc->config.dcfg_imode |
|
dcfg = isc->config.dcfg_imode | isc->dcfg;
|
||||||
ISC_DCFG_YMBSIZE_BEATS8 | ISC_DCFG_CMBSIZE_BEATS8;
|
|
||||||
|
|
||||||
pfe_cfg0 |= subdev->pfe_cfg0 | ISC_PFE_CFG0_MODE_PROGRESSIVE;
|
pfe_cfg0 |= subdev->pfe_cfg0 | ISC_PFE_CFG0_MODE_PROGRESSIVE;
|
||||||
mask = ISC_PFE_CFG0_BPS_MASK | ISC_PFE_CFG0_HPOL_LOW |
|
mask = ISC_PFE_CFG0_BPS_MASK | ISC_PFE_CFG0_HPOL_LOW |
|
||||||
|
@ -150,6 +150,7 @@ struct isc_ctrls {
|
|||||||
* @hclock: Hclock clock input (refer datasheet)
|
* @hclock: Hclock clock input (refer datasheet)
|
||||||
* @ispck: iscpck clock (refer datasheet)
|
* @ispck: iscpck clock (refer datasheet)
|
||||||
* @isc_clks: ISC clocks
|
* @isc_clks: ISC clocks
|
||||||
|
* @dcfg: DMA master configuration, architecture dependent
|
||||||
*
|
*
|
||||||
* @dev: Registered device driver
|
* @dev: Registered device driver
|
||||||
* @v4l2_dev: v4l2 registered device
|
* @v4l2_dev: v4l2 registered device
|
||||||
@ -197,6 +198,7 @@ struct isc_device {
|
|||||||
struct clk *hclock;
|
struct clk *hclock;
|
||||||
struct clk *ispck;
|
struct clk *ispck;
|
||||||
struct isc_clk isc_clks[2];
|
struct isc_clk isc_clks[2];
|
||||||
|
u32 dcfg;
|
||||||
|
|
||||||
struct device *dev;
|
struct device *dev;
|
||||||
struct v4l2_device v4l2_dev;
|
struct v4l2_device v4l2_dev;
|
||||||
|
@ -198,6 +198,9 @@ static int atmel_isc_probe(struct platform_device *pdev)
|
|||||||
isc->max_width = ISC_SAMA5D2_MAX_SUPPORT_WIDTH;
|
isc->max_width = ISC_SAMA5D2_MAX_SUPPORT_WIDTH;
|
||||||
isc->max_height = ISC_SAMA5D2_MAX_SUPPORT_HEIGHT;
|
isc->max_height = ISC_SAMA5D2_MAX_SUPPORT_HEIGHT;
|
||||||
|
|
||||||
|
/* sama5d2-isc - 8 bits per beat */
|
||||||
|
isc->dcfg = ISC_DCFG_YMBSIZE_BEATS8 | ISC_DCFG_CMBSIZE_BEATS8;
|
||||||
|
|
||||||
ret = isc_pipeline_init(isc);
|
ret = isc_pipeline_init(isc);
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
Reference in New Issue
Block a user