162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */
262306a36Sopenharmony_ci/*
362306a36Sopenharmony_ci * Register definition file for s3c24xx/s3c64xx SoC CAMIF driver
462306a36Sopenharmony_ci *
562306a36Sopenharmony_ci * Copyright (C) 2012 Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
662306a36Sopenharmony_ci * Copyright (C) 2012 Tomasz Figa <tomasz.figa@gmail.com>
762306a36Sopenharmony_ci*/
862306a36Sopenharmony_ci
962306a36Sopenharmony_ci#ifndef CAMIF_REGS_H_
1062306a36Sopenharmony_ci#define CAMIF_REGS_H_
1162306a36Sopenharmony_ci
1262306a36Sopenharmony_ci#include <linux/bitops.h>
1362306a36Sopenharmony_ci
1462306a36Sopenharmony_ci#include "camif-core.h"
1562306a36Sopenharmony_ci#include <media/drv-intf/s3c_camif.h>
1662306a36Sopenharmony_ci
1762306a36Sopenharmony_ci/*
1862306a36Sopenharmony_ci * The id argument indicates the processing path:
1962306a36Sopenharmony_ci * id = 0 - codec (FIMC C), 1 - preview (FIMC P).
2062306a36Sopenharmony_ci */
2162306a36Sopenharmony_ci
2262306a36Sopenharmony_ci/* Camera input format */
2362306a36Sopenharmony_ci#define S3C_CAMIF_REG_CISRCFMT			0x00
2462306a36Sopenharmony_ci#define  CISRCFMT_ITU601_8BIT			BIT(31)
2562306a36Sopenharmony_ci#define  CISRCFMT_ITU656_8BIT			(0 << 31)
2662306a36Sopenharmony_ci#define  CISRCFMT_ORDER422_YCBYCR		(0 << 14)
2762306a36Sopenharmony_ci#define  CISRCFMT_ORDER422_YCRYCB		(1 << 14)
2862306a36Sopenharmony_ci#define  CISRCFMT_ORDER422_CBYCRY		(2 << 14)
2962306a36Sopenharmony_ci#define  CISRCFMT_ORDER422_CRYCBY		(3 << 14)
3062306a36Sopenharmony_ci#define  CISRCFMT_ORDER422_MASK			(3 << 14)
3162306a36Sopenharmony_ci#define  CISRCFMT_SIZE_CAM_MASK			(0x1fff << 16 | 0x1fff)
3262306a36Sopenharmony_ci
3362306a36Sopenharmony_ci/* Window offset */
3462306a36Sopenharmony_ci#define S3C_CAMIF_REG_CIWDOFST			0x04
3562306a36Sopenharmony_ci#define  CIWDOFST_WINOFSEN			BIT(31)
3662306a36Sopenharmony_ci#define  CIWDOFST_CLROVCOFIY			BIT(30)
3762306a36Sopenharmony_ci#define  CIWDOFST_CLROVRLB_PR			BIT(28)
3862306a36Sopenharmony_ci/* #define  CIWDOFST_CLROVPRFIY			BIT(27) */
3962306a36Sopenharmony_ci#define  CIWDOFST_CLROVCOFICB			BIT(15)
4062306a36Sopenharmony_ci#define  CIWDOFST_CLROVCOFICR			BIT(14)
4162306a36Sopenharmony_ci#define  CIWDOFST_CLROVPRFICB			BIT(13)
4262306a36Sopenharmony_ci#define  CIWDOFST_CLROVPRFICR			BIT(12)
4362306a36Sopenharmony_ci#define  CIWDOFST_OFST_MASK			(0x7ff << 16 | 0x7ff)
4462306a36Sopenharmony_ci
4562306a36Sopenharmony_ci/* Window offset 2 */
4662306a36Sopenharmony_ci#define S3C_CAMIF_REG_CIWDOFST2			0x14
4762306a36Sopenharmony_ci#define  CIWDOFST2_OFST2_MASK			(0xfff << 16 | 0xfff)
4862306a36Sopenharmony_ci
4962306a36Sopenharmony_ci/* Global control */
5062306a36Sopenharmony_ci#define S3C_CAMIF_REG_CIGCTRL			0x08
5162306a36Sopenharmony_ci#define  CIGCTRL_SWRST				BIT(31)
5262306a36Sopenharmony_ci#define  CIGCTRL_CAMRST				BIT(30)
5362306a36Sopenharmony_ci#define  CIGCTRL_TESTPATTERN_NORMAL		(0 << 27)
5462306a36Sopenharmony_ci#define  CIGCTRL_TESTPATTERN_COLOR_BAR		(1 << 27)
5562306a36Sopenharmony_ci#define  CIGCTRL_TESTPATTERN_HOR_INC		(2 << 27)
5662306a36Sopenharmony_ci#define  CIGCTRL_TESTPATTERN_VER_INC		(3 << 27)
5762306a36Sopenharmony_ci#define  CIGCTRL_TESTPATTERN_MASK		(3 << 27)
5862306a36Sopenharmony_ci#define  CIGCTRL_INVPOLPCLK			BIT(26)
5962306a36Sopenharmony_ci#define  CIGCTRL_INVPOLVSYNC			BIT(25)
6062306a36Sopenharmony_ci#define  CIGCTRL_INVPOLHREF			BIT(24)
6162306a36Sopenharmony_ci#define  CIGCTRL_IRQ_OVFEN			BIT(22)
6262306a36Sopenharmony_ci#define  CIGCTRL_HREF_MASK			BIT(21)
6362306a36Sopenharmony_ci#define  CIGCTRL_IRQ_LEVEL			BIT(20)
6462306a36Sopenharmony_ci/* IRQ_CLR_C, IRQ_CLR_P */
6562306a36Sopenharmony_ci#define  CIGCTRL_IRQ_CLR(id)			BIT(19 - (id))
6662306a36Sopenharmony_ci#define  CIGCTRL_FIELDMODE			BIT(2)
6762306a36Sopenharmony_ci#define  CIGCTRL_INVPOLFIELD			BIT(1)
6862306a36Sopenharmony_ci#define  CIGCTRL_CAM_INTERLACE			BIT(0)
6962306a36Sopenharmony_ci
7062306a36Sopenharmony_ci/* Y DMA output frame start address. n = 0..3. */
7162306a36Sopenharmony_ci#define S3C_CAMIF_REG_CIYSA(id, n)		(0x18 + (id) * 0x54 + (n) * 4)
7262306a36Sopenharmony_ci/* Cb plane output DMA start address. n = 0..3. Only codec path. */
7362306a36Sopenharmony_ci#define S3C_CAMIF_REG_CICBSA(id, n)		(0x28 + (id) * 0x54 + (n) * 4)
7462306a36Sopenharmony_ci/* Cr plane output DMA start address. n = 0..3. Only codec path. */
7562306a36Sopenharmony_ci#define S3C_CAMIF_REG_CICRSA(id, n)		(0x38 + (id) * 0x54 + (n) * 4)
7662306a36Sopenharmony_ci
7762306a36Sopenharmony_ci/* CICOTRGFMT, CIPRTRGFMT - Target format */
7862306a36Sopenharmony_ci#define S3C_CAMIF_REG_CITRGFMT(id, _offs)	(0x48 + (id) * (0x34 + (_offs)))
7962306a36Sopenharmony_ci#define  CITRGFMT_IN422				BIT(31) /* only for s3c24xx */
8062306a36Sopenharmony_ci#define  CITRGFMT_OUT422			BIT(30) /* only for s3c24xx */
8162306a36Sopenharmony_ci#define  CITRGFMT_OUTFORMAT_YCBCR420		(0 << 29) /* only for s3c6410 */
8262306a36Sopenharmony_ci#define  CITRGFMT_OUTFORMAT_YCBCR422		(1 << 29) /* only for s3c6410 */
8362306a36Sopenharmony_ci#define  CITRGFMT_OUTFORMAT_YCBCR422I		(2 << 29) /* only for s3c6410 */
8462306a36Sopenharmony_ci#define  CITRGFMT_OUTFORMAT_RGB			(3 << 29) /* only for s3c6410 */
8562306a36Sopenharmony_ci#define  CITRGFMT_OUTFORMAT_MASK		(3 << 29) /* only for s3c6410 */
8662306a36Sopenharmony_ci#define  CITRGFMT_TARGETHSIZE(x)		((x) << 16)
8762306a36Sopenharmony_ci#define  CITRGFMT_FLIP_NORMAL			(0 << 14)
8862306a36Sopenharmony_ci#define  CITRGFMT_FLIP_X_MIRROR			(1 << 14)
8962306a36Sopenharmony_ci#define  CITRGFMT_FLIP_Y_MIRROR			(2 << 14)
9062306a36Sopenharmony_ci#define  CITRGFMT_FLIP_180			(3 << 14)
9162306a36Sopenharmony_ci#define  CITRGFMT_FLIP_MASK			(3 << 14)
9262306a36Sopenharmony_ci/* Preview path only */
9362306a36Sopenharmony_ci#define  CITRGFMT_ROT90_PR			BIT(13)
9462306a36Sopenharmony_ci#define  CITRGFMT_TARGETVSIZE(x)		((x) << 0)
9562306a36Sopenharmony_ci#define  CITRGFMT_TARGETSIZE_MASK		((0x1fff << 16) | 0x1fff)
9662306a36Sopenharmony_ci
9762306a36Sopenharmony_ci/* CICOCTRL, CIPRCTRL. Output DMA control. */
9862306a36Sopenharmony_ci#define S3C_CAMIF_REG_CICTRL(id, _offs)		(0x4c + (id) * (0x34 + (_offs)))
9962306a36Sopenharmony_ci#define  CICTRL_BURST_MASK			(0xfffff << 4)
10062306a36Sopenharmony_ci/* xBURSTn - 5-bits width */
10162306a36Sopenharmony_ci#define  CICTRL_YBURST1(x)			((x) << 19)
10262306a36Sopenharmony_ci#define  CICTRL_YBURST2(x)			((x) << 14)
10362306a36Sopenharmony_ci#define  CICTRL_RGBBURST1(x)			((x) << 19)
10462306a36Sopenharmony_ci#define  CICTRL_RGBBURST2(x)			((x) << 14)
10562306a36Sopenharmony_ci#define  CICTRL_CBURST1(x)			((x) << 9)
10662306a36Sopenharmony_ci#define  CICTRL_CBURST2(x)			((x) << 4)
10762306a36Sopenharmony_ci#define  CICTRL_LASTIRQ_ENABLE			BIT(2)
10862306a36Sopenharmony_ci#define  CICTRL_ORDER422_MASK			(3 << 0)
10962306a36Sopenharmony_ci
11062306a36Sopenharmony_ci/* CICOSCPRERATIO, CIPRSCPRERATIO. Pre-scaler control 1. */
11162306a36Sopenharmony_ci#define S3C_CAMIF_REG_CISCPRERATIO(id, _offs)	(0x50 + (id) * (0x34 + (_offs)))
11262306a36Sopenharmony_ci
11362306a36Sopenharmony_ci/* CICOSCPREDST, CIPRSCPREDST. Pre-scaler control 2. */
11462306a36Sopenharmony_ci#define S3C_CAMIF_REG_CISCPREDST(id, _offs)	(0x54 + (id) * (0x34 + (_offs)))
11562306a36Sopenharmony_ci
11662306a36Sopenharmony_ci/* CICOSCCTRL, CIPRSCCTRL. Main scaler control. */
11762306a36Sopenharmony_ci#define S3C_CAMIF_REG_CISCCTRL(id, _offs)	(0x58 + (id) * (0x34 + (_offs)))
11862306a36Sopenharmony_ci#define  CISCCTRL_SCALERBYPASS			BIT(31)
11962306a36Sopenharmony_ci/* s3c244x preview path only, s3c64xx both */
12062306a36Sopenharmony_ci#define  CIPRSCCTRL_SAMPLE			BIT(31)
12162306a36Sopenharmony_ci/* 0 - 16-bit RGB, 1 - 24-bit RGB */
12262306a36Sopenharmony_ci#define  CIPRSCCTRL_RGB_FORMAT_24BIT		BIT(30) /* only for s3c244x */
12362306a36Sopenharmony_ci#define  CIPRSCCTRL_SCALEUP_H			BIT(29) /* only for s3c244x */
12462306a36Sopenharmony_ci#define  CIPRSCCTRL_SCALEUP_V			BIT(28) /* only for s3c244x */
12562306a36Sopenharmony_ci/* s3c64xx */
12662306a36Sopenharmony_ci#define  CISCCTRL_SCALEUP_H			BIT(30)
12762306a36Sopenharmony_ci#define  CISCCTRL_SCALEUP_V			BIT(29)
12862306a36Sopenharmony_ci#define  CISCCTRL_SCALEUP_MASK			(0x3 << 29)
12962306a36Sopenharmony_ci#define  CISCCTRL_CSCR2Y_WIDE			BIT(28)
13062306a36Sopenharmony_ci#define  CISCCTRL_CSCY2R_WIDE			BIT(27)
13162306a36Sopenharmony_ci#define  CISCCTRL_LCDPATHEN_FIFO		BIT(26)
13262306a36Sopenharmony_ci#define  CISCCTRL_INTERLACE			BIT(25)
13362306a36Sopenharmony_ci#define  CISCCTRL_SCALERSTART			BIT(15)
13462306a36Sopenharmony_ci#define  CISCCTRL_INRGB_FMT_RGB565		(0 << 13)
13562306a36Sopenharmony_ci#define  CISCCTRL_INRGB_FMT_RGB666		(1 << 13)
13662306a36Sopenharmony_ci#define  CISCCTRL_INRGB_FMT_RGB888		(2 << 13)
13762306a36Sopenharmony_ci#define  CISCCTRL_INRGB_FMT_MASK		(3 << 13)
13862306a36Sopenharmony_ci#define  CISCCTRL_OUTRGB_FMT_RGB565		(0 << 11)
13962306a36Sopenharmony_ci#define  CISCCTRL_OUTRGB_FMT_RGB666		(1 << 11)
14062306a36Sopenharmony_ci#define  CISCCTRL_OUTRGB_FMT_RGB888		(2 << 11)
14162306a36Sopenharmony_ci#define  CISCCTRL_OUTRGB_FMT_MASK		(3 << 11)
14262306a36Sopenharmony_ci#define  CISCCTRL_EXTRGB_EXTENSION		BIT(10)
14362306a36Sopenharmony_ci#define  CISCCTRL_ONE2ONE			BIT(9)
14462306a36Sopenharmony_ci#define  CISCCTRL_MAIN_RATIO_MASK		(0x1ff << 16 | 0x1ff)
14562306a36Sopenharmony_ci
14662306a36Sopenharmony_ci/* CICOTAREA, CIPRTAREA. Target area for DMA (Hsize x Vsize). */
14762306a36Sopenharmony_ci#define S3C_CAMIF_REG_CITAREA(id, _offs)	(0x5c + (id) * (0x34 + (_offs)))
14862306a36Sopenharmony_ci#define CITAREA_MASK				0xfffffff
14962306a36Sopenharmony_ci
15062306a36Sopenharmony_ci/* Codec (id = 0) or preview (id = 1) path status. */
15162306a36Sopenharmony_ci#define S3C_CAMIF_REG_CISTATUS(id, _offs)	(0x64 + (id) * (0x34 + (_offs)))
15262306a36Sopenharmony_ci#define  CISTATUS_OVFIY_STATUS			BIT(31)
15362306a36Sopenharmony_ci#define  CISTATUS_OVFICB_STATUS			BIT(30)
15462306a36Sopenharmony_ci#define  CISTATUS_OVFICR_STATUS			BIT(29)
15562306a36Sopenharmony_ci#define  CISTATUS_OVF_MASK			(0x7 << 29)
15662306a36Sopenharmony_ci#define  CIPRSTATUS_OVF_MASK			(0x3 << 30)
15762306a36Sopenharmony_ci#define  CISTATUS_VSYNC_STATUS			BIT(28)
15862306a36Sopenharmony_ci#define  CISTATUS_FRAMECNT_MASK			(3 << 26)
15962306a36Sopenharmony_ci#define  CISTATUS_FRAMECNT(__reg)		(((__reg) >> 26) & 0x3)
16062306a36Sopenharmony_ci#define  CISTATUS_WINOFSTEN_STATUS		BIT(25)
16162306a36Sopenharmony_ci#define  CISTATUS_IMGCPTEN_STATUS		BIT(22)
16262306a36Sopenharmony_ci#define  CISTATUS_IMGCPTENSC_STATUS		BIT(21)
16362306a36Sopenharmony_ci#define  CISTATUS_VSYNC_A_STATUS		BIT(20)
16462306a36Sopenharmony_ci#define  CISTATUS_FRAMEEND_STATUS		BIT(19) /* 17 on s3c64xx */
16562306a36Sopenharmony_ci
16662306a36Sopenharmony_ci/* Image capture enable */
16762306a36Sopenharmony_ci#define S3C_CAMIF_REG_CIIMGCPT(_offs)		(0xa0 + (_offs))
16862306a36Sopenharmony_ci#define  CIIMGCPT_IMGCPTEN			BIT(31)
16962306a36Sopenharmony_ci#define  CIIMGCPT_IMGCPTEN_SC(id)		BIT(30 - (id))
17062306a36Sopenharmony_ci/* Frame control: 1 - one-shot, 0 - free run */
17162306a36Sopenharmony_ci#define  CIIMGCPT_CPT_FREN_ENABLE(id)		BIT(25 - (id))
17262306a36Sopenharmony_ci#define  CIIMGCPT_CPT_FRMOD_ENABLE		(0 << 18)
17362306a36Sopenharmony_ci#define  CIIMGCPT_CPT_FRMOD_CNT			BIT(18)
17462306a36Sopenharmony_ci
17562306a36Sopenharmony_ci/* Capture sequence */
17662306a36Sopenharmony_ci#define S3C_CAMIF_REG_CICPTSEQ			0xc4
17762306a36Sopenharmony_ci
17862306a36Sopenharmony_ci/* Image effects */
17962306a36Sopenharmony_ci#define S3C_CAMIF_REG_CIIMGEFF(_offs)		(0xb0 + (_offs))
18062306a36Sopenharmony_ci#define  CIIMGEFF_IE_ENABLE(id)			BIT(30 + (id))
18162306a36Sopenharmony_ci#define  CIIMGEFF_IE_ENABLE_MASK		(3 << 30)
18262306a36Sopenharmony_ci/* Image effect: 1 - after scaler, 0 - before scaler */
18362306a36Sopenharmony_ci#define  CIIMGEFF_IE_AFTER_SC			BIT(29)
18462306a36Sopenharmony_ci#define  CIIMGEFF_FIN_MASK			(7 << 26)
18562306a36Sopenharmony_ci#define  CIIMGEFF_FIN_BYPASS			(0 << 26)
18662306a36Sopenharmony_ci#define  CIIMGEFF_FIN_ARBITRARY			(1 << 26)
18762306a36Sopenharmony_ci#define  CIIMGEFF_FIN_NEGATIVE			(2 << 26)
18862306a36Sopenharmony_ci#define  CIIMGEFF_FIN_ARTFREEZE			(3 << 26)
18962306a36Sopenharmony_ci#define  CIIMGEFF_FIN_EMBOSSING			(4 << 26)
19062306a36Sopenharmony_ci#define  CIIMGEFF_FIN_SILHOUETTE		(5 << 26)
19162306a36Sopenharmony_ci#define  CIIMGEFF_PAT_CBCR_MASK			((0xff << 13) | 0xff)
19262306a36Sopenharmony_ci#define  CIIMGEFF_PAT_CB(x)			((x) << 13)
19362306a36Sopenharmony_ci#define  CIIMGEFF_PAT_CR(x)			(x)
19462306a36Sopenharmony_ci
19562306a36Sopenharmony_ci/* MSCOY0SA, MSPRY0SA. Y/Cb/Cr frame start address for input DMA. */
19662306a36Sopenharmony_ci#define S3C_CAMIF_REG_MSY0SA(id)		(0xd4 + ((id) * 0x2c))
19762306a36Sopenharmony_ci#define S3C_CAMIF_REG_MSCB0SA(id)		(0xd8 + ((id) * 0x2c))
19862306a36Sopenharmony_ci#define S3C_CAMIF_REG_MSCR0SA(id)		(0xdc + ((id) * 0x2c))
19962306a36Sopenharmony_ci
20062306a36Sopenharmony_ci/* MSCOY0END, MSCOY0END. Y/Cb/Cr frame end address for input DMA. */
20162306a36Sopenharmony_ci#define S3C_CAMIF_REG_MSY0END(id)		(0xe0 + ((id) * 0x2c))
20262306a36Sopenharmony_ci#define S3C_CAMIF_REG_MSCB0END(id)		(0xe4 + ((id) * 0x2c))
20362306a36Sopenharmony_ci#define S3C_CAMIF_REG_MSCR0END(id)		(0xe8 + ((id) * 0x2c))
20462306a36Sopenharmony_ci
20562306a36Sopenharmony_ci/* MSPRYOFF, MSPRYOFF. Y/Cb/Cr offset. n: 0 - codec, 1 - preview. */
20662306a36Sopenharmony_ci#define S3C_CAMIF_REG_MSYOFF(id)		(0x118 + ((id) * 0x2c))
20762306a36Sopenharmony_ci#define S3C_CAMIF_REG_MSCBOFF(id)		(0x11c + ((id) * 0x2c))
20862306a36Sopenharmony_ci#define S3C_CAMIF_REG_MSCROFF(id)		(0x120 + ((id) * 0x2c))
20962306a36Sopenharmony_ci
21062306a36Sopenharmony_ci/* Real input DMA data size. n = 0 - codec, 1 - preview. */
21162306a36Sopenharmony_ci#define S3C_CAMIF_REG_MSWIDTH(id)		(0xf8 + (id) * 0x2c)
21262306a36Sopenharmony_ci#define  AUTOLOAD_ENABLE			BIT(31)
21362306a36Sopenharmony_ci#define  ADDR_CH_DIS				BIT(30)
21462306a36Sopenharmony_ci#define  MSHEIGHT(x)				(((x) & 0x3ff) << 16)
21562306a36Sopenharmony_ci#define  MSWIDTH(x)				((x) & 0x3ff)
21662306a36Sopenharmony_ci
21762306a36Sopenharmony_ci/* Input DMA control. n = 0 - codec, 1 - preview */
21862306a36Sopenharmony_ci#define S3C_CAMIF_REG_MSCTRL(id)		(0xfc + (id) * 0x2c)
21962306a36Sopenharmony_ci#define  MSCTRL_ORDER422_M_YCBYCR		(0 << 4)
22062306a36Sopenharmony_ci#define  MSCTRL_ORDER422_M_YCRYCB		(1 << 4)
22162306a36Sopenharmony_ci#define  MSCTRL_ORDER422_M_CBYCRY		(2 << 4)
22262306a36Sopenharmony_ci#define  MSCTRL_ORDER422_M_CRYCBY		(3 << 4)
22362306a36Sopenharmony_ci/* 0 - camera, 1 - DMA */
22462306a36Sopenharmony_ci#define  MSCTRL_SEL_DMA_CAM			BIT(3)
22562306a36Sopenharmony_ci#define  MSCTRL_INFORMAT_M_YCBCR420		(0 << 1)
22662306a36Sopenharmony_ci#define  MSCTRL_INFORMAT_M_YCBCR422		(1 << 1)
22762306a36Sopenharmony_ci#define  MSCTRL_INFORMAT_M_YCBCR422I		(2 << 1)
22862306a36Sopenharmony_ci#define  MSCTRL_INFORMAT_M_RGB			(3 << 1)
22962306a36Sopenharmony_ci#define  MSCTRL_ENVID_M				BIT(0)
23062306a36Sopenharmony_ci
23162306a36Sopenharmony_ci/* CICOSCOSY, CIPRSCOSY. Scan line Y/Cb/Cr offset. */
23262306a36Sopenharmony_ci#define S3C_CAMIF_REG_CISSY(id)			(0x12c + (id) * 0x0c)
23362306a36Sopenharmony_ci#define S3C_CAMIF_REG_CISSCB(id)		(0x130 + (id) * 0x0c)
23462306a36Sopenharmony_ci#define S3C_CAMIF_REG_CISSCR(id)		(0x134 + (id) * 0x0c)
23562306a36Sopenharmony_ci#define S3C_CISS_OFFS_INITIAL(x)		((x) << 16)
23662306a36Sopenharmony_ci#define S3C_CISS_OFFS_LINE(x)			((x) << 0)
23762306a36Sopenharmony_ci
23862306a36Sopenharmony_ci/* ------------------------------------------------------------------ */
23962306a36Sopenharmony_ci
24062306a36Sopenharmony_civoid camif_hw_reset(struct camif_dev *camif);
24162306a36Sopenharmony_civoid camif_hw_clear_pending_irq(struct camif_vp *vp);
24262306a36Sopenharmony_civoid camif_hw_clear_fifo_overflow(struct camif_vp *vp);
24362306a36Sopenharmony_civoid camif_hw_set_lastirq(struct camif_vp *vp, int enable);
24462306a36Sopenharmony_civoid camif_hw_set_input_path(struct camif_vp *vp);
24562306a36Sopenharmony_civoid camif_hw_enable_scaler(struct camif_vp *vp, bool on);
24662306a36Sopenharmony_civoid camif_hw_enable_capture(struct camif_vp *vp);
24762306a36Sopenharmony_civoid camif_hw_disable_capture(struct camif_vp *vp);
24862306a36Sopenharmony_civoid camif_hw_set_camera_bus(struct camif_dev *camif);
24962306a36Sopenharmony_civoid camif_hw_set_source_format(struct camif_dev *camif);
25062306a36Sopenharmony_civoid camif_hw_set_camera_crop(struct camif_dev *camif);
25162306a36Sopenharmony_civoid camif_hw_set_scaler(struct camif_vp *vp);
25262306a36Sopenharmony_civoid camif_hw_set_flip(struct camif_vp *vp);
25362306a36Sopenharmony_civoid camif_hw_set_output_dma(struct camif_vp *vp);
25462306a36Sopenharmony_civoid camif_hw_set_target_format(struct camif_vp *vp);
25562306a36Sopenharmony_civoid camif_hw_set_test_pattern(struct camif_dev *camif, unsigned int pattern);
25662306a36Sopenharmony_civoid camif_hw_set_effect(struct camif_dev *camif, unsigned int effect,
25762306a36Sopenharmony_ci			unsigned int cr, unsigned int cb);
25862306a36Sopenharmony_civoid camif_hw_set_output_addr(struct camif_vp *vp, struct camif_addr *paddr,
25962306a36Sopenharmony_ci			      int index);
26062306a36Sopenharmony_civoid camif_hw_dump_regs(struct camif_dev *camif, const char *label);
26162306a36Sopenharmony_ci
26262306a36Sopenharmony_cistatic inline u32 camif_hw_get_status(struct camif_vp *vp)
26362306a36Sopenharmony_ci{
26462306a36Sopenharmony_ci	return readl(vp->camif->io_base + S3C_CAMIF_REG_CISTATUS(vp->id,
26562306a36Sopenharmony_ci								vp->offset));
26662306a36Sopenharmony_ci}
26762306a36Sopenharmony_ci
26862306a36Sopenharmony_ci#endif /* CAMIF_REGS_H_ */
269