From patchwork Tue Jan 29 04:13:38 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 14321 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 83DE523F91 for ; Tue, 29 Jan 2013 04:22:52 +0000 (UTC) Received: from mail-vb0-f46.google.com (mail-vb0-f46.google.com [209.85.212.46]) by fiordland.canonical.com (Postfix) with ESMTP id 23711A18B01 for ; Tue, 29 Jan 2013 04:22:52 +0000 (UTC) Received: by mail-vb0-f46.google.com with SMTP id b13so10377vby.33 for ; Mon, 28 Jan 2013 20:22:51 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:x-received:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state; bh=XKuYRKtbDOXFHtu2fTUc8yXQXNgu+6fEw9H1NJL8Rx0=; b=Rtki+Hk9YJzaq+fIPw4I76m1fhKAB7VuhKE5sYZCaFDqpJtXfeCwpiT33cjfdNBiay s4/1uObEXNXLeUmpKQMs8hAqWAbGLsduQWIhpfyYgabyfLKHaKqvoN+rprlD3UMPIcGG 9OdXkJi+zgMPAamUXsEqMiCIfiGGP57gvJIgBARYe52D7/GqIJFKy8g8XAHFyLm7fb3N QhEMLOhpm/9NlYtMKLh0wVga67WvPznqUSYXnP9nB1hqIjDrvrjwrpdtOO4Z9YceBzOs Bef3mOwyMN73haTE45qaLWh34RvOw8f9G/wVOjJ6njubPgKth8ed/ZFCvIoViEwQrM7b ympw== X-Received: by 10.220.149.82 with SMTP id s18mr178849vcv.14.1359433371628; Mon, 28 Jan 2013 20:22:51 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.58.145.101 with SMTP id st5csp117974veb; Mon, 28 Jan 2013 20:22:51 -0800 (PST) X-Received: by 10.68.203.198 with SMTP id ks6mr554457pbc.35.1359433370813; Mon, 28 Jan 2013 20:22:50 -0800 (PST) Received: from mail-pa0-f54.google.com (mail-pa0-f54.google.com [209.85.220.54]) by mx.google.com with ESMTPS id ru9si11242063pbc.130.2013.01.28.20.22.50 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 28 Jan 2013 20:22:50 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.54 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) client-ip=209.85.220.54; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.54 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) smtp.mail=sachin.kamat@linaro.org Received: by mail-pa0-f54.google.com with SMTP id bi5so129624pad.27 for ; Mon, 28 Jan 2013 20:22:50 -0800 (PST) X-Received: by 10.68.230.101 with SMTP id sx5mr530450pbc.50.1359433370268; Mon, 28 Jan 2013 20:22:50 -0800 (PST) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id ir4sm7576215pbc.41.2013.01.28.20.22.47 (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 28 Jan 2013 20:22:49 -0800 (PST) From: Sachin Kamat To: linux-samsung-soc@vger.kernel.org Cc: devicetree-discuss@lists.ozlabs.org, kgene.kim@samsung.com, sachin.kamat@linaro.org, patches@linaro.org Subject: [PATCH 2/6] ARM: dts: Add MFC codec support for Exynos4 DT machines Date: Tue, 29 Jan 2013 09:43:38 +0530 Message-Id: <1359432822-23846-3-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1359432822-23846-1-git-send-email-sachin.kamat@linaro.org> References: <1359432822-23846-1-git-send-email-sachin.kamat@linaro.org> X-Gm-Message-State: ALoCoQkpKZSf9dvMuYPRTNH/LFUbFAU4SSLsh3Jrf2jwIgzLlXAMgpFCuiY9km9aMUMVOflyyZTr This patch adds MFC codec support for Exynos4 DT machines. Signed-off-by: Sachin Kamat --- arch/arm/boot/dts/exynos4.dtsi | 7 +++++++ arch/arm/mach-exynos/mach-exynos4-dt.c | 17 +++++++++++++++++ 2 files changed, 24 insertions(+), 0 deletions(-) diff --git a/arch/arm/boot/dts/exynos4.dtsi b/arch/arm/boot/dts/exynos4.dtsi index e1347fc..1122fb1 100644 --- a/arch/arm/boot/dts/exynos4.dtsi +++ b/arch/arm/boot/dts/exynos4.dtsi @@ -289,4 +289,11 @@ interrupts = <0 34 0>; }; }; + + mfc: codec@13400000 { + compatible = "samsung,mfc-v5"; + reg = <0x13400000 0x10000>; + interrupts = <0 94 0>; + samsung,power-domain = <&pd_mfc>; + }; }; diff --git a/arch/arm/mach-exynos/mach-exynos4-dt.c b/arch/arm/mach-exynos/mach-exynos4-dt.c index ab1dacc..8ae8da1 100644 --- a/arch/arm/mach-exynos/mach-exynos4-dt.c +++ b/arch/arm/mach-exynos/mach-exynos4-dt.c @@ -12,7 +12,9 @@ */ #include +#include #include +#include #include #include @@ -20,6 +22,7 @@ #include #include +#include #include "common.h" @@ -80,6 +83,7 @@ static const struct of_dev_auxdata exynos4_auxdata_lookup[] __initconst = { OF_DEV_AUXDATA("arm,pl330", EXYNOS4_PA_MDMA1, "dma-pl330.2", NULL), OF_DEV_AUXDATA("samsung,exynos4210-tmu", EXYNOS4_PA_TMU, "exynos-tmu", NULL), + OF_DEV_AUXDATA("samsung,mfc-v5", 0x13400000, "s5p-mfc", NULL), {}, }; @@ -102,6 +106,18 @@ static char const *exynos4_dt_compat[] __initdata = { NULL }; +static void __init exynos4_reserve(void) +{ +#ifdef CONFIG_S5P_DEV_MFC + struct s5p_mfc_dt_meminfo mfc_mem; + + /* Reserve memory for MFC only if it's available */ + mfc_mem.compatible = "samsung,mfc-v5"; + if (of_scan_flat_dt(s5p_fdt_find_mfc_mem, &mfc_mem)) + s5p_mfc_reserve_mem(mfc_mem.roff, mfc_mem.rsize, mfc_mem.loff, + mfc_mem.lsize); +#endif +} DT_MACHINE_START(EXYNOS4210_DT, "Samsung Exynos4 (Flattened Device Tree)") /* Maintainer: Thomas Abraham */ .smp = smp_ops(exynos_smp_ops), @@ -114,4 +130,5 @@ DT_MACHINE_START(EXYNOS4210_DT, "Samsung Exynos4 (Flattened Device Tree)") .timer = &exynos4_timer, .dt_compat = exynos4_dt_compat, .restart = exynos4_restart, + .reserve = exynos4_reserve, MACHINE_END