From patchwork Mon Feb 16 12:54:49 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 440094 X-Patchwork-Delegate: twarren@nvidia.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 77F4A140213 for ; Tue, 17 Feb 2015 00:09:46 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 86CBE4B78E; Mon, 16 Feb 2015 14:09:15 +0100 (CET) X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7biiYqOK8Xzi; Mon, 16 Feb 2015 14:09:15 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 0AA784B7CF; Mon, 16 Feb 2015 14:09:04 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 386554B7DB for ; Mon, 16 Feb 2015 14:08:52 +0100 (CET) X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id gDL-J7SimgO1 for ; Mon, 16 Feb 2015 14:08:52 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from goliath.siemens.de (goliath.siemens.de [192.35.17.28]) by theia.denx.de (Postfix) with ESMTPS id 8C26A4B7AF for ; Mon, 16 Feb 2015 14:08:38 +0100 (CET) Received: from mail1.siemens.de (localhost [127.0.0.1]) by goliath.siemens.de (8.14.3/8.14.3) with ESMTP id t1GCspE0018096; Mon, 16 Feb 2015 13:54:51 +0100 Received: from md1f2u6c.ww002.siemens.net (md1f2u6c.mch.sbs.de [139.25.40.156] (may be forged)) by mail1.siemens.de (8.14.3/8.14.3) with ESMTP id t1GCso9T005430; Mon, 16 Feb 2015 13:54:51 +0100 From: Jan Kiszka To: U-Boot Mailing List , Tom Warren Date: Mon, 16 Feb 2015 13:54:49 +0100 Message-Id: <6fc4b6faf718f56c4ca0ffb109fe80774299f558.1424091289.git.jan.kiszka@siemens.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: References: In-Reply-To: References: Cc: Paul Walmsley , Ian Campbell , Thierry Reding Subject: [U-Boot] [PATCH v2 12/12] tegra: Set CNTFRQ for secondary CPUs X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" We only set CNTFRQ in arch_timer_init for the boot CPU. But this has to happen for all cores. Fixing this resolves problems of KVM with emulating the generic timer/counter. Signed-off-by: Jan Kiszka --- arch/arm/cpu/armv7/tegra-common/psci.S | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/arch/arm/cpu/armv7/tegra-common/psci.S b/arch/arm/cpu/armv7/tegra-common/psci.S index b7501fb..119c246 100644 --- a/arch/arm/cpu/armv7/tegra-common/psci.S +++ b/arch/arm/cpu/armv7/tegra-common/psci.S @@ -51,12 +51,25 @@ ENTRY(psci_arch_init) mrc p15, 0, r4, c0, c0, 5 @ MPIDR and r4, r4, #7 @ number of CPUs in cluster + + adr r5, _sys_clock_freq + cmp r4, #0 + + mrceq p15, 0, r7, c14, c0, 0 @ read CNTFRQ from CPU0 + streq r7, [r5] + + ldrne r7, [r5] + mcrne p15, 0, r7, c14, c0, 0 @ write CNTFRQ to CPU1..3 + bl psci_get_cpu_stack_top mov sp, r5 bx r6 ENDPROC(psci_arch_init) +_sys_clock_freq: + .word + ENTRY(psci_cpu_off) bl psci_cpu_off_common