/* * Copyright (c) 2015 Samsung Electronics Co., Ltd. * http://www.samsung.com * * The SFR definition file of Samsung Exynos SMFC Driver * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ #ifndef _MEDIA_EXYNOS_SMFC_REGS_H_ #define _MEDIA_EXYNOS_SMFC_REGS_H_ /********** JPEG STANDARD *****************************************************/ #define SMFC_JPEG_MARKER_LEN 2 #define SMFC_MCU_SIZE 64 #define SMFC_MAX_QTBL_COUNT 4 #define SMFC_NUM_HCODE 16 #define SMFC_NUM_DC_HVAL 16 #define SMFC_NUM_AC_HVAL 172 /********** H/W RESTRICTIONS **************************************************/ #define SMFC_MAX_NUM_COMP 3 #define SMFC_MAX_WIDTH 16368U #define SMFC_MAX_HEIGHT 16368U #define SMFC_MIN_WIDTH 8U #define SMFC_MIN_HEIGHT 8U #define SMFC_ADDR_ALIGN_MASK(burstlen) ((burstlen) - 1) #define SMFC_STREAMSIZE_ALIGN 64 #define SMFC_STREAMSIZE_ALIGN_MASK (64 - 1) #define SMFC_EXTRA_STREAMSIZE(base, burstlen) \ (SMFC_STREAMSIZE_ALIGN - ((base) & SMFC_ADDR_ALIGN_MASK(burstlen))) /********** H/W REGISTERS and DEFAULT VALUES **********************************/ #define REG_MAIN_JPEG_CNTL 0x000 # define JPEG_CNTL_CODECON_MASK 3 # define JPEG_CNTL_CODECON_COMPRESS 2 # define JPEG_CNTL_CODECON_DECOMPRESS 1 # define JPEG_CNTL_INT_EN_SHIFT 28 # define JPEG_CNTL_HWFC_EN_SHIFT 30 # define JPEG_CNTL_BTB_EN_SHIFT 31 # define JPEG_CNTL_RESET_MASK \ ((1 <