From patchwork Thu Jun 15 21:33:48 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Blumenstingl X-Patchwork-Id: 9790309 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 A60E3602CB for ; Thu, 15 Jun 2017 21:34:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 972552843F for ; Thu, 15 Jun 2017 21:34:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8BF062848D; Thu, 15 Jun 2017 21:34:51 +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=-1.9 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 33BB22841E for ; Thu, 15 Jun 2017 21:34:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=Wp/5FZtwH79xDDZQ3QJkE3Xi1N02bC/3S18PudEjsxA=; b=aEmGyJO7hmlbBKLoXZPikgjpI5 6ssOxmHWNq2PKEeYNvMvL6K8ff9vzoIwvPGFDyB4iINz2UcIRXRkdjjNHYGLvURucKn/Icr+KFKwa qzyoacZYwy7IJQXNo3nwM/ZxIGmOtkhlShhJdJT7JV8wxT2G7Vb7gsruOHZEHgb3nlYhqi0+cAI3h LQ/zz/i2uJOfMfDySYrej/jflGmJgGOAp8CIFpELnM7vrUO/1hF6b+fgZXG4qgbJwOjgeQGlJd3VQ z+QLD8fVNOLhrbdTQjxXkPZSbEhuCreESB+BSeeRf7fyS1cW8mMRJ76J77MI4csNhD1JiNfCJ3wfs dpwilzsw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dLcPb-0007BQ-0Z; Thu, 15 Jun 2017 21:34:43 +0000 Received: from mail-wm0-x241.google.com ([2a00:1450:400c:c09::241]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dLcPQ-0006vN-My for linux-amlogic@lists.infradead.org; Thu, 15 Jun 2017 21:34:35 +0000 Received: by mail-wm0-x241.google.com with SMTP id 70so1832965wme.1 for ; Thu, 15 Jun 2017 14:34:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Subfl6591y5Z0M8rf6253KthjSy5X7zHE1sY3zpWnyE=; b=ig+v3xBvDzHG758AO+K2R+sb+nu/EEglEmFApEyAP5Yd5NR+SCmeX2uJ2mS/D80Xdp QbpXfyh0XpvmBjnEYQfbBSm65BAgHK1gWOimOuUlcRFXX/MJEtnerCKlqybmYhGjOUAb b2GXfBz3JNh1LrVp7qcCCO8fhg/ZYg6zxp01jRsTsxyJqn6bMZuqJaj2rMyzkYnntdij c8zSpPS3fqAK3n6+ZMNKxPKWta1fcmFzudr+PVBmxHKlabApj3RL7bbAcFDru2f3LBaV BXE2ji1B8EyuJGouzay+zKdp045Cn9QByYrIelQqs5sUoagmmoX5PMCVmpeQwKL4pO4J bOrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Subfl6591y5Z0M8rf6253KthjSy5X7zHE1sY3zpWnyE=; b=ti0YR5w2K+SHZDBn9xslYpAxfYM100bnXcm+3O4X6LqW8ujnL+Yml6DC8HHbxgA7/x OqKHVnGL3cx+33MjQAq6OBWbhEphZenDdC2PEQOseWS28MzE+7r2EBHh2L2CDbJLa0os Uplf7Ez2QRYz12HvcLk7+EVwF2Y3JH5/Y6skdQSdWQLxfwffjHoWNGoi7F2ARFz3X7Y3 CfB/8wOTW9feQjOM5LSH6NHsf9/dS+wYoixc0xBuKfxupMsDReXLCVpwSIFfdyvjWbiC sY+R48OvEqH4O30EHivKlZx3/EVcS9BvylV8fw0SivcTChvW53Vx4RzvOzfdg6PfPJRF cGlg== X-Gm-Message-State: AKS2vOyujvkgfwWS3m7eKGGJTq8XhWO0TuDtiXXhVQK9YhRBiUGj9TFs b9Wl8LeE1cKuiG0Avwg= X-Received: by 10.28.173.10 with SMTP id w10mr4874512wme.98.1497562451934; Thu, 15 Jun 2017 14:34:11 -0700 (PDT) Received: from blackbox.darklights.net (p200300DCD3D2E00439AFAA47B57A3DE2.dip0.t-ipconnect.de. [2003:dc:d3d2:e004:39af:aa47:b57a:3de2]) by smtp.googlemail.com with ESMTPSA id a28sm423575wra.17.2017.06.15.14.34.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Jun 2017 14:34:11 -0700 (PDT) From: Martin Blumenstingl To: linux-amlogic@lists.infradead.org, narmstrong@baylibre.com, khilman@baylibre.com, carlo@caione.org Subject: [PATCH v2 06/10] ARM: dts: meson8: add reserved memory zones Date: Thu, 15 Jun 2017 23:33:48 +0200 Message-Id: <20170615213352.25134-7-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.13.1 In-Reply-To: <20170615213352.25134-1-martin.blumenstingl@googlemail.com> References: <20170611101644.28581-1-martin.blumenstingl@googlemail.com> <20170615213352.25134-1-martin.blumenstingl@googlemail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170615_143432_945638_C102BA9A X-CRM114-Status: GOOD ( 13.35 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Martin Blumenstingl , devicetree@vger.kernel.org, mturquette@baylibre.com, linux@armlinux.org.uk, jbrunet@baylibre.com MIME-Version: 1.0 Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP There seem to be two memory regions that need to be reserved, otherwise the system just hangs when running: $ stress --vm-bytes $(awk '/MemFree/{printf "%d\n", $2 * 0.9;}' < /proc/meminfo)k \ --vm-keep -m 1 The first memory region is really crucial and without it the system hangs. I could not find any references to this in Amlogic's GPL kernel sources. The second region is used by the "suspend firmware". The u-boot sources (/arch/arm/cpu/aml_meson/m8/firmwareld.c) state that the suspend firmware is located at "64M + 15M" which matches CONFIG_MESON_SUSPEND in the Amlogic GPL kernel sources. The "suspend firmware" is responsible for waking up the system from suspend state. This also fixes reading the full SD card as without this the system would simply hang (probably related to the first memory region, if some buffer is allocated there). Signed-off-by: Martin Blumenstingl --- arch/arm/boot/dts/meson8.dtsi | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/arch/arm/boot/dts/meson8.dtsi b/arch/arm/boot/dts/meson8.dtsi index 6687b1b4c7c9..df79a34a3530 100644 --- a/arch/arm/boot/dts/meson8.dtsi +++ b/arch/arm/boot/dts/meson8.dtsi @@ -83,6 +83,33 @@ reg = <0x203>; }; }; + + reserved-memory { + #address-cells = <1>; + #size-cells = <1>; + ranges; + + /* 2 MiB reserved for Hardware ROM Firmware? */ + hwrom@0 { + reg = <0x0 0x200000>; + no-map; + }; + + /* + * 1 MiB reserved for the "ARM Power Firmware": this is ARM + * code which is responsible for system suspend. It loads a + * piece of ARC code ("arc_power" in the vendor u-boot tree) + * into SRAM, executes that and shuts down the (last) ARM core. + * The arc_power firmware then checks various wakeup sources + * (IR remote receiver, HDMI CEC, WIFI and Bluetooth wakeup or + * simply the power key) and re-starts the ARM core once it + * detects a wakeup request. + */ + power-firmware@4f00000 { + reg = <0x4f00000 0x100000>; + no-map; + }; + }; }; /* end of / */ &aobus {