opensbi: bump to 1.4
[openwrt/openwrt.git] / target / linux / at91 / patches-5.10 / 161-media-atmel-atmel-isc-specialize-dma-cfg.patch
1 From c42305f52560a1be6fc25a2f23579c7b323de654 Mon Sep 17 00:00:00 2001
2 From: Eugen Hristev <eugen.hristev@microchip.com>
3 Date: Tue, 13 Apr 2021 12:57:03 +0200
4 Subject: [PATCH 161/247] media: atmel: atmel-isc: specialize dma cfg
5
6 The dma configuration (DCFG) is specific to the product.
7 Move this configuration in the product specific driver, and add the
8 field inside the driver struct.
9
10 Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
11 Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
12 Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
13 ---
14 drivers/media/platform/atmel/atmel-isc-base.c | 3 +--
15 drivers/media/platform/atmel/atmel-isc.h | 2 ++
16 drivers/media/platform/atmel/atmel-sama5d2-isc.c | 3 +++
17 3 files changed, 6 insertions(+), 2 deletions(-)
18
19 --- a/drivers/media/platform/atmel/atmel-isc-base.c
20 +++ b/drivers/media/platform/atmel/atmel-isc-base.c
21 @@ -724,8 +724,7 @@ static int isc_configure(struct isc_devi
22 rlp_mode = isc->config.rlp_cfg_mode;
23 pipeline = isc->config.bits_pipeline;
24
25 - dcfg = isc->config.dcfg_imode |
26 - ISC_DCFG_YMBSIZE_BEATS8 | ISC_DCFG_CMBSIZE_BEATS8;
27 + dcfg = isc->config.dcfg_imode | isc->dcfg;
28
29 pfe_cfg0 |= subdev->pfe_cfg0 | ISC_PFE_CFG0_MODE_PROGRESSIVE;
30 mask = ISC_PFE_CFG0_BPS_MASK | ISC_PFE_CFG0_HPOL_LOW |
31 --- a/drivers/media/platform/atmel/atmel-isc.h
32 +++ b/drivers/media/platform/atmel/atmel-isc.h
33 @@ -149,6 +149,7 @@ struct isc_ctrls {
34 * @hclock: Hclock clock input (refer datasheet)
35 * @ispck: iscpck clock (refer datasheet)
36 * @isc_clks: ISC clocks
37 + * @dcfg: DMA master configuration, architecture dependent
38 *
39 * @dev: Registered device driver
40 * @v4l2_dev: v4l2 registered device
41 @@ -196,6 +197,7 @@ struct isc_device {
42 struct clk *hclock;
43 struct clk *ispck;
44 struct isc_clk isc_clks[2];
45 + u32 dcfg;
46
47 struct device *dev;
48 struct v4l2_device v4l2_dev;
49 --- a/drivers/media/platform/atmel/atmel-sama5d2-isc.c
50 +++ b/drivers/media/platform/atmel/atmel-sama5d2-isc.c
51 @@ -219,6 +219,9 @@ static int atmel_isc_probe(struct platfo
52 isc->max_width = ISC_SAMA5D2_MAX_SUPPORT_WIDTH;
53 isc->max_height = ISC_SAMA5D2_MAX_SUPPORT_HEIGHT;
54
55 + /* sama5d2-isc - 8 bits per beat */
56 + isc->dcfg = ISC_DCFG_YMBSIZE_BEATS8 | ISC_DCFG_CMBSIZE_BEATS8;
57 +
58 ret = isc_pipeline_init(isc);
59 if (ret)
60 return ret;