From patchwork Wed Mar 6 11:53:48 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shaik Ameer Basha X-Patchwork-Id: 2224921 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 0F7BFDFE75 for ; Wed, 6 Mar 2013 11:54:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757841Ab3CFLye (ORCPT ); Wed, 6 Mar 2013 06:54:34 -0500 Received: from mail-pb0-f53.google.com ([209.85.160.53]:43722 "EHLO mail-pb0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757830Ab3CFLyc (ORCPT ); Wed, 6 Mar 2013 06:54:32 -0500 Received: by mail-pb0-f53.google.com with SMTP id un1so5878154pbc.26 for ; Wed, 06 Mar 2013 03:54:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references; bh=XrrptCSFSj0gSOCVo2I5KvT5mJvg/Sg0cPFV3yuSNMI=; b=p+3zx3VYtAlLH3gwM7aL7323SQUT2ConfNf/nf/S0VVMKasgJTmxfF/TBZYgtDFVhZ TY9iNEznXzQTd3aaC9tzdKgb+NGHPjrOFyTiNkiBRhAXnqHW/ESt8TYSuhmejwIR5nOZ TvnAHw/wyePMzloGqM6uG1dtb0Nh5WcrmRSMhBKGu+a0lvk8zqz/xWkfPxKpLuCatl1/ GTQTSx0H4zvo0g/zKYHo3v/Jxy4xKt3xQ0U8h1lwJ6U4Gx8lG7JWanXSfIQx5fs6JV/l 8kl22x8fjxj8XlrN9tq9pVULp79Q1KkmsTFouGWBVg81kGbif4evMxrww2O8uPeId8bO un0Q== X-Received: by 10.68.190.99 with SMTP id gp3mr12707545pbc.117.1362570870825; Wed, 06 Mar 2013 03:54:30 -0800 (PST) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id ip8sm5358307pbc.39.2013.03.06.03.54.26 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 06 Mar 2013 03:54:29 -0800 (PST) From: Shaik Ameer Basha To: linux-media@vger.kernel.org, devicetree-discuss@lists.ozlabs.org, linux-samsung-soc@vger.kernel.org Cc: s.nawrocki@samsung.com, shaik.samsung@gmail.com Subject: [RFC 02/12] fimc-lite: Adding Exynos5 compatibility to fimc-lite driver Date: Wed, 6 Mar 2013 17:23:48 +0530 Message-Id: <1362570838-4737-3-git-send-email-shaik.ameer@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1362570838-4737-1-git-send-email-shaik.ameer@samsung.com> References: <1362570838-4737-1-git-send-email-shaik.ameer@samsung.com> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org This patch adds the Exynos5 soc compatibility to the fimc-lite driver. It also adds a version checking to deal with the changes between different fimc-lite hardware versions. Signed-off-by: Shaik Ameer Basha --- drivers/media/platform/s5p-fimc/fimc-lite.c | 23 +++++++++++++++++++++++ drivers/media/platform/s5p-fimc/fimc-lite.h | 7 ++++++- 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/drivers/media/platform/s5p-fimc/fimc-lite.c b/drivers/media/platform/s5p-fimc/fimc-lite.c index 122cf95..eb64f87 100644 --- a/drivers/media/platform/s5p-fimc/fimc-lite.c +++ b/drivers/media/platform/s5p-fimc/fimc-lite.c @@ -1653,6 +1653,16 @@ static struct flite_variant fimc_lite0_variant_exynos4 = { .out_width_align = 8, .win_hor_offs_align = 2, .out_hor_offs_align = 8, + .version = FLITE_VER_EXYNOS4, +}; + +static struct flite_variant fimc_lite0_variant_exynos5 = { + .max_width = 8192, + .max_height = 8192, + .out_width_align = 8, + .win_hor_offs_align = 2, + .out_hor_offs_align = 8, + .version = FLITE_VER_EXYNOS5, }; /* EXYNOS4212, EXYNOS4412 */ @@ -1663,6 +1673,15 @@ static struct flite_drvdata fimc_lite_drvdata_exynos4 = { }, }; +/* EXYNOS5250 */ +static struct flite_drvdata fimc_lite_drvdata_exynos5 = { + .variant = { + [0] = &fimc_lite0_variant_exynos5, + [1] = &fimc_lite0_variant_exynos5, + [2] = &fimc_lite0_variant_exynos5, + }, +}; + static struct platform_device_id fimc_lite_driver_ids[] = { { .name = "exynos-fimc-lite", @@ -1677,6 +1696,10 @@ static const struct of_device_id flite_of_match[] = { .compatible = "samsung,exynos4212-fimc-lite", .data = &fimc_lite_drvdata_exynos4, }, + { + .compatible = "samsung,exynos5250-fimc-lite", + .data = &fimc_lite_drvdata_exynos5, + }, { /* sentinel */ }, }; MODULE_DEVICE_TABLE(of, flite_of_match); diff --git a/drivers/media/platform/s5p-fimc/fimc-lite.h b/drivers/media/platform/s5p-fimc/fimc-lite.h index 66d6eeb..ef43fe0 100644 --- a/drivers/media/platform/s5p-fimc/fimc-lite.h +++ b/drivers/media/platform/s5p-fimc/fimc-lite.h @@ -28,7 +28,7 @@ #define FIMC_LITE_DRV_NAME "exynos-fimc-lite" #define FLITE_CLK_NAME "flite" -#define FIMC_LITE_MAX_DEVS 2 +#define FIMC_LITE_MAX_DEVS 3 #define FLITE_REQ_BUFS_MIN 2 /* Bit index definitions for struct fimc_lite::state */ @@ -49,12 +49,17 @@ enum { #define FLITE_SD_PAD_SOURCE_ISP 2 #define FLITE_SD_PADS_NUM 3 +#define FLITE_VER_EXYNOS4 0 +#define FLITE_VER_EXYNOS5 1 + + struct flite_variant { unsigned short max_width; unsigned short max_height; unsigned short out_width_align; unsigned short win_hor_offs_align; unsigned short out_hor_offs_align; + unsigned short version; }; struct flite_drvdata {