From patchwork Thu Nov 24 13:57:50 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Schwierzeck X-Patchwork-Id: 127521 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 E090B1007DD for ; Fri, 25 Nov 2011 00:59:05 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 8DEFD2822F; Thu, 24 Nov 2011 14:58:49 +0100 (CET) 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 VDBcCgMlNuXU; Thu, 24 Nov 2011 14:58:49 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 51B9328266; Thu, 24 Nov 2011 14:58:24 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 163ED281E4 for ; Thu, 24 Nov 2011 14:58:16 +0100 (CET) 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 9Of5nZ7O1QKf for ; Thu, 24 Nov 2011 14:58:15 +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 mail-fx0-f44.google.com (mail-fx0-f44.google.com [209.85.161.44]) by theia.denx.de (Postfix) with ESMTPS id 790612823B for ; Thu, 24 Nov 2011 14:58:11 +0100 (CET) Received: by mail-fx0-f44.google.com with SMTP id q16so1087274faa.3 for ; Thu, 24 Nov 2011 05:58:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=NC5TuK1gJr5flXbcubh2mvmFKejyVqlZ6w6x/TtPRq8=; b=fMj2cqreAxdOs8UYbj8/NbJyNUkJcMKJM0N/5ULsSFK8HeWkai+QpLxw0UPitddGpA UetfdzAQ4mbteyrMKZiZa8LK58sOmxxpR8j0pw+puIxxJXNvEW24Pi2+PLJ9u2WMhpUa RYCjRnVG+BJPVAj0glHSt/WvaZ7lWE6oxI9Ak= Received: by 10.205.123.16 with SMTP id gi16mr29319463bkc.41.1322143091650; Thu, 24 Nov 2011 05:58:11 -0800 (PST) Received: from pc000853.sas.sys.sphairon.com (dslb-088-073-225-170.pools.arcor-ip.net. [88.73.225.170]) by mx.google.com with ESMTPS id hy13sm15911381bkc.0.2011.11.24.05.58.10 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 24 Nov 2011 05:58:11 -0800 (PST) From: Daniel Schwierzeck To: u-boot@lists.denx.de Date: Thu, 24 Nov 2011 14:57:50 +0100 Message-Id: <1322143076-20349-6-git-send-email-daniel.schwierzeck@googlemail.com> X-Mailer: git-send-email 1.7.7.2 In-Reply-To: <1322143076-20349-1-git-send-email-daniel.schwierzeck@googlemail.com> References: <1322143076-20349-1-git-send-email-daniel.schwierzeck@googlemail.com> Cc: Thomas Langer , Shinya Kuribayashi Subject: [U-Boot] [PATCH 05/11] MIPS: add sleep handler for slave CPUs in multi-processor systems 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 This handler can be activated on multi-processor systems to boot only the master CPU. All slave CPUs are halted by executing the WAIT instruction. This is also useful to reduce the power consumption at boot time. Signed-off-by: Daniel Schwierzeck Acked-by: Marek Vasut --- arch/mips/cpu/mips32/start.S | 16 ++++++++++++++++ 1 files changed, 16 insertions(+), 0 deletions(-) diff --git a/arch/mips/cpu/mips32/start.S b/arch/mips/cpu/mips32/start.S index 9c1b2f7..b6cb4be 100644 --- a/arch/mips/cpu/mips32/start.S +++ b/arch/mips/cpu/mips32/start.S @@ -224,6 +224,14 @@ reset: setup_c0_status_reset + /* Set all slave CPUs in sleep mode */ +#ifdef CONFIG_SYS_MPS_SLAVE_CPU_SLEEP + mfc0 k0, CP0_EBASE + and k0, EBASEF_CPUNUM + bne k0, zero, slave_cpu_sleep + nop +#endif + /* Init Timer */ mtc0 zero, CP0_COUNT mtc0 zero, CP0_COMPARE @@ -383,3 +391,11 @@ romReserved: romExcHandle: b romExcHandle + + /* Additional handlers */ +#ifdef CONFIG_SYS_MPS_SLAVE_CPU_SLEEP +slave_cpu_sleep: + wait + b slave_cpu_sleep + nop +#endif