]> Pileus Git - ~andy/linux/commitdiff
[media] s5p-mfc: Core support for MFC v7
authorArun Kumar K <arun.kk@samsung.com>
Tue, 9 Jul 2013 04:24:38 +0000 (01:24 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Sun, 18 Aug 2013 10:09:49 +0000 (07:09 -0300)
Adds variant data and core support for the MFC v7 firmware

Signed-off-by: Arun Kumar K <arun.kk@samsung.com>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Documentation/devicetree/bindings/media/s5p-mfc.txt
drivers/media/platform/s5p-mfc/s5p_mfc.c
drivers/media/platform/s5p-mfc/s5p_mfc_common.h

index df37b0230c75c6c7952447da58fca87e501d8b96..36bd2d6725c89f01f660e02b4fc82a0aff48c848 100644 (file)
@@ -10,6 +10,7 @@ Required properties:
   - compatible : value should be either one among the following
        (a) "samsung,mfc-v5" for MFC v5 present in Exynos4 SoCs
        (b) "samsung,mfc-v6" for MFC v6 present in Exynos5 SoCs
+       (b) "samsung,mfc-v7" for MFC v7 present in Exynos5420 SoC
 
   - reg : Physical base address of the IP registers and length of memory
          mapped region.
index a130dcdb7206ec7bb09c5181f3aa5d9b56c0f1e8..084263dd126f08bd235a46a7a54e3d855516050e 100644 (file)
@@ -1391,6 +1391,32 @@ static struct s5p_mfc_variant mfc_drvdata_v6 = {
        .fw_name        = "s5p-mfc-v6.fw",
 };
 
+struct s5p_mfc_buf_size_v6 mfc_buf_size_v7 = {
+       .dev_ctx        = MFC_CTX_BUF_SIZE_V7,
+       .h264_dec_ctx   = MFC_H264_DEC_CTX_BUF_SIZE_V7,
+       .other_dec_ctx  = MFC_OTHER_DEC_CTX_BUF_SIZE_V7,
+       .h264_enc_ctx   = MFC_H264_ENC_CTX_BUF_SIZE_V7,
+       .other_enc_ctx  = MFC_OTHER_ENC_CTX_BUF_SIZE_V7,
+};
+
+struct s5p_mfc_buf_size buf_size_v7 = {
+       .fw     = MAX_FW_SIZE_V7,
+       .cpb    = MAX_CPB_SIZE_V7,
+       .priv   = &mfc_buf_size_v7,
+};
+
+struct s5p_mfc_buf_align mfc_buf_align_v7 = {
+       .base = 0,
+};
+
+static struct s5p_mfc_variant mfc_drvdata_v7 = {
+       .version        = MFC_VERSION_V7,
+       .port_num       = MFC_NUM_PORTS_V7,
+       .buf_size       = &buf_size_v7,
+       .buf_align      = &mfc_buf_align_v7,
+       .fw_name        = "s5p-mfc-v7.fw",
+};
+
 static struct platform_device_id mfc_driver_ids[] = {
        {
                .name = "s5p-mfc",
@@ -1401,6 +1427,9 @@ static struct platform_device_id mfc_driver_ids[] = {
        }, {
                .name = "s5p-mfc-v6",
                .driver_data = (unsigned long)&mfc_drvdata_v6,
+       }, {
+               .name = "s5p-mfc-v7",
+               .driver_data = (unsigned long)&mfc_drvdata_v7,
        },
        {},
 };
@@ -1413,6 +1442,9 @@ static const struct of_device_id exynos_mfc_match[] = {
        }, {
                .compatible = "samsung,mfc-v6",
                .data = &mfc_drvdata_v6,
+       }, {
+               .compatible = "samsung,mfc-v7",
+               .data = &mfc_drvdata_v7,
        },
        {},
 };
index d47016d5249ab48ed8e4acc732d0dcbb93fb65f0..17545d7eb916b1783bb3a775ea070b6b6c6c0c24 100644 (file)
@@ -24,6 +24,7 @@
 #include <media/videobuf2-core.h>
 #include "regs-mfc.h"
 #include "regs-mfc-v6.h"
+#include "regs-mfc-v7.h"
 
 /* Definitions related to MFC memory */
 
@@ -684,5 +685,6 @@ void set_work_bit_irqsave(struct s5p_mfc_ctx *ctx);
                                (dev->variant->port_num ? 1 : 0) : 0) : 0)
 #define IS_TWOPORT(dev)                (dev->variant->port_num == 2 ? 1 : 0)
 #define IS_MFCV6_PLUS(dev)     (dev->variant->version >= 0x60 ? 1 : 0)
+#define IS_MFCV7(dev)          (dev->variant->version >= 0x70 ? 1 : 0)
 
 #endif /* S5P_MFC_COMMON_H_ */