From patchwork Wed Jan 30 07:11:25 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 14352 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 5C00F23E57 for ; Wed, 30 Jan 2013 07:20:42 +0000 (UTC) Received: from mail-ve0-f170.google.com (mail-ve0-f170.google.com [209.85.128.170]) by fiordland.canonical.com (Postfix) with ESMTP id F1DA6A18648 for ; Wed, 30 Jan 2013 07:20:41 +0000 (UTC) Received: by mail-ve0-f170.google.com with SMTP id 14so283772vea.1 for ; Tue, 29 Jan 2013 23:20:41 -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=zZX1v0R3CBy0nKP1/ttYXiBb/KfcRCiUyHZ3aH/hiOE=; b=dMSu1F7YOaqAy6nnkREDoEo53s5lx7AewUD7B2jFR1WKsKqeoTTxEvAhq7GvRq30dU uwahKJDWVxUzk7dkpWZLSMlqbX++4bsbgtPEyMH9lc1OK6/WS5S+EprYDZ/IDSugZfPt 7++2N8iXx4BHj/4d/W+aQ3jg9kgdczuRVXekaTukIRXtnumfNMIR8n32/zTHfRUY4aRF Yg7RdExMDl6uHfuX7J01Y6dycVkDjCYON3YO/DmK9uJk62irtYZzz6eRDKEbdxBQvwy+ +SJpxSBLMKMg5UbSkvj+BZCelkQEEbn9nz0ipliDuFPg++f2Eo1/Cbyw1VAG9wCFchTW 3X9A== X-Received: by 10.220.240.11 with SMTP id ky11mr4056033vcb.11.1359530441467; Tue, 29 Jan 2013 23:20:41 -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.133.116 with SMTP id pb20csp172344veb; Tue, 29 Jan 2013 23:20:41 -0800 (PST) X-Received: by 10.68.200.228 with SMTP id jv4mr9880341pbc.139.1359530440641; Tue, 29 Jan 2013 23:20:40 -0800 (PST) Received: from mail-pa0-f53.google.com (mail-pa0-f53.google.com [209.85.220.53]) by mx.google.com with ESMTPS id t5si895133pay.76.2013.01.29.23.20.40 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 29 Jan 2013 23:20:40 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.53 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) client-ip=209.85.220.53; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.53 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-f53.google.com with SMTP id bg4so913987pad.40 for ; Tue, 29 Jan 2013 23:20:40 -0800 (PST) X-Received: by 10.68.227.33 with SMTP id rx1mr10271336pbc.67.1359530440178; Tue, 29 Jan 2013 23:20:40 -0800 (PST) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id vo6sm758658pbc.8.2013.01.29.23.20.37 (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 29 Jan 2013 23:20:39 -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: Wed, 30 Jan 2013 12:41:25 +0530 Message-Id: <1359529889-26318-3-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1359529889-26318-1-git-send-email-sachin.kamat@linaro.org> References: <1359529889-26318-1-git-send-email-sachin.kamat@linaro.org> X-Gm-Message-State: ALoCoQlvmPwFQ1ejuDiHdjRckAcaI7Gb4E46SLm/NLfIQCx1Te60X+IRDRlHfB0uN1317A5X8hch This patch adds MFC codec support for Exynos4 DT machines. Signed-off-by: Sachin Kamat --- arch/arm/boot/dts/exynos4.dtsi | 8 ++++++++ arch/arm/mach-exynos/Kconfig | 1 + arch/arm/mach-exynos/mach-exynos4-dt.c | 17 +++++++++++++++++ 3 files changed, 26 insertions(+), 0 deletions(-) diff --git a/arch/arm/boot/dts/exynos4.dtsi b/arch/arm/boot/dts/exynos4.dtsi index e1347fc..6581bb2 100644 --- a/arch/arm/boot/dts/exynos4.dtsi +++ b/arch/arm/boot/dts/exynos4.dtsi @@ -131,6 +131,14 @@ status = "disabled"; }; + mfc: codec@13400000 { + compatible = "samsung,mfc-v5"; + reg = <0x13400000 0x10000>; + interrupts = <0 94 0>; + samsung,power-domain = <&pd_mfc>; + status = "disabled"; + }; + serial@13800000 { compatible = "samsung,exynos4210-uart"; reg = <0x13800000 0x100>; diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig index e103c29..f0d8f09 100644 --- a/arch/arm/mach-exynos/Kconfig +++ b/arch/arm/mach-exynos/Kconfig @@ -415,6 +415,7 @@ config MACH_EXYNOS4_DT select HAVE_SAMSUNG_KEYPAD if INPUT_KEYBOARD select PINCTRL select PINCTRL_EXYNOS4 + select S5P_DEV_MFC select USE_OF help Machine support for Samsung Exynos4 machine with device tree enabled. 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