From patchwork Fri Jun 14 14:02:44 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chander Kashyap X-Patchwork-Id: 2721841 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 311F89F8E4 for ; Fri, 14 Jun 2013 14:05:33 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 039412029B for ; Fri, 14 Jun 2013 14:05:32 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8035D20292 for ; Fri, 14 Jun 2013 14:05:30 +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 1UnUcD-0000oi-27; Fri, 14 Jun 2013 14:04:33 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UnUbw-0000FB-1z; Fri, 14 Jun 2013 14:04:16 +0000 Received: from mail-pa0-x22c.google.com ([2607:f8b0:400e:c03::22c]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UnUbU-000093-8E for linux-arm-kernel@lists.infradead.org; Fri, 14 Jun 2013 14:03:49 +0000 Received: by mail-pa0-f44.google.com with SMTP id lj1so686154pab.17 for ; Fri, 14 Jun 2013 07:03:26 -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=974LWDA+wv6I49u8Q28QKJFVGNWwIW7JnficqErMPJM=; b=iQwWnE2ifWGbojIcu0Nq+BojOgDbZghwlVuoRccNFNA4jvwsCWliWkxoyZKl4yPBkg EJTBph/aW4ZW0EkkTUkf8XEB92bcyHpGlYsg/b8M36P3jWzgDokowAzK4/dTtUrOBA54 tdiQ4nGJyrpWf6cJ6dEPyQ/raVrVD4qNFNxYAOS3lKMyIJs606cnoZoaCPgf8QvMunwo PfWAdNTekMg8TOKq7a2R5cRvnZCTlH5G0fC3siDK8+kGKAYVpVl7oSE4qBEA1+SQjDdR iazBCwnL5ZWVMSqCENIP0VyQi00keQskIMuRVkAYm7zYt/yLwxZq1uN24dP8NPLc7Jd0 VR1w== X-Received: by 10.66.190.104 with SMTP id gp8mr2788093pac.84.1371218606045; Fri, 14 Jun 2013 07:03:26 -0700 (PDT) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPSA id ri8sm2452804pbc.3.2013.06.14.07.03.22 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 14 Jun 2013 07:03:25 -0700 (PDT) From: Chander Kashyap To: linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 02/10] ARM: dts: list the CPU nodes for Exynos5250 Date: Fri, 14 Jun 2013 19:32:44 +0530 Message-Id: <1371218572-8993-3-git-send-email-chander.kashyap@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1371218572-8993-1-git-send-email-chander.kashyap@linaro.org> References: <1370516488-25860-10-git-send-email-chander.kashyap@linaro.org> <1371218572-8993-1-git-send-email-chander.kashyap@linaro.org> X-Gm-Message-State: ALoCoQmK7ymqLNLgz4fjM8qKch8BXocHcqEDzJs8jKdXQu249HJMY5t11sJvzDRRJz5c8WRUppIG X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130614_100348_427242_F1798D73 X-CRM114-Status: GOOD ( 12.69 ) X-Spam-Score: -1.9 (-) Cc: mark.rutland@arm.com, 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 X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 2b59ea3..b4b808e 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) {