From patchwork Mon Aug 8 23:48:40 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 9269997 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 1B6AC607D6 for ; Mon, 8 Aug 2016 23:50:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0BE082766D for ; Mon, 8 Aug 2016 23:50:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 009AB28113; Mon, 8 Aug 2016 23:50:29 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 7C3502766D for ; Mon, 8 Aug 2016 23:50:29 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bWuIC-0001UT-HF; Mon, 08 Aug 2016 23:49:12 +0000 Received: from mail-pf0-x22b.google.com ([2607:f8b0:400e:c00::22b]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bWuI7-0001IT-5w for linux-arm-kernel@lists.infradead.org; Mon, 08 Aug 2016 23:49:09 +0000 Received: by mail-pf0-x22b.google.com with SMTP id h186so123438289pfg.3 for ; Mon, 08 Aug 2016 16:48:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=BjNbt7IaR3hdlz/D4JMKzw3B4asmvt4mAkqlbXL+IpM=; b=f/RJPHA+Ay44TkgBW9WIoAZ0HcdPy9EC/dV/3/f5pleVAY3wiA41N3xg8GhjwtEvlI YU11onqtwitvfRsQtK+jQLXcjx3rKDQwtSAen8TWaCyoyBznVrcyEXRcp0oH5EVa6EZ9 pxjgdyC8rM6A1hVmDhHo4hYxy19WcyGwtYC5Y= 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:in-reply-to :references; bh=BjNbt7IaR3hdlz/D4JMKzw3B4asmvt4mAkqlbXL+IpM=; b=V389IFNRNttPNaHplfVm/kzD92rNsIaGCsHDYApYmJfEYSUTmrixFxC2odM7jMbQ9K T8maBwJDAScteQy+CY8OCyr9FCPp3j6aQPupN4iYi21163VUFucSgWZ90njQpI4ni+VA 4jylRmvxD5jVe7SyVwZ4GrPx1ETPfdLUaR+KwNq42gdup3XY5jeVN32/R98CcBpDkmkR A88ZR5U0qlZmHICmrl5wqr16znI9KvcHSYo61WRSF6QQGq4B+4NAokDE/AmGgsNBv2MV CIMiNjEmKnvDx+WM5Nu1iFP7KWDu8QlOJ636D4uFUkrf0YB0SisZkDHbZgX8Udk337gA Rqgg== X-Gm-Message-State: AEkoousJEePHA/4nhQIMSN9Ttll2UgSzQiVB9vJZVx4ZXT1pWUmRt/iSVUl4c84tRiFTP8/D X-Received: by 10.98.196.77 with SMTP id y74mr166173030pff.97.1470700126404; Mon, 08 Aug 2016 16:48:46 -0700 (PDT) Received: from localhost.localdomain (c-73-67-244-238.hsd1.or.comcast.net. [73.67.244.238]) by smtp.gmail.com with ESMTPSA id f3sm50676361pff.26.2016.08.08.16.48.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 08 Aug 2016 16:48:45 -0700 (PDT) From: John Stultz To: lkml Subject: [RFC][PATCH 4/4 v2] arm64: dts: hikey: Add pstore support for HiKey Date: Mon, 8 Aug 2016 16:48:40 -0700 Message-Id: <1470700120-26510-1-git-send-email-john.stultz@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: References: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160808_164907_361366_3FC6E913 X-CRM114-Status: GOOD ( 13.69 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , devicetree@vger.kernel.org, Kees Cook , Guodong Xu , Catalin Marinas , Will Deacon , Wei Xu , Rob Herring , John Stultz , Haojian Zhuang , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This patch reserves some memory in the DTS and sets up a pstore device tree node to enable pstore support on HiKey. Cc: Kees Cook Cc: Guodong Xu Cc: Haojian Zhuang Cc: Wei Xu Cc: Rob Herring Cc: Mark Rutland Cc: Catalin Marinas Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Cc: devicetree@vger.kernel.org Signed-off-by: John Stultz Reviewed-by: Kees Cook --- v2: Quick rework to update to new ramoops format. arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts b/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts index b2683e4..748d0dc 100644 --- a/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts +++ b/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts @@ -32,6 +32,7 @@ * 0x05f0,1000 - 0x05f0,1fff: Reboot reason * 0x06df,f000 - 0x06df,ffff: Mailbox message data * 0x0740,f000 - 0x0740,ffff: MCU firmware section + * 0x21f0,0000 - 0x21ff,ffff: pstore/ramoops buffer * 0x3e00,0000 - 0x3fff,ffff: OP-TEE */ memory@0 { @@ -40,9 +41,25 @@ <0x00000000 0x05f00000 0x00000000 0x00001000>, <0x00000000 0x05f02000 0x00000000 0x00efd000>, <0x00000000 0x06e00000 0x00000000 0x0060f000>, - <0x00000000 0x07410000 0x00000000 0x36bf0000>; + <0x00000000 0x07410000 0x00000000 0x1aaf0000>, + <0x00000000 0x22000000 0x00000000 0x1c000000>; }; + reserved-memory { + #address-cells = <2>; + #size-cells = <2>; + ranges; + + ramoops@0x21f00000 { + compatible = "ramoops"; + reg = <0x0 0x21f00000 0x0 0x00100000>; + record-size = <0x00020000>; + console-size = <0x00020000>; + ftrace-size = <0x00020000>; + }; + }; + + reboot-mode-syscon@5f01000 { compatible = "syscon", "simple-mfd"; reg = <0x0 0x05f01000 0x0 0x00001000>;