From patchwork Mon Apr 22 11:06:41 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dirk Eibach X-Patchwork-Id: 238448 X-Patchwork-Delegate: trini@ti.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 EEADE2C00FD for ; Mon, 22 Apr 2013 21:13:30 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id CA5DD4A261; Mon, 22 Apr 2013 13:13:24 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de 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 GBNKrpr7gqdt; Mon, 22 Apr 2013 13:13:24 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 1AFB34A22C; Mon, 22 Apr 2013 13:13:03 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 1D7CC4A20D for ; Mon, 22 Apr 2013 13:12:48 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de 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 drqTrjUJrxuE for ; Mon, 22 Apr 2013 13:12:47 +0200 (CEST) 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 sputnik.urmx.de (sputnik.urmx.de [88.198.51.18]) by theia.denx.de (Postfix) with ESMTP id 7D87D4A207 for ; Mon, 22 Apr 2013 13:12:45 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by sputnik.urmx.de (Postfix) with ESMTP id 6F5DA6034337 for ; Mon, 22 Apr 2013 13:07:07 +0200 (CEST) X-Virus-Scanned: amavisd-new at urmx.de Received: from sputnik.urmx.de ([127.0.0.1]) by localhost (sputnik.urmx.de [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id SGHQ9zcZjjj3 for ; Mon, 22 Apr 2013 13:07:07 +0200 (CEST) Received: from utm1.gdsys.de (unknown [195.243.218.178]) by mforward1.urmx.de (Postfix) with ESMTPS id 1117C603030A for ; Mon, 22 Apr 2013 13:07:07 +0200 (CEST) Received: from [172.16.100.239] (port=55247 helo=smgw1.gd.local) by utm1.gdsys.de with esmtp (Exim 4.76) (envelope-from ) id 1UUEaO-0000Sn-26 for u-boot@lists.denx.de; Mon, 22 Apr 2013 13:07:04 +0200 Received: from smgw1.gd.local (localhost [127.0.0.1]) by smgw1.gd.local (Postfix) with ESMTP id 8C53F1A30FA for ; Mon, 22 Apr 2013 13:07:04 +0200 (CEST) From: Dirk Eibach To: u-boot@lists.denx.de Date: Mon, 22 Apr 2013 13:06:41 +0200 Message-Id: <1366628805-29964-3-git-send-email-eibach@gdsys.de> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1366628805-29964-1-git-send-email-eibach@gdsys.de> References: <1366628805-29964-1-git-send-email-eibach@gdsys.de> X-SafeGuard_MailGateway: Version: 5.80.2.12968 SGMG_SOPHOS Date: 20130422110704Z Cc: Andy Fleming , Kumar Gala Subject: [U-Boot] [PATCH 2/6] mpc85xx: Add CONFIG_RELEASE_CORE0_ONLY X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de If CONFIG_RELEASE_CORE0_ONLY is set, all cores except core0 are kept in holdoff mode. Signed-off-by: Dirk Eibach --- arch/powerpc/cpu/mpc85xx/mp.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/cpu/mpc85xx/mp.c b/arch/powerpc/cpu/mpc85xx/mp.c index 43d4836..73c1024 100644 --- a/arch/powerpc/cpu/mpc85xx/mp.c +++ b/arch/powerpc/cpu/mpc85xx/mp.c @@ -350,7 +350,11 @@ static void plat_mp_up(unsigned long bootpg, unsigned int pagesize) volatile ccsr_pic_t *pic = (void *)(CONFIG_SYS_MPC8xxx_PIC_ADDR); u32 devdisr; int timeout = 10; + int numcores = 1; +#ifndef CONFIG_RELEASE_CORE0_ONLY + numcores = cpu_numcores(); +#endif whoami = in_be32(&pic->whoami); out_be32(&ecm->bptr, 0x80000000 | (bootpg >> 12)); @@ -363,7 +367,7 @@ static void plat_mp_up(unsigned long bootpg, unsigned int pagesize) out_be32(&gur->devdisr, devdisr); /* release the hounds */ - up = ((1 << cpu_numcores()) - 1); + up = ((1 << numcores) - 1); bpcr = in_be32(&ecm->eebpcr); bpcr |= (up << 24); out_be32(&ecm->eebpcr, bpcr); @@ -373,7 +377,7 @@ static void plat_mp_up(unsigned long bootpg, unsigned int pagesize) /* wait for everyone */ while (timeout) { int i; - for (i = 0; i < cpu_numcores(); i++) { + for (i = 0; i < numcores; i++) { if (table[i * NUM_BOOT_ENTRY + BOOT_ENTRY_ADDR_LOWER]) cpu_up_mask |= (1 << i); };