From patchwork Tue Mar 25 22:48:22 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gregory CLEMENT X-Patchwork-Id: 3890991 Return-Path: X-Original-To: patchwork-linux-pm@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 5617A9F2B6 for ; Tue, 25 Mar 2014 22:51:06 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 819DD201F9 for ; Tue, 25 Mar 2014 22:51:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A638B2016C for ; Tue, 25 Mar 2014 22:51:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755152AbaCYWud (ORCPT ); Tue, 25 Mar 2014 18:50:33 -0400 Received: from top.free-electrons.com ([176.31.233.9]:49869 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755873AbaCYWtB (ORCPT ); Tue, 25 Mar 2014 18:49:01 -0400 Received: by mail.free-electrons.com (Postfix, from userid 106) id 005AA25F9; Tue, 25 Mar 2014 23:49:00 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from localhost (tra42-5-83-152-246-54.fbx.proxad.net [83.152.246.54]) by mail.free-electrons.com (Postfix) with ESMTPSA id 8F75B813; Tue, 25 Mar 2014 23:49:00 +0100 (CET) From: Gregory CLEMENT To: Daniel Lezcano , "Rafael J. Wysocki" , linux-pm@vger.kernel.org, Jason Cooper , Andrew Lunn , Sebastian Hesselbarth , Gregory CLEMENT Cc: Thomas Petazzoni , Ezequiel Garcia , linux-arm-kernel@lists.infradead.org, Lior Amsalem , Tawfik Bayouk , Nadav Haklai , linux-kernel@vger.kernel.org Subject: [PATCH v5 11/14] ARM: mvebu: Set the start address of a CPU in a separate function Date: Tue, 25 Mar 2014 23:48:22 +0100 Message-Id: <1395787705-31061-12-git-send-email-gregory.clement@free-electrons.com> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1395787705-31061-1-git-send-email-gregory.clement@free-electrons.com> References: <1395787705-31061-1-git-send-email-gregory.clement@free-electrons.com> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Setting the start (or boot) address of a CPU is no more used only during SMP bring up, but it will also be used by the CPU idle functions or later by the CPU hot plug ones. This commit moves it in a separate function. Signed-off-by: Gregory CLEMENT --- arch/arm/mach-mvebu/pmsu.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-mvebu/pmsu.c b/arch/arm/mach-mvebu/pmsu.c index c45029f0c0b4..3fc25d94e893 100644 --- a/arch/arm/mach-mvebu/pmsu.c +++ b/arch/arm/mach-mvebu/pmsu.c @@ -76,6 +76,12 @@ static struct of_device_id of_pmsu_table[] = { { /* end of list */ }, }; +static void armada_370_xp_pmsu_set_start_addr(void *start_addr, int hw_cpu) +{ + writel(virt_to_phys(start_addr), pmsu_mp_base + + PMSU_BOOT_ADDR_REDIRECT_OFFSET(hw_cpu)); +} + #ifdef CONFIG_SMP int armada_xp_boot_cpu(unsigned int cpu_id, void *boot_addr) { @@ -88,8 +94,7 @@ int armada_xp_boot_cpu(unsigned int cpu_id, void *boot_addr) hw_cpu = cpu_logical_map(cpu_id); - writel(virt_to_phys(boot_addr), pmsu_mp_base + - PMSU_BOOT_ADDR_REDIRECT_OFFSET(hw_cpu)); + armada_370_xp_pmsu_set_start_addr(boot_addr, hw_cpu); /* Release CPU from reset by clearing reset bit*/ reg = readl(pmsu_reset_base + PMSU_RESET_CTL_OFFSET(hw_cpu));