From patchwork Tue Feb 21 06:19:50 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Daniel Kachhap X-Patchwork-Id: 6854 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 AF31523EB0 for ; Tue, 21 Feb 2012 06:21:56 +0000 (UTC) Received: from mail-iy0-f180.google.com (mail-iy0-f180.google.com [209.85.210.180]) by fiordland.canonical.com (Postfix) with ESMTP id 76EF8A185A5 for ; Tue, 21 Feb 2012 06:21:56 +0000 (UTC) Received: by mail-iy0-f180.google.com with SMTP id z7so11912584iab.11 for ; Mon, 20 Feb 2012 22:21:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:x-forwarded-to:x-forwarded-for:delivered-to :received-spf:dkim-signature:sender:from:to:cc:subject:date :message-id:x-mailer:in-reply-to:references; bh=3BTDiLhkKTH4D0Zt/ObJcDj1YU0fWSIDzHuBk5ndJ24=; b=HfEbe6DOCXPGelPNXwZdBfRWiR79hAJNjtykFvAmUhtLObMRAGol/EuAaCPqx5cp+D la9teG0Xud+8qeLsWOyGAobajP6I7rhA08SsZLATlU/x5Li/IeSPdk9I695eDKd35VOb 3KYbeabwrhs219QNBQCpeFIWLURoLKAsCvwao= MIME-Version: 1.0 Received: by 10.50.34.202 with SMTP id b10mr13967554igj.30.1329805316264; Mon, 20 Feb 2012 22:21:56 -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.231.11.10 with SMTP id r10csp80760ibr; Mon, 20 Feb 2012 22:21:55 -0800 (PST) Received: by 10.68.218.167 with SMTP id ph7mr58169782pbc.110.1329805315550; Mon, 20 Feb 2012 22:21:55 -0800 (PST) Received: from mail-pw0-f50.google.com (mail-pw0-f50.google.com [209.85.160.50]) by mx.google.com with ESMTPS id f3si31577980pbp.7.2012.02.20.22.21.54 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 20 Feb 2012 22:21:55 -0800 (PST) Received-SPF: pass (google.com: domain of amitdanielk@gmail.com designates 209.85.160.50 as permitted sender) client-ip=209.85.160.50; Authentication-Results: mx.google.com; spf=pass (google.com: domain of amitdanielk@gmail.com designates 209.85.160.50 as permitted sender) smtp.mail=amitdanielk@gmail.com; dkim=pass header.i=@gmail.com Received: by mail-pw0-f50.google.com with SMTP id wy7so7968814pbc.37 for ; Mon, 20 Feb 2012 22:21:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=3BTDiLhkKTH4D0Zt/ObJcDj1YU0fWSIDzHuBk5ndJ24=; b=oX7W28457O5952vEiIpm/Qsl51eqpCyzln55HfDNP59g4aLwc8iGjjStidnH/qC2TO 3WweM3Z3V1IJfX25yWq8/Ue8QLAAe2DxUX1JdOfWZMUi38OLpP5AJGF/IaGHjxNEqrQb NQ0+D6kedjNl/hf+lLX2e/RFJIbvWHAmsSIDY= Received: by 10.68.216.40 with SMTP id on8mr58237704pbc.97.1329805314747; Mon, 20 Feb 2012 22:21:54 -0800 (PST) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id vy2sm7541182pbb.48.2012.02.20.22.21.52 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 20 Feb 2012 22:21:54 -0800 (PST) Sender: amit kachhap From: Amit Daniel Kachhap To: kgene.kim@samsung.com, linux-samsung-soc@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, amit.kachhap@linaro.org, patches@linaro.org Subject: [PATCH V6 5/5] ARM: exynos: Enable l2 configuration through device tree Date: Tue, 21 Feb 2012 11:49:50 +0530 Message-Id: <1329805190-8874-6-git-send-email-amit.kachhap@linaro.org> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1329805190-8874-1-git-send-email-amit.kachhap@linaro.org> References: <1329805190-8874-1-git-send-email-amit.kachhap@linaro.org> X-Gm-Message-State: ALoCoQnCFZxnfcMhIROnplHmi3+mMq30faY+Wkj9m1y8xr1yS/lvJ+va4bzT8+WCBEg1S0iYkA37 This patch enables calling generic l2 setup functions if device tree is used. Signed-off-by: Amit Daniel Kachhap --- arch/arm/mach-exynos/common.c | 13 +++++++++++-- 1 files changed, 11 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-exynos/common.c b/arch/arm/mach-exynos/common.c index 9ff38aa..cb5ad8c 100644 --- a/arch/arm/mach-exynos/common.c +++ b/arch/arm/mach-exynos/common.c @@ -47,6 +47,8 @@ #include #include "common.h" +#define L2_AUX_VAL 0x7C470001 +#define L2_AUX_MASK 0xC200ffff static const char name_exynos4210[] = "EXYNOS4210"; static const char name_exynos4212[] = "EXYNOS4212"; @@ -443,6 +445,14 @@ core_initcall(exynos4_core_init); #ifdef CONFIG_CACHE_L2X0 static int __init exynos4_l2x0_cache_init(void) { + int ret; + ret = l2x0_of_init(L2_AUX_VAL, L2_AUX_MASK); + if (!ret) { + l2x0_regs_phys = virt_to_phys(&l2x0_saved_regs); + clean_dcache_area(&l2x0_regs_phys, sizeof(unsigned long)); + return 0; + } + if (!(__raw_readl(S5P_VA_L2CC + L2X0_CTRL) & 0x1)) { l2x0_saved_regs.phy_base = EXYNOS4_PA_L2CC; /* TAG, Data Latency Control: 2 cycles */ @@ -476,8 +486,7 @@ static int __init exynos4_l2x0_cache_init(void) clean_dcache_area(&l2x0_saved_regs, sizeof(struct l2x0_regs)); } - l2x0_init(S5P_VA_L2CC, 0x7C470001, 0xC200ffff); - + l2x0_init(S5P_VA_L2CC, L2_AUX_VAL, L2_AUX_MASK); return 0; }