From patchwork Fri Sep 12 08:02:17 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khiem Nguyen X-Patchwork-Id: 4892411 Return-Path: X-Original-To: patchwork-linux-sh@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 399A09F537 for ; Fri, 12 Sep 2014 07:57:18 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B854B2027D for ; Fri, 12 Sep 2014 08:02:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DCB8D2021B for ; Fri, 12 Sep 2014 08:02:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752788AbaILICU (ORCPT ); Fri, 12 Sep 2014 04:02:20 -0400 Received: from relmlor2.renesas.com ([210.160.252.172]:40214 "EHLO relmlie1.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752485AbaILICT (ORCPT ); Fri, 12 Sep 2014 04:02:19 -0400 Received: from unknown (HELO relmlir1.idc.renesas.com) ([10.200.68.151]) by relmlie1.idc.renesas.com with ESMTP; 12 Sep 2014 17:02:17 +0900 Received: from relmlac1.idc.renesas.com (relmlac1.idc.renesas.com [10.200.69.21]) by relmlir1.idc.renesas.com (Postfix) with ESMTP id 70B604DF0B; Fri, 12 Sep 2014 17:02:17 +0900 (JST) Received: by relmlac1.idc.renesas.com (Postfix, from userid 0) id 609068002E; Fri, 12 Sep 2014 17:02:17 +0900 (JST) Received: from relmlac1.idc.renesas.com (localhost [127.0.0.1]) by relmlac1.idc.renesas.com (Postfix) with ESMTP id 5B53F8002D; Fri, 12 Sep 2014 17:02:17 +0900 (JST) Received: from relmlii2.idc.renesas.com [10.200.68.66] by relmlac1.idc.renesas.com with ESMTP id TAK02738; Fri, 12 Sep 2014 17:02:17 +0900 X-IronPort-AV: E=Sophos;i="5.04,511,1406559600"; d="scan'208";a="169977481" Received: from unknown (HELO [10.164.207.237]) ([10.164.207.237]) by relmlii2.idc.renesas.com with ESMTP; 12 Sep 2014 17:02:17 +0900 Message-ID: <5412A889.2000209@renesas.com> Date: Fri, 12 Sep 2014 17:02:17 +0900 From: Khiem Nguyen User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:31.0) Gecko/20100101 Thunderbird/31.1.1 MIME-Version: 1.0 To: Magnus Damm , Simon Horman , Ulrich Hecht CC: khiem.nguyen.xt@renesas.com, Linux-sh list , KEITA KOBAYASHI Subject: [PATCH] ARM: shmobile: Fix wrong calculation in shmobile_init_delay() Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-9.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 The processing to get CPU information loop on all available CPUs and decide whether calculating preset_lpj for for CA15 or CA7/8/9. The calculation will go for CA7/8/9 prior to CA15. The commit 0dc50fd ARM: shmobile: support Cortex-A7 in shmobile_init_delay() introduced wrong CPU selection in case CA15 and CA7/8/9 coexist, e.g R-CarH2. At the end, it leads to the wrong calculation of preset_lpj for R-CarH2. Fix it by selecting the first CPU in DTS file. Signed-off-by: Khiem Nguyen --- arch/arm/mach-shmobile/timer.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-shmobile/timer.c b/arch/arm/mach-shmobile/timer.c index 87c6be1..9394cad 100644 --- a/arch/arm/mach-shmobile/timer.c +++ b/arch/arm/mach-shmobile/timer.c @@ -59,10 +59,14 @@ void __init shmobile_init_delay(void) if (of_device_is_compatible(np, "arm,cortex-a7") || of_device_is_compatible(np, "arm,cortex-a8") || - of_device_is_compatible(np, "arm,cortex-a9")) + of_device_is_compatible(np, "arm,cortex-a9")) { is_a7_a8_a9 = true; - else if (of_device_is_compatible(np, "arm,cortex-a15")) + break; + } + else if (of_device_is_compatible(np, "arm,cortex-a15")) { is_a15 = true; + break; + } } of_node_put(cpus);