18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */ 28c2ecf20Sopenharmony_ci/* linux/drivers/media/platform/s5p-jpeg/jpeg-hw.h 38c2ecf20Sopenharmony_ci * 48c2ecf20Sopenharmony_ci * Copyright (c) 2011 Samsung Electronics Co., Ltd. 58c2ecf20Sopenharmony_ci * http://www.samsung.com 68c2ecf20Sopenharmony_ci * 78c2ecf20Sopenharmony_ci * Author: Andrzej Pietrasiewicz <andrzejtp2010@gmail.com> 88c2ecf20Sopenharmony_ci */ 98c2ecf20Sopenharmony_ci#ifndef JPEG_HW_S5P_H_ 108c2ecf20Sopenharmony_ci#define JPEG_HW_S5P_H_ 118c2ecf20Sopenharmony_ci 128c2ecf20Sopenharmony_ci#include <linux/io.h> 138c2ecf20Sopenharmony_ci#include <linux/videodev2.h> 148c2ecf20Sopenharmony_ci 158c2ecf20Sopenharmony_ci#include "jpeg-regs.h" 168c2ecf20Sopenharmony_ci 178c2ecf20Sopenharmony_ci#define S5P_JPEG_MIN_WIDTH 32 188c2ecf20Sopenharmony_ci#define S5P_JPEG_MIN_HEIGHT 32 198c2ecf20Sopenharmony_ci#define S5P_JPEG_MAX_WIDTH 8192 208c2ecf20Sopenharmony_ci#define S5P_JPEG_MAX_HEIGHT 8192 218c2ecf20Sopenharmony_ci#define S5P_JPEG_RAW_IN_565 0 228c2ecf20Sopenharmony_ci#define S5P_JPEG_RAW_IN_422 1 238c2ecf20Sopenharmony_ci#define S5P_JPEG_RAW_OUT_422 0 248c2ecf20Sopenharmony_ci#define S5P_JPEG_RAW_OUT_420 1 258c2ecf20Sopenharmony_ci 268c2ecf20Sopenharmony_civoid s5p_jpeg_reset(void __iomem *regs); 278c2ecf20Sopenharmony_civoid s5p_jpeg_poweron(void __iomem *regs); 288c2ecf20Sopenharmony_civoid s5p_jpeg_input_raw_mode(void __iomem *regs, unsigned long mode); 298c2ecf20Sopenharmony_civoid s5p_jpeg_proc_mode(void __iomem *regs, unsigned long mode); 308c2ecf20Sopenharmony_civoid s5p_jpeg_subsampling_mode(void __iomem *regs, unsigned int mode); 318c2ecf20Sopenharmony_ciunsigned int s5p_jpeg_get_subsampling_mode(void __iomem *regs); 328c2ecf20Sopenharmony_civoid s5p_jpeg_dri(void __iomem *regs, unsigned int dri); 338c2ecf20Sopenharmony_civoid s5p_jpeg_qtbl(void __iomem *regs, unsigned int t, unsigned int n); 348c2ecf20Sopenharmony_civoid s5p_jpeg_htbl_ac(void __iomem *regs, unsigned int t); 358c2ecf20Sopenharmony_civoid s5p_jpeg_htbl_dc(void __iomem *regs, unsigned int t); 368c2ecf20Sopenharmony_civoid s5p_jpeg_y(void __iomem *regs, unsigned int y); 378c2ecf20Sopenharmony_civoid s5p_jpeg_x(void __iomem *regs, unsigned int x); 388c2ecf20Sopenharmony_civoid s5p_jpeg_rst_int_enable(void __iomem *regs, bool enable); 398c2ecf20Sopenharmony_civoid s5p_jpeg_data_num_int_enable(void __iomem *regs, bool enable); 408c2ecf20Sopenharmony_civoid s5p_jpeg_final_mcu_num_int_enable(void __iomem *regs, bool enbl); 418c2ecf20Sopenharmony_ciint s5p_jpeg_timer_stat(void __iomem *regs); 428c2ecf20Sopenharmony_civoid s5p_jpeg_clear_timer_stat(void __iomem *regs); 438c2ecf20Sopenharmony_civoid s5p_jpeg_enc_stream_int(void __iomem *regs, unsigned long size); 448c2ecf20Sopenharmony_ciint s5p_jpeg_enc_stream_stat(void __iomem *regs); 458c2ecf20Sopenharmony_civoid s5p_jpeg_clear_enc_stream_stat(void __iomem *regs); 468c2ecf20Sopenharmony_civoid s5p_jpeg_outform_raw(void __iomem *regs, unsigned long format); 478c2ecf20Sopenharmony_civoid s5p_jpeg_jpgadr(void __iomem *regs, unsigned long addr); 488c2ecf20Sopenharmony_civoid s5p_jpeg_imgadr(void __iomem *regs, unsigned long addr); 498c2ecf20Sopenharmony_civoid s5p_jpeg_coef(void __iomem *regs, unsigned int i, 508c2ecf20Sopenharmony_ci unsigned int j, unsigned int coef); 518c2ecf20Sopenharmony_civoid s5p_jpeg_start(void __iomem *regs); 528c2ecf20Sopenharmony_ciint s5p_jpeg_result_stat_ok(void __iomem *regs); 538c2ecf20Sopenharmony_ciint s5p_jpeg_stream_stat_ok(void __iomem *regs); 548c2ecf20Sopenharmony_civoid s5p_jpeg_clear_int(void __iomem *regs); 558c2ecf20Sopenharmony_ciunsigned int s5p_jpeg_compressed_size(void __iomem *regs); 568c2ecf20Sopenharmony_ci 578c2ecf20Sopenharmony_ci#endif /* JPEG_HW_S5P_H_ */ 58