162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */ 262306a36Sopenharmony_ci/* linux/drivers/media/platform/samsung/s5p-jpeg/jpeg-hw.h 362306a36Sopenharmony_ci * 462306a36Sopenharmony_ci * Copyright (c) 2011 Samsung Electronics Co., Ltd. 562306a36Sopenharmony_ci * http://www.samsung.com 662306a36Sopenharmony_ci * 762306a36Sopenharmony_ci * Author: Andrzej Pietrasiewicz <andrzejtp2010@gmail.com> 862306a36Sopenharmony_ci */ 962306a36Sopenharmony_ci#ifndef JPEG_HW_S5P_H_ 1062306a36Sopenharmony_ci#define JPEG_HW_S5P_H_ 1162306a36Sopenharmony_ci 1262306a36Sopenharmony_ci#include <linux/io.h> 1362306a36Sopenharmony_ci#include <linux/videodev2.h> 1462306a36Sopenharmony_ci 1562306a36Sopenharmony_ci#include "jpeg-regs.h" 1662306a36Sopenharmony_ci 1762306a36Sopenharmony_ci#define S5P_JPEG_MIN_WIDTH 32 1862306a36Sopenharmony_ci#define S5P_JPEG_MIN_HEIGHT 32 1962306a36Sopenharmony_ci#define S5P_JPEG_MAX_WIDTH 8192 2062306a36Sopenharmony_ci#define S5P_JPEG_MAX_HEIGHT 8192 2162306a36Sopenharmony_ci#define S5P_JPEG_RAW_IN_565 0 2262306a36Sopenharmony_ci#define S5P_JPEG_RAW_IN_422 1 2362306a36Sopenharmony_ci#define S5P_JPEG_RAW_OUT_422 0 2462306a36Sopenharmony_ci#define S5P_JPEG_RAW_OUT_420 1 2562306a36Sopenharmony_ci 2662306a36Sopenharmony_civoid s5p_jpeg_reset(void __iomem *regs); 2762306a36Sopenharmony_civoid s5p_jpeg_poweron(void __iomem *regs); 2862306a36Sopenharmony_civoid s5p_jpeg_input_raw_mode(void __iomem *regs, unsigned long mode); 2962306a36Sopenharmony_civoid s5p_jpeg_proc_mode(void __iomem *regs, unsigned long mode); 3062306a36Sopenharmony_civoid s5p_jpeg_subsampling_mode(void __iomem *regs, unsigned int mode); 3162306a36Sopenharmony_ciunsigned int s5p_jpeg_get_subsampling_mode(void __iomem *regs); 3262306a36Sopenharmony_civoid s5p_jpeg_dri(void __iomem *regs, unsigned int dri); 3362306a36Sopenharmony_civoid s5p_jpeg_qtbl(void __iomem *regs, unsigned int t, unsigned int n); 3462306a36Sopenharmony_civoid s5p_jpeg_htbl_ac(void __iomem *regs, unsigned int t); 3562306a36Sopenharmony_civoid s5p_jpeg_htbl_dc(void __iomem *regs, unsigned int t); 3662306a36Sopenharmony_civoid s5p_jpeg_y(void __iomem *regs, unsigned int y); 3762306a36Sopenharmony_civoid s5p_jpeg_x(void __iomem *regs, unsigned int x); 3862306a36Sopenharmony_civoid s5p_jpeg_rst_int_enable(void __iomem *regs, bool enable); 3962306a36Sopenharmony_civoid s5p_jpeg_data_num_int_enable(void __iomem *regs, bool enable); 4062306a36Sopenharmony_civoid s5p_jpeg_final_mcu_num_int_enable(void __iomem *regs, bool enbl); 4162306a36Sopenharmony_ciint s5p_jpeg_timer_stat(void __iomem *regs); 4262306a36Sopenharmony_civoid s5p_jpeg_clear_timer_stat(void __iomem *regs); 4362306a36Sopenharmony_civoid s5p_jpeg_enc_stream_int(void __iomem *regs, unsigned long size); 4462306a36Sopenharmony_ciint s5p_jpeg_enc_stream_stat(void __iomem *regs); 4562306a36Sopenharmony_civoid s5p_jpeg_clear_enc_stream_stat(void __iomem *regs); 4662306a36Sopenharmony_civoid s5p_jpeg_outform_raw(void __iomem *regs, unsigned long format); 4762306a36Sopenharmony_civoid s5p_jpeg_jpgadr(void __iomem *regs, unsigned long addr); 4862306a36Sopenharmony_civoid s5p_jpeg_imgadr(void __iomem *regs, unsigned long addr); 4962306a36Sopenharmony_civoid s5p_jpeg_coef(void __iomem *regs, unsigned int i, 5062306a36Sopenharmony_ci unsigned int j, unsigned int coef); 5162306a36Sopenharmony_civoid s5p_jpeg_start(void __iomem *regs); 5262306a36Sopenharmony_ciint s5p_jpeg_result_stat_ok(void __iomem *regs); 5362306a36Sopenharmony_ciint s5p_jpeg_stream_stat_ok(void __iomem *regs); 5462306a36Sopenharmony_civoid s5p_jpeg_clear_int(void __iomem *regs); 5562306a36Sopenharmony_ciunsigned int s5p_jpeg_compressed_size(void __iomem *regs); 5662306a36Sopenharmony_ci 5762306a36Sopenharmony_ci#endif /* JPEG_HW_S5P_H_ */ 58