jpeg-hw-s5p.h (2378B)
1/* SPDX-License-Identifier: GPL-2.0-only */ 2/* linux/drivers/media/platform/samsung/s5p-jpeg/jpeg-hw.h 3 * 4 * Copyright (c) 2011 Samsung Electronics Co., Ltd. 5 * http://www.samsung.com 6 * 7 * Author: Andrzej Pietrasiewicz <andrzejtp2010@gmail.com> 8 */ 9#ifndef JPEG_HW_S5P_H_ 10#define JPEG_HW_S5P_H_ 11 12#include <linux/io.h> 13#include <linux/videodev2.h> 14 15#include "jpeg-regs.h" 16 17#define S5P_JPEG_MIN_WIDTH 32 18#define S5P_JPEG_MIN_HEIGHT 32 19#define S5P_JPEG_MAX_WIDTH 8192 20#define S5P_JPEG_MAX_HEIGHT 8192 21#define S5P_JPEG_RAW_IN_565 0 22#define S5P_JPEG_RAW_IN_422 1 23#define S5P_JPEG_RAW_OUT_422 0 24#define S5P_JPEG_RAW_OUT_420 1 25 26void s5p_jpeg_reset(void __iomem *regs); 27void s5p_jpeg_poweron(void __iomem *regs); 28void s5p_jpeg_input_raw_mode(void __iomem *regs, unsigned long mode); 29void s5p_jpeg_proc_mode(void __iomem *regs, unsigned long mode); 30void s5p_jpeg_subsampling_mode(void __iomem *regs, unsigned int mode); 31unsigned int s5p_jpeg_get_subsampling_mode(void __iomem *regs); 32void s5p_jpeg_dri(void __iomem *regs, unsigned int dri); 33void s5p_jpeg_qtbl(void __iomem *regs, unsigned int t, unsigned int n); 34void s5p_jpeg_htbl_ac(void __iomem *regs, unsigned int t); 35void s5p_jpeg_htbl_dc(void __iomem *regs, unsigned int t); 36void s5p_jpeg_y(void __iomem *regs, unsigned int y); 37void s5p_jpeg_x(void __iomem *regs, unsigned int x); 38void s5p_jpeg_rst_int_enable(void __iomem *regs, bool enable); 39void s5p_jpeg_data_num_int_enable(void __iomem *regs, bool enable); 40void s5p_jpeg_final_mcu_num_int_enable(void __iomem *regs, bool enbl); 41int s5p_jpeg_timer_stat(void __iomem *regs); 42void s5p_jpeg_clear_timer_stat(void __iomem *regs); 43void s5p_jpeg_enc_stream_int(void __iomem *regs, unsigned long size); 44int s5p_jpeg_enc_stream_stat(void __iomem *regs); 45void s5p_jpeg_clear_enc_stream_stat(void __iomem *regs); 46void s5p_jpeg_outform_raw(void __iomem *regs, unsigned long format); 47void s5p_jpeg_jpgadr(void __iomem *regs, unsigned long addr); 48void s5p_jpeg_imgadr(void __iomem *regs, unsigned long addr); 49void s5p_jpeg_coef(void __iomem *regs, unsigned int i, 50 unsigned int j, unsigned int coef); 51void s5p_jpeg_start(void __iomem *regs); 52int s5p_jpeg_result_stat_ok(void __iomem *regs); 53int s5p_jpeg_stream_stat_ok(void __iomem *regs); 54void s5p_jpeg_clear_int(void __iomem *regs); 55unsigned int s5p_jpeg_compressed_size(void __iomem *regs); 56 57#endif /* JPEG_HW_S5P_H_ */