mirror of https://lore.kernel.org/linux-amlogic/
 help / color / mirror / Atom feed
From: martin.blumenstingl@googlemail.com (Martin Blumenstingl)
To: linus-amlogic@lists.infradead.org
Subject: [PATCH v2 06/10] ARM: dts: meson8: add reserved memory zones
Date: Thu, 15 Jun 2017 23:33:48 +0200	[thread overview]
Message-ID: <20170615213352.25134-7-martin.blumenstingl@googlemail.com> (raw)
In-Reply-To: <20170615213352.25134-1-martin.blumenstingl@googlemail.com>

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 <martin.blumenstingl@googlemail.com>
---
 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 at 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 at 4f00000 {
+			reg = <0x4f00000 0x100000>;
+			no-map;
+		};
+	};
 }; /* end of / */
 
 &aobus {
-- 
2.13.1

  parent reply	other threads:[~2017-06-15 21:33 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-11 10:16 [PATCH 00/13] add support for more devices on Meson8 and Meson8b Martin Blumenstingl
2017-06-11 10:16 ` [PATCH 01/13] clk: meson8b: export the SAR ADC clocks Martin Blumenstingl
2017-06-12  7:28   ` Neil Armstrong
2017-06-11 10:16 ` [PATCH 02/13] clk: meson8b: export the SDIO clock Martin Blumenstingl
2017-06-12  7:28   ` Neil Armstrong
2017-06-11 10:16 ` [PATCH 03/13] clk: meson8b: export the gate clock for the HW random number generator Martin Blumenstingl
2017-06-12  7:28   ` Neil Armstrong
2017-06-11 10:16 ` [PATCH 04/13] clk: meson8b: export the USB clocks Martin Blumenstingl
2017-06-12  7:28   ` Neil Armstrong
2017-06-11 10:16 ` [PATCH 05/13] clk: meson8b: export the ethernet gate clock Martin Blumenstingl
2017-06-12  7:28   ` Neil Armstrong
2017-06-11 10:16 ` [PATCH 06/13] ARM: dts: meson8: add the PWM_E and PWM_F pins Martin Blumenstingl
2017-06-12  7:32   ` Neil Armstrong
2017-06-11 10:16 ` [PATCH 07/13] ARM: dts: meson8: add the pins for the SDIO controller Martin Blumenstingl
2017-06-12  7:32   ` Neil Armstrong
2017-06-11 10:16 ` [PATCH 08/13] ARM: dts: meson: add the SAR ADC Martin Blumenstingl
2017-06-12  7:33   ` Neil Armstrong
2017-06-11 10:16 ` [PATCH 09/13] ARM: dts: meson8: add reserved memory zones Martin Blumenstingl
2017-06-12  7:32   ` Neil Armstrong
2017-06-14 21:46     ` Martin Blumenstingl
2017-06-11 10:16 ` [PATCH 10/13] ARM: dts: meson: add the hardware random number generator Martin Blumenstingl
2017-06-12  7:35   ` Neil Armstrong
2017-06-11 10:16 ` [PATCH 11/13] ARM: dts: meson: add USB support on Meson8 and Meson8b Martin Blumenstingl
2017-06-12  7:36   ` Neil Armstrong
2017-06-11 10:16 ` [PATCH 12/13] ARM: dts: meson8b: add the SCU device node Martin Blumenstingl
2017-06-12  7:37   ` Neil Armstrong
2017-06-11 10:16 ` [PATCH 13/13] ARM: dts: meson: use the real ethernet clock on Meson8 and Meson8b Martin Blumenstingl
2017-06-12  7:37   ` Neil Armstrong
2017-06-12  7:32 ` [PATCH 00/13] add support for more devices " Jerome Brunet
2017-06-14 21:39   ` Martin Blumenstingl
2017-06-15 21:33 ` [PATCH v2 00/10] " Martin Blumenstingl
2017-06-15 21:33   ` [PATCH v2 01/10] ARM: dts: meson: use C preprocessor friendly include syntax Martin Blumenstingl
2017-06-15 21:33   ` [PATCH v2 02/10] ARM: dts: meson: use GIC_SPI and IRQ_TYPE_EDGE_RISING macros Martin Blumenstingl
2017-06-15 21:33   ` [PATCH v2 03/10] ARM: dts: meson8: add the PWM_E and PWM_F pins Martin Blumenstingl
2017-06-15 21:33   ` [PATCH v2 04/10] ARM: dts: meson8: add the pins for the SDIO controller Martin Blumenstingl
2017-06-15 21:33   ` [PATCH v2 05/10] ARM: dts: meson: add the SAR ADC Martin Blumenstingl
2017-06-15 21:33   ` Martin Blumenstingl [this message]
2017-06-15 21:33   ` [PATCH v2 07/10] ARM: dts: meson: add the hardware random number generator Martin Blumenstingl
2017-06-15 21:33   ` [PATCH v2 08/10] ARM: dts: meson: add USB support on Meson8 and Meson8b Martin Blumenstingl
2017-06-15 21:33   ` [PATCH v2 09/10] ARM: dts: meson8b: add the SCU device node Martin Blumenstingl
2017-06-15 21:33   ` [PATCH v2 10/10] ARM: dts: meson: use the real ethernet clock on Meson8 and Meson8b Martin Blumenstingl
2017-06-16 19:10   ` [PATCH v2 00/10] add support for more devices " Kevin Hilman
2017-06-16 19:12   ` Kevin Hilman
2017-06-16 23:00     ` Martin Blumenstingl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170615213352.25134-7-martin.blumenstingl@googlemail.com \
    --to=martin.blumenstingl@googlemail.com \
    --cc=linus-amlogic@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®