1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /* linux/drivers/media/platform/s5p-jpeg/jpeg-hw-exynos3250.h
3  *
4  * Copyright (c) 2014 Samsung Electronics Co., Ltd.
5  *		http://www.samsung.com
6  *
7  * Author: Jacek Anaszewski <j.anaszewski@samsung.com>
8  */
9 #ifndef JPEG_HW_EXYNOS3250_H_
10 #define JPEG_HW_EXYNOS3250_H_
11 
12 #include <linux/io.h>
13 #include <linux/videodev2.h>
14 
15 #include "jpeg-regs.h"
16 
17 void exynos3250_jpeg_reset(void __iomem *regs);
18 void exynos3250_jpeg_poweron(void __iomem *regs);
19 void exynos3250_jpeg_set_dma_num(void __iomem *regs);
20 void exynos3250_jpeg_clk_set(void __iomem *base);
21 void exynos3250_jpeg_input_raw_fmt(void __iomem *regs, unsigned int fmt);
22 void exynos3250_jpeg_output_raw_fmt(void __iomem *regs, unsigned int fmt);
23 void exynos3250_jpeg_set_y16(void __iomem *regs, bool y16);
24 void exynos3250_jpeg_proc_mode(void __iomem *regs, unsigned int mode);
25 void exynos3250_jpeg_subsampling_mode(void __iomem *regs, unsigned int mode);
26 unsigned int exynos3250_jpeg_get_subsampling_mode(void __iomem *regs);
27 void exynos3250_jpeg_dri(void __iomem *regs, unsigned int dri);
28 void exynos3250_jpeg_qtbl(void __iomem *regs, unsigned int t, unsigned int n);
29 void exynos3250_jpeg_htbl_ac(void __iomem *regs, unsigned int t);
30 void exynos3250_jpeg_htbl_dc(void __iomem *regs, unsigned int t);
31 void exynos3250_jpeg_set_y(void __iomem *regs, unsigned int y);
32 void exynos3250_jpeg_set_x(void __iomem *regs, unsigned int x);
33 void exynos3250_jpeg_interrupts_enable(void __iomem *regs);
34 void exynos3250_jpeg_enc_stream_bound(void __iomem *regs, unsigned int size);
35 void exynos3250_jpeg_outform_raw(void __iomem *regs, unsigned long format);
36 void exynos3250_jpeg_jpgadr(void __iomem *regs, unsigned int addr);
37 void exynos3250_jpeg_imgadr(void __iomem *regs, struct s5p_jpeg_addr *img_addr);
38 void exynos3250_jpeg_stride(void __iomem *regs, unsigned int img_fmt,
39 			    unsigned int width);
40 void exynos3250_jpeg_offset(void __iomem *regs, unsigned int x_offset,
41 				unsigned int y_offset);
42 void exynos3250_jpeg_coef(void __iomem *base, unsigned int mode);
43 void exynos3250_jpeg_start(void __iomem *regs);
44 void exynos3250_jpeg_rstart(void __iomem *regs);
45 unsigned int exynos3250_jpeg_get_int_status(void __iomem *regs);
46 void exynos3250_jpeg_clear_int_status(void __iomem *regs,
47 						unsigned int value);
48 unsigned int exynos3250_jpeg_operating(void __iomem *regs);
49 unsigned int exynos3250_jpeg_compressed_size(void __iomem *regs);
50 void exynos3250_jpeg_dec_stream_size(void __iomem *regs, unsigned int size);
51 void exynos3250_jpeg_dec_scaling_ratio(void __iomem *regs, unsigned int sratio);
52 void exynos3250_jpeg_set_timer(void __iomem *regs, unsigned int time_value);
53 unsigned int exynos3250_jpeg_get_timer_status(void __iomem *regs);
54 void exynos3250_jpeg_set_timer_status(void __iomem *regs);
55 void exynos3250_jpeg_clear_timer_status(void __iomem *regs);
56 
57 #endif /* JPEG_HW_EXYNOS3250_H_ */
58