From patchwork Mon Dec 5 11:06:12 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Daniel Kachhap X-Patchwork-Id: 5456 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 42F7023E16 for ; Mon, 5 Dec 2011 11:06:18 +0000 (UTC) Received: from mail-lpp01m010-f52.google.com (mail-lpp01m010-f52.google.com [209.85.215.52]) by fiordland.canonical.com (Postfix) with ESMTP id 28EF7A183ED for ; Mon, 5 Dec 2011 11:06:18 +0000 (UTC) Received: by mail-lpp01m010-f52.google.com with SMTP id m6so86412lag.11 for ; Mon, 05 Dec 2011 03:06:18 -0800 (PST) Received: by 10.152.105.67 with SMTP id gk3mr5609010lab.48.1323083178057; Mon, 05 Dec 2011 03:06:18 -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.152.41.198 with SMTP id h6cs250945lal; Mon, 5 Dec 2011 03:06:17 -0800 (PST) Received: by 10.50.51.234 with SMTP id n10mr9766151igo.10.1323083175954; Mon, 05 Dec 2011 03:06:15 -0800 (PST) Received: from mail-iy0-f178.google.com (mail-iy0-f178.google.com [209.85.210.178]) by mx.google.com with ESMTPS id o2si9063665icz.54.2011.12.05.03.06.15 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 05 Dec 2011 03:06:15 -0800 (PST) Received-SPF: pass (google.com: domain of amitdanielk@gmail.com designates 209.85.210.178 as permitted sender) client-ip=209.85.210.178; Authentication-Results: mx.google.com; spf=pass (google.com: domain of amitdanielk@gmail.com designates 209.85.210.178 as permitted sender) smtp.mail=amitdanielk@gmail.com; dkim=pass (test mode) header.i=@gmail.com Received: by mail-iy0-f178.google.com with SMTP id j37so3603777iag.37 for ; Mon, 05 Dec 2011 03:06:15 -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=ZXqFb+D8V8iemiFF0mcmJUypDvLPRDz4SPinSGv6uY8=; b=eAqnm2+QYN0oQ9ggpKLFrFw9wi1zoFEzTfDSekMEDJhsNrC/beOE4iz0KhUVGG+ZLD Y+/sDNrWsZHHExXd8Qh+x9cOIdLcEbp58Pk3lS1IXaYRHTY8hePzzqB708Ivj7EdAvHS hi4cyVrSQE5I5Vc2GbERj1mWSCLPtK98OuHv0= Received: by 10.42.29.1 with SMTP id p1mr9767400icc.40.1323083175277; Mon, 05 Dec 2011 03:06:15 -0800 (PST) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id ds5sm9955545ibb.5.2011.12.05.03.06.12 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 05 Dec 2011 03:06:14 -0800 (PST) Sender: amit kachhap From: Amit Daniel Kachhap To: linux-samsung-soc@vger.kernel.org Cc: kgene.kim@samsung.com, linux-arm-kernel@lists.infradead.org, amit.kachhap@linaro.org, patches@linaro.org Subject: [PATCH V4 5/5] ARM: exynos: Enable l2 configuration through device tree Date: Mon, 5 Dec 2011 16:36:12 +0530 Message-Id: <1323083172-14096-6-git-send-email-amit.kachhap@linaro.org> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1323083172-14096-1-git-send-email-amit.kachhap@linaro.org> References: <1323083172-14096-1-git-send-email-amit.kachhap@linaro.org> This patch enables calling generic l2 setup functions if device tree is used. Signed-off-by: Amit Daniel Kachhap --- arch/arm/mach-exynos/cpu.c | 12 ++++++++++-- 1 files changed, 10 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-exynos/cpu.c b/arch/arm/mach-exynos/cpu.c index 252e346..b62a90f 100644 --- a/arch/arm/mach-exynos/cpu.c +++ b/arch/arm/mach-exynos/cpu.c @@ -37,6 +37,9 @@ #include #include +#define L2_AUX_VAL 0x7C470001 +#define L2_AUX_MASK 0xC200ffff + unsigned int gic_bank_offset __read_mostly; extern int combiner_init(unsigned int combiner_nr, void __iomem *base, @@ -299,6 +302,7 @@ core_initcall(exynos4_core_init); #ifdef CONFIG_CACHE_L2X0 static int __init exynos4_l2x0_cache_init(void) { +#ifndef CONFIG_OF if (!(__raw_readl(S5P_VA_L2CC + L2X0_CTRL) & 0x1)) { l2x0_saved_regs.phy_base = EXYNOS4_PA_L2CC; /* TAG, Data Latency Control: 2 cycles */ @@ -332,8 +336,12 @@ 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); +#else + l2x0_of_init(L2_AUX_VAL, L2_AUX_MASK); + l2x0_regs_phys = virt_to_phys(&l2x0_saved_regs); + clean_dcache_area(&l2x0_regs_phys, sizeof(unsigned long)); +#endif return 0; }