From 3fe19171e659b83ab8e80e4764ab466bbe52e24b Mon Sep 17 00:00:00 2001 From: Ayoung Sim Date: Mon, 26 Feb 2018 19:13:50 +0900 Subject: [PATCH] media: mfc: supports MFCv13.0 Change-Id: I046ad302f14e292610fc7e77c1da485387c867ac Signed-off-by: Ayoung Sim --- drivers/media/platform/exynos/mfc/Kconfig | 8 ++++---- .../media/platform/exynos/mfc/s5p_mfc_common.h | 16 +++++++++++++--- .../platform/exynos/mfc/s5p_mfc_data_struct.h | 3 +++ .../media/platform/exynos/mfc/s5p_mfc_regs_v10.h | 6 +++--- 4 files changed, 23 insertions(+), 10 deletions(-) diff --git a/drivers/media/platform/exynos/mfc/Kconfig b/drivers/media/platform/exynos/mfc/Kconfig index 9cf647720113..c50a46e524c3 100644 --- a/drivers/media/platform/exynos/mfc/Kconfig +++ b/drivers/media/platform/exynos/mfc/Kconfig @@ -4,16 +4,16 @@ config VIDEO_EXYNOS_MFC depends on VIDEO_EXYNOS select VIDEOBUF2_CORE select VIDEOBUF2_DMA_SG - select EXYNOS_MFC_V12 + select EXYNOS_MFC_V13 ---help--- MFC driver for V4L2. choice depends on VIDEO_EXYNOS_MFC prompt "MFC version" -default EXYNOS_MFC_V12 -config EXYNOS_MFC_V12 -prompt "MFC version 12" +default EXYNOS_MFC_V13 +config EXYNOS_MFC_V13 +prompt "MFC version 13" bool depends on ARCH_EXYNOS9 endchoice diff --git a/drivers/media/platform/exynos/mfc/s5p_mfc_common.h b/drivers/media/platform/exynos/mfc/s5p_mfc_common.h index ec4fc1c4ca0b..58c5fd8b74c4 100644 --- a/drivers/media/platform/exynos/mfc/s5p_mfc_common.h +++ b/drivers/media/platform/exynos/mfc/s5p_mfc_common.h @@ -175,9 +175,10 @@ (s5p_mfc_version(dev) == 0xA01)) #define IS_MFCV11X(dev) (s5p_mfc_version(dev) == 0x1100) #define IS_MFCV12X(dev) (s5p_mfc_version(dev) == 0x1200) -#define FROM_MFCV11X(dev) (IS_MFCV11X(dev) || IS_MFCV12X(dev)) -#define FROM_MFCV10X(dev) (IS_MFCV10X(dev) || IS_MFCV11X(dev) || \ - IS_MFCV12X(dev)) +#define IS_MFCV13X(dev) (s5p_mfc_version(dev) == 0x1300) +#define FROM_MFCV11X(dev) (IS_MFCV11X(dev) || IS_MFCV12X(dev) || \ + IS_MFCV13X(dev)) +#define FROM_MFCV10X(dev) (IS_MFCV10X(dev) || FROM_MFCV11X(dev)) /* supported feature macros by F/W version */ #define FW_HAS_CONCEAL_CONTROL(dev) (FROM_MFCV10X(dev)) @@ -248,6 +249,15 @@ static inline unsigned int s5p_mfc_version(struct s5p_mfc_dev *dev) case IP_VER_MFC_9L_0: version = 0x1200; break; + case IP_VER_MFC_9R_0: + version = 0x1202; + break; + case IP_VER_MFC_9M_0: + version = 0x1021; + break; + case IP_VER_MFC_9M_1: + version = 0x1300; + break; } return version; diff --git a/drivers/media/platform/exynos/mfc/s5p_mfc_data_struct.h b/drivers/media/platform/exynos/mfc/s5p_mfc_data_struct.h index 4c44d42d4e5e..121ff5ff4a28 100644 --- a/drivers/media/platform/exynos/mfc/s5p_mfc_data_struct.h +++ b/drivers/media/platform/exynos/mfc/s5p_mfc_data_struct.h @@ -72,6 +72,9 @@ enum mfc_ip_version { IP_VER_MFC_8K_0, IP_VER_MFC_7K_0, IP_VER_MFC_9L_0, + IP_VER_MFC_9R_0, + IP_VER_MFC_9M_0, + IP_VER_MFC_9M_1, }; /* diff --git a/drivers/media/platform/exynos/mfc/s5p_mfc_regs_v10.h b/drivers/media/platform/exynos/mfc/s5p_mfc_regs_v10.h index 45a9ae284710..25613bd5451b 100644 --- a/drivers/media/platform/exynos/mfc/s5p_mfc_regs_v10.h +++ b/drivers/media/platform/exynos/mfc/s5p_mfc_regs_v10.h @@ -14,8 +14,8 @@ #define __REGS_MFC_V10_H __FILE__ /* SYSMMU Register */ -#define MFC_MMU0_BASE_ADDR 0x17880000 -#define MFC_MMU1_BASE_ADDR 0x178A0000 +#define MFC_MMU0_BASE_ADDR 0x18890000 +#define MFC_MMU1_BASE_ADDR 0x188B0000 #define MFC_MMU_SIZE 0x9000 #define MFC_MMU_INTERRUPT_STATUS 0x0060 @@ -23,7 +23,7 @@ #define MFC_MMU_FAULT_TRANS_INFO_RW_MASK 0x100000 #define MFC_MMU_FAULT_TRANS_INFO_AXID_MASK 0xFFFF -#define HWFC_BASE_ADDR 0x17628000 +#define HWFC_BASE_ADDR 0x18A28000 #define HWFC_SIZE 0x100 #define HWFC_ENCODING_IDX 0x4 -- 2.20.1