1 /* linux/drivers/media/platform/s5p-jpeg/jpeg-hw.h
3 * Copyright (c) 2011 Samsung Electronics Co., Ltd.
4 * http://www.samsung.com
6 * Author: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
12 #ifndef JPEG_HW_S5P_H_
13 #define JPEG_HW_S5P_H_
16 #include <linux/videodev2.h>
18 #include "jpeg-regs.h"
20 #define S5P_JPEG_MIN_WIDTH 32
21 #define S5P_JPEG_MIN_HEIGHT 32
22 #define S5P_JPEG_MAX_WIDTH 8192
23 #define S5P_JPEG_MAX_HEIGHT 8192
24 #define S5P_JPEG_RAW_IN_565 0
25 #define S5P_JPEG_RAW_IN_422 1
26 #define S5P_JPEG_RAW_OUT_422 0
27 #define S5P_JPEG_RAW_OUT_420 1
29 void s5p_jpeg_reset(void __iomem
*regs
);
30 void s5p_jpeg_poweron(void __iomem
*regs
);
31 void s5p_jpeg_input_raw_mode(void __iomem
*regs
, unsigned long mode
);
32 void s5p_jpeg_input_raw_y16(void __iomem
*regs
, bool y16
);
33 void s5p_jpeg_proc_mode(void __iomem
*regs
, unsigned long mode
);
34 void s5p_jpeg_subsampling_mode(void __iomem
*regs
, unsigned int mode
);
35 unsigned int s5p_jpeg_get_subsampling_mode(void __iomem
*regs
);
36 void s5p_jpeg_dri(void __iomem
*regs
, unsigned int dri
);
37 void s5p_jpeg_qtbl(void __iomem
*regs
, unsigned int t
, unsigned int n
);
38 void s5p_jpeg_htbl_ac(void __iomem
*regs
, unsigned int t
);
39 void s5p_jpeg_htbl_dc(void __iomem
*regs
, unsigned int t
);
40 void s5p_jpeg_y(void __iomem
*regs
, unsigned int y
);
41 void s5p_jpeg_x(void __iomem
*regs
, unsigned int x
);
42 void s5p_jpeg_rst_int_enable(void __iomem
*regs
, bool enable
);
43 void s5p_jpeg_data_num_int_enable(void __iomem
*regs
, bool enable
);
44 void s5p_jpeg_final_mcu_num_int_enable(void __iomem
*regs
, bool enbl
);
45 void s5p_jpeg_timer_enable(void __iomem
*regs
, unsigned long val
);
46 void s5p_jpeg_timer_disable(void __iomem
*regs
);
47 int s5p_jpeg_timer_stat(void __iomem
*regs
);
48 void s5p_jpeg_clear_timer_stat(void __iomem
*regs
);
49 void s5p_jpeg_enc_stream_int(void __iomem
*regs
, unsigned long size
);
50 int s5p_jpeg_enc_stream_stat(void __iomem
*regs
);
51 void s5p_jpeg_clear_enc_stream_stat(void __iomem
*regs
);
52 void s5p_jpeg_outform_raw(void __iomem
*regs
, unsigned long format
);
53 void s5p_jpeg_jpgadr(void __iomem
*regs
, unsigned long addr
);
54 void s5p_jpeg_imgadr(void __iomem
*regs
, unsigned long addr
);
55 void s5p_jpeg_coef(void __iomem
*regs
, unsigned int i
,
56 unsigned int j
, unsigned int coef
);
57 void s5p_jpeg_start(void __iomem
*regs
);
58 int s5p_jpeg_result_stat_ok(void __iomem
*regs
);
59 int s5p_jpeg_stream_stat_ok(void __iomem
*regs
);
60 void s5p_jpeg_clear_int(void __iomem
*regs
);
61 unsigned int s5p_jpeg_compressed_size(void __iomem
*regs
);
63 #endif /* JPEG_HW_S5P_H_ */