From patchwork Thu Jun 6 11:01:18 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chander Kashyap X-Patchwork-Id: 2679101 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) by patchwork1.kernel.org (Postfix) with ESMTP id 1D2B640077 for ; Thu, 6 Jun 2013 11:06:55 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UkXzc-0002PH-Q5; Thu, 06 Jun 2013 11:04:34 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UkXyv-00050U-A9; Thu, 06 Jun 2013 11:03:49 +0000 Received: from mail-pb0-x22f.google.com ([2607:f8b0:400e:c01::22f]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UkXyO-0004t5-UN for linux-arm-kernel@lists.infradead.org; Thu, 06 Jun 2013 11:03:19 +0000 Received: by mail-pb0-f47.google.com with SMTP id rr13so445043pbb.6 for ; Thu, 06 Jun 2013 04:02:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=zF8XuOG82F/yNOsDKHZmnRkb/PHrYQniJYlH/gH986Q=; b=HgCw5tWCDkL7TtCdRW3WvhqAJtq2wTJDW/JBI/nzgNBH7avp7xsO97VmU2rB5XowVF U8qX0FCtOS/9Gy5pzBwa3gphoTsr3AJdD4u1XC+Jn6qFoXPRg8gApIuBV5xW3NLBacbs CkTAs8oOy+qRXUcFbsHKbCRTfiFiSiqIEenQYgMaV/DAfohoOizL+PcdBmUo03/549RL Yd9m/avDetxrAUcgNv7dYCOprkrmrO5JyXOwn1B+WiXlutIs2bMDoNMo8SqfCvugnM79 cqrGb9YgMxeduyD7ZB7rOuiT6UPgSaUEYEdXyTaCxkJnDa6V6pOAu801tRJfrp3DRRXC dNVQ== X-Received: by 10.68.232.42 with SMTP id tl10mr37804144pbc.72.1370516566550; Thu, 06 Jun 2013 04:02:46 -0700 (PDT) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPSA id qh4sm77248213pac.8.2013.06.06.04.02.42 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 06 Jun 2013 04:02:45 -0700 (PDT) From: Chander Kashyap To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 04/13] ARM: dts: list the CPU nodes for Exynos5250 Date: Thu, 6 Jun 2013 16:31:18 +0530 Message-Id: <1370516488-25860-4-git-send-email-chander.kashyap@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1370516488-25860-1-git-send-email-chander.kashyap@linaro.org> References: <1370516488-25860-1-git-send-email-chander.kashyap@linaro.org> X-Gm-Message-State: ALoCoQkp9pKuHA1e2JW7ZH5CEMjH5stq5LtYhcTipipBa4tgdsxFbW5S4UubJo2k9o5kyR8lZoxp X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130606_070317_131847_9C143BB6 X-CRM114-Status: GOOD ( 12.69 ) X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: kgene.kim@samsung.com, linux-serial@vger.kernel.org, t.figa@samsung.com, Chander Kashyap , linux-samsung-soc@vger.kernel.org, thomas.ab@samsung.com, s.nawrocki@samsung.com X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Instead of having to specify the number for CPUs in Exynos5250 in platsmp.c file, let the number of CPUs be determined by having this information listed in Exynos5250 device tree file. Signed-off-by: Chander Kashyap Reviewed-by: Tomasz Figa --- arch/arm/boot/dts/exynos5250.dtsi | 14 ++++++++++++++ arch/arm/mach-exynos/platsmp.c | 10 +++++++--- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/arch/arm/boot/dts/exynos5250.dtsi b/arch/arm/boot/dts/exynos5250.dtsi index e571d3b..7f6b1c7 100644 --- a/arch/arm/boot/dts/exynos5250.dtsi +++ b/arch/arm/boot/dts/exynos5250.dtsi @@ -50,6 +50,20 @@ pinctrl3 = &pinctrl_3; }; + cpus { + #address-cells = <1>; + #size-cells = <0>; + + cpu@0 { + compatible = "arm,cortex-a15"; + reg = <0>; + }; + cpu@1 { + compatible = "arm,cortex-a15"; + reg = <1>; + }; + }; + pd_gsc: gsc-power-domain@0x10044000 { compatible = "samsung,exynos4210-pd"; reg = <0x10044000 0x20>; diff --git a/arch/arm/mach-exynos/platsmp.c b/arch/arm/mach-exynos/platsmp.c index 1a4e4e5..85ea4ca 100644 --- a/arch/arm/mach-exynos/platsmp.c +++ b/arch/arm/mach-exynos/platsmp.c @@ -180,10 +180,14 @@ static void __init exynos_smp_init_cpus(void) void __iomem *scu_base = scu_base_addr(); unsigned int i, ncores; - if (soc_is_exynos5250()) - ncores = 2; - else + if (read_cpuid_part_number() == ARM_CPU_PART_CORTEX_A9) ncores = scu_base ? scu_get_core_count(scu_base) : 1; + else + /* + * CPU Nodes are passed thru DT and set_cpu_possible + * is set by "arm_dt_init_cpu_maps". + */ + return; /* sanity check */ if (ncores > nr_cpu_ids) {