From patchwork Tue Jun 18 06:29:14 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chander Kashyap X-Patchwork-Id: 2738921 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 7F576C0AB1 for ; Tue, 18 Jun 2013 06:29:51 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9E2CA20258 for ; Tue, 18 Jun 2013 06:29:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id F3A1F20257 for ; Tue, 18 Jun 2013 06:29:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752494Ab3FRG3s (ORCPT ); Tue, 18 Jun 2013 02:29:48 -0400 Received: from mail-pa0-f48.google.com ([209.85.220.48]:58841 "EHLO mail-pa0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752201Ab3FRG3r (ORCPT ); Tue, 18 Jun 2013 02:29:47 -0400 Received: by mail-pa0-f48.google.com with SMTP id kp12so3644468pab.35 for ; Mon, 17 Jun 2013 23:29:47 -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=JMA+IKZHBXNhU5khhy4Nw/TdUjCvy7Uq4TmMt72sXpw=; b=bviGN8L88dbUunwo9kDS7UKAQUr3FY3znIpXh1JahZDVqc2zbjsc8DrWFDJcdfPWOw UXu4UOf8PzX9HM8PCdFD1fqN+bETmmZN5nyxr6jdSWwvxjPVF3vkvYS2F6IOP83jUpWv qehsB/on6ZIgRjWn24XMYRVr0IY3lKoGHUgFbhyZNI6cK05+jrdl3qyHPXky8Ds0S7QS Dh1v5Guw7190Rs44wzNzgrCoOLQo7MclT1b9ktW5NEzAfcKN1GsypeuZTjowek5KGihM JT1TIJoSMcbaO7Y8IKrMbVTRicQ6U6IsyGECdCOmEGzH0jJueiRFlzolTRzC1YD8ciMj +rig== X-Received: by 10.66.197.165 with SMTP id iv5mr883079pac.67.1371536987350; Mon, 17 Jun 2013 23:29:47 -0700 (PDT) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPSA id ep3sm7967227pbd.27.2013.06.17.23.29.43 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 17 Jun 2013 23:29:46 -0700 (PDT) From: Chander Kashyap To: linux-arm-kernel@lists.infradead.org Cc: linux-samsung-soc@vger.kernel.org, linux-serial@vger.kernel.org, kgene.kim@samsung.com, t.figa@samsung.com, s.nawrocki@samsung.com, mark.rutland@arm.com, thomas.ab@samsung.com, Chander Kashyap Subject: [PATCH v4 02/10] ARM: dts: list the CPU nodes for Exynos5250 Date: Tue, 18 Jun 2013 11:59:14 +0530 Message-Id: <1371536962-13322-3-git-send-email-chander.kashyap@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1371536962-13322-1-git-send-email-chander.kashyap@linaro.org> References: <1371536962-13322-1-git-send-email-chander.kashyap@linaro.org> X-Gm-Message-State: ALoCoQnHtz1b8YrhZGoDdleZxlq6I4W58dS1OGsgZg0mCJXMAgxV13Lfve+q62/W1bLOzcxqEL2G Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-8.1 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 | 16 ++++++++++++++++ arch/arm/mach-exynos/platsmp.c | 10 +++++++--- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/arch/arm/boot/dts/exynos5250.dtsi b/arch/arm/boot/dts/exynos5250.dtsi index 63ca03d..1aeef98 100644 --- a/arch/arm/boot/dts/exynos5250.dtsi +++ b/arch/arm/boot/dts/exynos5250.dtsi @@ -50,6 +50,22 @@ pinctrl3 = &pinctrl_3; }; + cpus { + #address-cells = <1>; + #size-cells = <0>; + + cpu@0 { + device_type = "cpu"; + compatible = "arm,cortex-a15"; + reg = <0>; + }; + cpu@1 { + device_type = "cpu"; + 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) {