ipq40xx: Remove unused reserved-memory nodes
authorSven Eckelmann <sven.eckelmann@openmesh.com>
Tue, 17 Apr 2018 12:31:53 +0000 (14:31 +0200)
committerMathias Kresin <dev@kresin.me>
Fri, 20 Apr 2018 18:58:52 +0000 (20:58 +0200)
The reserved-memory regions are mostly undocumented by QCA and are named
very unspecific in the QSDK device trees. It was tried to clean them up by
commit 71ed9f10a33e ("ipq40xx: Use detailed reserved memory for A42") and
similar changes.

The features which require these regions were mostly unknown but
Senthilkumar N L <snlakshm@qti.qualcomm.com> and Sricharan Ramabadhran
<srichara@qti.qualcomm.com> provided some more insight in some of them:

* crash dump feature
  - a couple of regions used when 'qca,scm_restart_reason' dt node has the
    value 'dload_status' not set to 1
    + apps_bl <0x87000000 0x400000>
    + sbl <0x87400000 0x100000>
    + cnss_debug <0x87400000 0x100000>
    + cpu_context_dump <0x87b00000 0x080000>
  - required driver not available in Linux
  - safe to remove
* QSEE app execution
  - region tz_apps <0x87b80000 0x280000>
  - required driver not available in Linux
  - safe to remove
* communication with TZ/QSEE
  - region smem <0x87b80000 0x280000>
  - driver changes not yet upstreamed
  - must not be removed because any access can crash kernel/program
* trustzone (QSEE) private memory
  - region tz <0x87e80000 0x180000>
  - must not be removed because any access can crash kernel/program

Removing the unnecessary regions saves some kilobyte of reserved-memory and
cleans up the device tree:

* 2560 KiB
  - 8devices Jalapeno
  - AVM FRITZ!Box 4040
  - Compex WPJ428
  - Meraki MR33 Access Point
  - OpenMesh A42
* 14336 KiB
  - GL.iNet GL-B1300
  - Qualcomm Technologies, Inc. IPQ40xx/AP-DK01.1-C1

Signed-off-by: Sven Eckelmann <sven.eckelmann@openmesh.com>
target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/qcom-ipq4018-a42.dts
target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/qcom-ipq4018-fritz4040.dts
target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/qcom-ipq4018-jalapeno.dts
target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/qcom-ipq4028-wpj428.dts
target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/qcom-ipq4029-gl-b1300.dts
target/linux/ipq40xx/files-4.14/arch/arm/boot/dts/qcom-ipq4029-mr33.dts
target/linux/ipq40xx/patches-4.14/864-07-dts-ipq4019-ap-dk01.1-c1-add-spi-and-ram-nodes.patch

index d365a7e530412a6b62dd6417410f7c150fc6f2ff..3838f884a8355d31d30fa05507af0bc754a234fa 100644 (file)
                #size-cells = <0x1>;
                ranges;
 
-               tz_apps@87b80000 {
-                       reg = <0x87b80000 0x280000>;
-                       no-map;
-               };
-
                smem@87e00000 {
                        reg = <0x87e00000 0x080000>;
                        no-map;
index 4b5cbcac33b711ed1ae81da69e63800974f17d70..865e1fb1cefc83828352c64ffa8ef2c65aaa0854 100644 (file)
                #size-cells = <0x1>;
                ranges;
 
-               tz_apps@87b80000 {
-                       reg = <0x87b80000 0x280000>;
-                       reusable;
-               };
-
                smem@87e00000 {
                        reg = <0x87e00000 0x080000>;
                        no-map;
index 7e2bdcc7cda60eaa5480c2c59c6e9e150e4ecc91..f9ea31acb4b4af33e17ce9736d05ee0b93cb37e9 100644 (file)
                #size-cells = <0x1>;
                ranges;
 
-               tz_apps@87b80000 {
-                       reg = <0x87b80000 0x280000>;
-                       no-map;
-               };
-
                smem@87e00000 {
                        reg = <0x87e00000 0x080000>;
                        no-map;
index 88ea370858859ee6068e986170e023a93268c683..e970e769a6ded046f2cef23f0b92ab45cd1cd339 100644 (file)
                #size-cells = <0x1>;
                ranges;
 
-               tz_apps@87b80000 {
-                       reg = <0x87b80000 0x280000>;
-                       no-map;
-               };
-
                smem@87e00000 {
                        reg = <0x87e00000 0x080000>;
                        no-map;
index c4b002bdd67bb38879432e9822e39d89eb13055f..a34d2cd1c9edbb34b20ac57be4cb021aeb0a6d1c 100644 (file)
                #size-cells = <0x1>;
                ranges;
 
-               apps_bl@87000000 {
-                       reg = <0x87000000 0x400000>;
-                       no-map;
-               };
-
-               sbl@87400000 {
-                       reg = <0x87400000 0x100000>;
-                       no-map;
-               };
-
-               cnss_debug@87500000 {
-                       reg = <0x87500000 0x600000>;
-                       no-map;
-               };
-
-               cpu_context_dump@87b00000 {
-                       reg = <0x87b00000 0x080000>;
-                       no-map;
-               };
-
-               tz_apps@87b80000 {
-                       reg = <0x87b80000 0x280000>;
-                       no-map;
-               };
-
                smem@87e00000 {
                        reg = <0x87e00000 0x080000>;
                        no-map;
index a709ae96bd0cddf6f0c5f1b15249c013adfd0ead..c52bcf1b02e5b30e3e17cc3c2f712b11578a196a 100644 (file)
                #size-cells = <0x1>;
                ranges;
 
-               tz_apps@87b80000 {
-                       reg = <0x87b80000 0x280000>;
-                       reusable;
-               };
-
                smem@87e00000 {
                        reg = <0x87e00000 0x080000>;
                        no-map;
index e9d262069f7e365a32611e1f7824794d480df5f8..3043d63f3e3ed43402c23fb7522fbeff675b30f0 100644 (file)
@@ -1,6 +1,6 @@
 --- a/arch/arm/boot/dts/qcom-ipq4019-ap.dk01.1-c1.dts
 +++ b/arch/arm/boot/dts/qcom-ipq4019-ap.dk01.1-c1.dts
-@@ -19,4 +19,112 @@
+@@ -19,4 +19,87 @@
  / {
        model = "Qualcomm Technologies, Inc. IPQ40xx/AP-DK01.1-C1";
  
 +              #size-cells = <0x1>;
 +              ranges;
 +
-+              apps_bl@87000000 {
-+                      reg = <0x87000000 0x400000>;
-+                      no-map;
-+              };
-+
-+              sbl@87400000 {
-+                      reg = <0x87400000 0x100000>;
-+                      no-map;
-+              };
-+
-+              cnss_debug@87500000 {
-+                      reg = <0x87500000 0x600000>;
-+                      no-map;
-+              };
-+
-+              cpu_context_dump@87b00000 {
-+                      reg = <0x87b00000 0x080000>;
-+                      no-map;
-+              };
-+
-+              tz_apps@87b80000 {
-+                      reg = <0x87b80000 0x280000>;
-+                      no-map;
-+              };
-+
 +              smem@87e00000 {
 +                      reg = <0x87e00000 0x080000>;
 +                      no-map;