From patchwork Fri Jun 21 08:05:17 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ryan Harkin X-Patchwork-Id: 18041 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-bk0-f70.google.com (mail-bk0-f70.google.com [209.85.214.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id C955125E54 for ; Fri, 21 Jun 2013 08:05:48 +0000 (UTC) Received: by mail-bk0-f70.google.com with SMTP id ji1sf6568869bkc.5 for ; Fri, 21 Jun 2013 01:05:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-beenthere:x-forwarded-to:x-forwarded-for :delivered-to:from:to:subject:date:message-id:x-mailer:in-reply-to :references:x-gm-message-state:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-google-group-id:list-post:list-help:list-archive:list-unsubscribe; bh=D/9ZijzlpDvCuRDU1LGskrTR28qBMTJ8CfG11/4QRSw=; b=hbFdyc9ilDOPB4A6hOtFkqCgejbuzmdZpxqjlTHsrtxh3KklEj6Q/6vaz0B5kBFV+I /hIMKDyxGYhBNxUxj8K8xgCfPezLQW7SFr+C+1D8o2+cZ2FnfVgDc1S9AXX7qg60Rj71 PQ2Hbd5eK5pNjzan2pWyRim6CsUhp5Dr67J5sczrg4eTBdU1UfvD1utEEeCOwqys/3CF 6H3DHoaxA6233b0/QzMH/03nFZLZ77T7ECjdNzl0Au6qsBU0IYAMOMPBpjye2pr4ig6Q 5eJo3geuwLpZ6LvAUmzvC2/QiRJ0dSbjok+HxgzydsvJ6boFPaNoXk/GD2473QWDuGzI Uphw== X-Received: by 10.180.36.211 with SMTP id s19mr161346wij.1.1371801947662; Fri, 21 Jun 2013 01:05:47 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.180.76.6 with SMTP id g6ls328214wiw.0.gmail; Fri, 21 Jun 2013 01:05:47 -0700 (PDT) X-Received: by 10.180.14.162 with SMTP id q2mr1927628wic.46.1371801947393; Fri, 21 Jun 2013 01:05:47 -0700 (PDT) Received: from mail-ve0-x233.google.com (mail-ve0-x233.google.com [2607:f8b0:400c:c01::233]) by mx.google.com with ESMTPS id li6si1542571wjb.47.2013.06.21.01.05.47 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 21 Jun 2013 01:05:47 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400c:c01::233 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=2607:f8b0:400c:c01::233; Received: by mail-ve0-f179.google.com with SMTP id d10so5964755vea.24 for ; Fri, 21 Jun 2013 01:05:46 -0700 (PDT) X-Received: by 10.58.215.200 with SMTP id ok8mr5109826vec.21.1371801946318; Fri, 21 Jun 2013 01:05:46 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.58.165.8 with SMTP id yu8csp51556veb; Fri, 21 Jun 2013 01:05:45 -0700 (PDT) X-Received: by 10.180.187.234 with SMTP id fv10mr1985116wic.29.1371801945153; Fri, 21 Jun 2013 01:05:45 -0700 (PDT) Received: from mail-we0-x22b.google.com (mail-we0-x22b.google.com [2a00:1450:400c:c03::22b]) by mx.google.com with ESMTPS id wk5si1522361wjb.129.2013.06.21.01.05.44 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 21 Jun 2013 01:05:45 -0700 (PDT) Received-SPF: neutral (google.com: 2a00:1450:400c:c03::22b is neither permitted nor denied by best guess record for domain of ryan.harkin@linaro.org) client-ip=2a00:1450:400c:c03::22b; Received: by mail-we0-f171.google.com with SMTP id m46so6156506wev.16 for ; Fri, 21 Jun 2013 01:05:44 -0700 (PDT) X-Received: by 10.194.78.110 with SMTP id a14mr8259125wjx.84.1371801944654; Fri, 21 Jun 2013 01:05:44 -0700 (PDT) Received: from qpc.lan (82-69-54-187.dsl.in-addr.zen.co.uk. [82.69.54.187]) by mx.google.com with ESMTPSA id ay7sm21069904wib.9.2013.06.21.01.05.43 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 21 Jun 2013 01:05:44 -0700 (PDT) From: Ryan Harkin To: ryan.harkin@linaro.org, edk2-devel@lists.sourceforge.net, patches@linaro.org, boot-architecture@lists.linaro.org, olivier.martin@arm.com Subject: [PATCH 4/9] ArmPlatformPkg/ArmVExpressPkg: add Shutdown support Date: Fri, 21 Jun 2013 09:05:17 +0100 Message-Id: <1371801922-15142-5-git-send-email-ryan.harkin@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1371801922-15142-1-git-send-email-ryan.harkin@linaro.org> References: <1371801922-15142-1-git-send-email-ryan.harkin@linaro.org> X-Gm-Message-State: ALoCoQkAkFGsPy12aQqyWSBNPZVRfGa+5RrfJWIR0UnKyFv4db3EyGlKtCbdDUYArhJUAWTArl8N X-Original-Sender: ryan.harkin@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:400c:c01::233 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , LibResetSystem was performing a cold reboot for both reboot and shutdown. This patch updates LibResetSystem to pass SYS_CFG_SHUTDOWN to the microcontroller when called wit EfiResetShutdown. Signed-off-by: Ryan Harkin --- .../Library/ResetSystemLib/ResetSystemLib.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ArmPlatformPkg/ArmVExpressPkg/Library/ResetSystemLib/ResetSystemLib.c b/ArmPlatformPkg/ArmVExpressPkg/Library/ResetSystemLib/ResetSystemLib.c index f858317..f32b533 100644 --- a/ArmPlatformPkg/ArmVExpressPkg/Library/ResetSystemLib/ResetSystemLib.c +++ b/ArmPlatformPkg/ArmVExpressPkg/Library/ResetSystemLib/ResetSystemLib.c @@ -49,12 +49,19 @@ LibResetSystem ( case EfiResetWarm: // Map a warm reset into a cold reset case EfiResetCold: - case EfiResetShutdown: // Send the REBOOT function to the platform microcontroller ArmPlatformSysConfigSet (SYS_CFG_REBOOT, 0); // We should never be here while(1); + break; + case EfiResetShutdown: + // Send the SHUTDOWN function to the platform microcontroller + ArmPlatformSysConfigSet (SYS_CFG_SHUTDOWN, 0); + + // We should never be here + while(1); + break; } ASSERT(FALSE);