From patchwork Wed Jan 27 11:22:34 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Moritz Fischer X-Patchwork-Id: 573934 X-Patchwork-Delegate: monstr@monstr.eu 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 C440D1400CB for ; Wed, 27 Jan 2016 22:23:04 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=ettus-com.20150623.gappssmtp.com header.i=@ettus-com.20150623.gappssmtp.com header.b=ZfdEs6Cu; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 0CA91A7550; Wed, 27 Jan 2016 12:23:01 +0100 (CET) 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 0SVbl25k9HQE; Wed, 27 Jan 2016 12:23:00 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 82864A74EE; Wed, 27 Jan 2016 12:23:00 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 81AB4A74EE for ; Wed, 27 Jan 2016 12:22:56 +0100 (CET) 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 Q4z8Yab63j5I for ; Wed, 27 Jan 2016 12:22:56 +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-ob0-f177.google.com (mail-ob0-f177.google.com [209.85.214.177]) by theia.denx.de (Postfix) with ESMTPS id 18010A74C6 for ; Wed, 27 Jan 2016 12:22:52 +0100 (CET) Received: by mail-ob0-f177.google.com with SMTP id vt7so4441969obb.1 for ; Wed, 27 Jan 2016 03:22:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ettus-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=pyQNylc+tg9asPIdWvNo8lyHMoCIosizCFVRXwNw104=; b=ZfdEs6Cuz8Uwact0qH/Rg5hzcZO13h2MLktFPwybhtG032/+QI4Y2zjkRX+nrNMD8S FTWzaz1q8F77JKXhXoNRKzTrSCflQbN08mV44/I55n5hwqKhRA8Qx1Ngpe3/0Kdd3Zxi 4Q19v1TzxMMqpo0fqL/P+B3hHOcTcAUR4YstnqJBeEU8Rmv2sNt16gvlOC8z8Nr82ZLt Egn87XqhqeT/n7+e1nCkmzSOiiWiTPLxNufQqow7reDCEK6JHQILAtdvLYo7RQmTWpfY Ma88dlaOM57/z2RLAlZ6CogAr/ujDmZMBichvRWjxel4EkxdfU0gMQAif+KaL/29zQuE GZlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=pyQNylc+tg9asPIdWvNo8lyHMoCIosizCFVRXwNw104=; b=O0fZAxYxfzb2GsTIIvQlZM8k5drcUw9X1ZVSBCUar6vi5Jhm9jyfPAL8xvJOwvHTfe Gv91QM1gHtfJP1R9HhsR0BYRHNy42lZnp0IQoP/LtLnsBj1o8aObBi4hhJYIeHN++dVp MSBl547NWOPkDREAvIurZSUmZL7IfQaeii7oFsPnIMPv2YqQiFS8Zr9YbgNLqjKaJk4/ zgUjvoa+lL+Z0ZfkOsg9/bJiYCDJw7IPZ1hKjUtaS6LFmLhfBr5ML8ndV4CgPdMSwvPu tLw0XES6C5SPaBHeKh+1mv0Gx6FTYJcVLxGNDSJB2b5fliOzy9SXCJU2HaEjiWUEE35L Ejng== X-Gm-Message-State: AG10YOTy7SdWgLTCTb8U6KP++Itar8+59US4zxkzINA2rv3RuRgnxWjfjkRprMXfhx3vc51E X-Received: by 10.182.210.234 with SMTP id mx10mr21614783obc.47.1453893771352; Wed, 27 Jan 2016 03:22:51 -0800 (PST) Received: from archbook.ni.corp.natinst.com (HSI-KBW-149-172-174-75.hsi13.kabel-badenwuerttemberg.de. [149.172.174.75]) by smtp.gmail.com with ESMTPSA id kz2sm2782767oeb.9.2016.01.27.03.22.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 27 Jan 2016 03:22:50 -0800 (PST) From: Moritz Fischer To: michal.simek@xilinx.com Date: Wed, 27 Jan 2016 12:22:34 +0100 Message-Id: <1453893754-1187-1-git-send-email-moritz.fischer@ettus.com> X-Mailer: git-send-email 2.7.0 Cc: u-boot@lists.denx.de Subject: [U-Boot] [PATCH] ARM: zynq: Add function to get reboot status register value. 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" Signed-off-by: Moritz Fischer --- Hi Michal, I was planning to use this in future to boot into recovery mode. The change is small enough I feel that we could directly take it. If you want to hold off until there's a user that's fine for me, too. Cheers, Moritz --- arch/arm/mach-zynq/slcr.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/arm/mach-zynq/slcr.c b/arch/arm/mach-zynq/slcr.c index 05f4099..709711a 100644 --- a/arch/arm/mach-zynq/slcr.c +++ b/arch/arm/mach-zynq/slcr.c @@ -166,6 +166,11 @@ u32 zynq_slcr_get_boot_mode(void) return readl(&slcr_base->boot_mode); } +u32 zynq_slcr_get_reboot_status(void) +{ + return readl(&slcr_base->reboot_status); +} + u32 zynq_slcr_get_idcode(void) { return (readl(&slcr_base->pss_idcode) & SLCR_IDCODE_MASK) >>