lib: fdtdec: Rename routine fdtdec_setup_memory_size()
authorSiva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Mon, 16 Jul 2018 10:26:11 +0000 (15:56 +0530)
committerMichal Simek <michal.simek@xilinx.com>
Thu, 19 Jul 2018 08:49:56 +0000 (10:49 +0200)
This patch renames the routine fdtdec_setup_memory_size()
to fdtdec_setup_mem_size_base() as it now fills the
mem base as well along with size.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
31 files changed:
arch/arm/mach-mvebu/arm64-common.c
arch/arm/mach-socfpga/misc.c
board/broadcom/bcmstb/bcmstb.c
board/emulation/qemu-arm/qemu-arm.c
board/renesas/alt/alt.c
board/renesas/blanche/blanche.c
board/renesas/draak/draak.c
board/renesas/eagle/eagle.c
board/renesas/ebisu/ebisu.c
board/renesas/gose/gose.c
board/renesas/koelsch/koelsch.c
board/renesas/lager/lager.c
board/renesas/porter/porter.c
board/renesas/salvator-x/salvator-x.c
board/renesas/silk/silk.c
board/renesas/stout/stout.c
board/renesas/ulcb/ulcb.c
board/st/stm32f429-discovery/stm32f429-discovery.c
board/st/stm32f429-evaluation/stm32f429-evaluation.c
board/st/stm32f469-discovery/stm32f469-discovery.c
board/st/stm32h743-disco/stm32h743-disco.c
board/st/stm32h743-eval/stm32h743-eval.c
board/xilinx/zynq/board.c
board/xilinx/zynqmp/zynqmp.c
board/xilinx/zynqmp_r5/board.c
include/fdtdec.h
lib/fdtdec.c
tools/patman/func_test.py
tools/patman/test/0000-cover-letter.patch
tools/patman/test/0002-fdt-Correct-cast-for-sandbox-in-fdtdec_setup_memory_.patch
tools/patman/test/test01.txt

index d3ea9e6..f47273f 100644 (file)
@@ -54,7 +54,7 @@ int dram_init_banksize(void)
 
 int dram_init(void)
 {
-       if (fdtdec_setup_memory_size() != 0)
+       if (fdtdec_setup_mem_size_base() != 0)
                return -EINVAL;
 
        return 0;
index 77628e1..a4f6d5c 100644 (file)
@@ -40,7 +40,7 @@ struct bsel bsel_str[] = {
 
 int dram_init(void)
 {
-       if (fdtdec_setup_memory_size() != 0)
+       if (fdtdec_setup_mem_size_base() != 0)
                return -EINVAL;
 
        return 0;
index 25cd354..5632846 100644 (file)
@@ -48,7 +48,7 @@ int print_cpuinfo(void)
 
 int dram_init(void)
 {
-       if (fdtdec_setup_memory_size() != 0)
+       if (fdtdec_setup_mem_size_base() != 0)
                return -EINVAL;
 
        return 0;
index 085cbbe..1f5a33d 100644 (file)
@@ -47,7 +47,7 @@ int board_init(void)
 
 int dram_init(void)
 {
-       if (fdtdec_setup_memory_size() != 0)
+       if (fdtdec_setup_mem_size_base() != 0)
                return -EINVAL;
 
        return 0;
index 86e9d24..b18ab7c 100644 (file)
@@ -78,7 +78,7 @@ int board_init(void)
 
 int dram_init(void)
 {
-       if (fdtdec_setup_memory_size() != 0)
+       if (fdtdec_setup_mem_size_base() != 0)
                return -EINVAL;
 
        return 0;
index 7d48d0f..f5ada6e 100644 (file)
@@ -339,7 +339,7 @@ int board_eth_init(bd_t *bis)
 
 int dram_init(void)
 {
-       if (fdtdec_setup_memory_size() != 0)
+       if (fdtdec_setup_mem_size_base() != 0)
                return -EINVAL;
 
        return 0;
index f804fae..852fdda 100644 (file)
@@ -96,7 +96,7 @@ int board_init(void)
 
 int dram_init(void)
 {
-       if (fdtdec_setup_memory_size() != 0)
+       if (fdtdec_setup_mem_size_base() != 0)
                return -EINVAL;
 
        return 0;
index 7b89c10..9317410 100644 (file)
@@ -74,7 +74,7 @@ int board_init(void)
 
 int dram_init(void)
 {
-       if (fdtdec_setup_memory_size() != 0)
+       if (fdtdec_setup_mem_size_base() != 0)
                return -EINVAL;
 
        return 0;
index fdff2a8..248223b 100644 (file)
@@ -50,7 +50,7 @@ int board_init(void)
 
 int dram_init(void)
 {
-       if (fdtdec_setup_memory_size() != 0)
+       if (fdtdec_setup_mem_size_base() != 0)
                return -EINVAL;
 
        return 0;
index 96ac29d..282381e 100644 (file)
@@ -83,7 +83,7 @@ int board_init(void)
 
 int dram_init(void)
 {
-       if (fdtdec_setup_memory_size() != 0)
+       if (fdtdec_setup_mem_size_base() != 0)
                return -EINVAL;
 
        return 0;
index b6688a2..52f37c9 100644 (file)
@@ -85,7 +85,7 @@ int board_init(void)
 
 int dram_init(void)
 {
-       if (fdtdec_setup_memory_size() != 0)
+       if (fdtdec_setup_mem_size_base() != 0)
                return -EINVAL;
 
        return 0;
index 6bfb0d1..062e88c 100644 (file)
@@ -94,7 +94,7 @@ int board_init(void)
 
 int dram_init(void)
 {
-       if (fdtdec_setup_memory_size() != 0)
+       if (fdtdec_setup_mem_size_base() != 0)
                return -EINVAL;
 
        return 0;
index cadff2c..663b800 100644 (file)
@@ -83,7 +83,7 @@ int board_init(void)
 
 int dram_init(void)
 {
-       if (fdtdec_setup_memory_size() != 0)
+       if (fdtdec_setup_mem_size_base() != 0)
                return -EINVAL;
 
        return 0;
index 651877c..00256bc 100644 (file)
@@ -108,7 +108,7 @@ int board_init(void)
 
 int dram_init(void)
 {
-       if (fdtdec_setup_memory_size() != 0)
+       if (fdtdec_setup_mem_size_base() != 0)
                return -EINVAL;
 
        return 0;
index 5fa472c..966c071 100644 (file)
@@ -78,7 +78,7 @@ int board_init(void)
 
 int dram_init(void)
 {
-       if (fdtdec_setup_memory_size() != 0)
+       if (fdtdec_setup_mem_size_base() != 0)
                return -EINVAL;
 
        return 0;
index 778593b..85e30db 100644 (file)
@@ -97,7 +97,7 @@ int board_init(void)
 
 int dram_init(void)
 {
-       if (fdtdec_setup_memory_size() != 0)
+       if (fdtdec_setup_mem_size_base() != 0)
                return -EINVAL;
 
        return 0;
index 9e15e45..213e869 100644 (file)
@@ -96,7 +96,7 @@ int board_init(void)
 
 int dram_init(void)
 {
-       if (fdtdec_setup_memory_size() != 0)
+       if (fdtdec_setup_mem_size_base() != 0)
                return -EINVAL;
 
        return 0;
index b7638c0..e800d70 100644 (file)
@@ -29,7 +29,7 @@ int dram_init(void)
                return rv;
        }
 
-       if (fdtdec_setup_memory_size() != 0)
+       if (fdtdec_setup_mem_size_base() != 0)
                rv = -EINVAL;
 
        return rv;
index 2e638c6..fd2109b 100644 (file)
@@ -23,7 +23,7 @@ int dram_init(void)
                return rv;
        }
 
-       if (fdtdec_setup_memory_size() != 0)
+       if (fdtdec_setup_mem_size_base() != 0)
                rv = -EINVAL;
 
        return rv;
index 90d7045..a457f90 100644 (file)
@@ -23,7 +23,7 @@ int dram_init(void)
                return rv;
        }
 
-       if (fdtdec_setup_memory_size() != 0)
+       if (fdtdec_setup_mem_size_base() != 0)
                rv = -EINVAL;
 
        return rv;
index fa007c7..3ab9518 100644 (file)
@@ -20,7 +20,7 @@ int dram_init(void)
                return ret;
        }
 
-       if (fdtdec_setup_memory_size() != 0)
+       if (fdtdec_setup_mem_size_base() != 0)
                ret = -EINVAL;
 
        return ret;
index fa007c7..3ab9518 100644 (file)
@@ -20,7 +20,7 @@ int dram_init(void)
                return ret;
        }
 
-       if (fdtdec_setup_memory_size() != 0)
+       if (fdtdec_setup_mem_size_base() != 0)
                ret = -EINVAL;
 
        return ret;
index 9c005e4..614d93c 100644 (file)
@@ -98,7 +98,7 @@ int dram_init_banksize(void)
 
 int dram_init(void)
 {
-       if (fdtdec_setup_memory_size() != 0)
+       if (fdtdec_setup_mem_size_base() != 0)
                return -EINVAL;
 
        zynq_ddrc_init();
index 06cdcbd..89fac6b 100644 (file)
@@ -423,7 +423,7 @@ int dram_init_banksize(void)
 
 int dram_init(void)
 {
-       if (fdtdec_setup_memory_size() != 0)
+       if (fdtdec_setup_mem_size_base() != 0)
                return -EINVAL;
 
        return 0;
index 70fb202..1c45ee7 100644 (file)
@@ -18,7 +18,7 @@ int dram_init_banksize(void)
 
 int dram_init(void)
 {
-       if (fdtdec_setup_memory_size() != 0)
+       if (fdtdec_setup_mem_size_base() != 0)
                return -EINVAL;
 
        return 0;
index 58d5b72..83be064 100644 (file)
@@ -957,20 +957,22 @@ int fdtdec_decode_display_timing(const void *blob, int node, int index,
                                 struct display_timing *config);
 
 /**
- * fdtdec_setup_memory_size() - decode and setup gd->ram_size
+ * fdtdec_setup_mem_size_base() - decode and setup gd->ram_size and
+ * gd->ram_start
  *
- * Decode the /memory 'reg' property to determine the size of the first memory
- * bank, populate the global data with the size of the first bank of memory.
+ * Decode the /memory 'reg' property to determine the size and start of the
+ * first memory bank, populate the global data with the size and start of the
+ * first bank of memory.
  *
  * This function should be called from a boards dram_init(). This helper
- * function allows for boards to query the device tree for DRAM size instead of
- * hard coding the value in the case where the memory size cannot be detected
- * automatically.
+ * function allows for boards to query the device tree for DRAM size and start
+ * address instead of hard coding the value in the case where the memory size
+ * and start address cannot be detected automatically.
  *
  * @return 0 if OK, -EINVAL if the /memory node or reg property is missing or
  * invalid
  */
-int fdtdec_setup_memory_size(void);
+int fdtdec_setup_mem_size_base(void);
 
 /**
  * fdtdec_setup_memory_banksize() - decode and populate gd->bd->bi_dram
index 66dff0f..c373dde 100644 (file)
@@ -1155,7 +1155,7 @@ int fdtdec_decode_display_timing(const void *blob, int parent, int index,
        return ret;
 }
 
-int fdtdec_setup_memory_size(void)
+int fdtdec_setup_mem_size_base(void)
 {
        int ret, mem;
        struct fdt_resource res;
index 3f7e032..d79e716 100644 (file)
@@ -210,7 +210,7 @@ Changes in v4:
 
 Simon Glass (2):
   pci: Correct cast for sandbox
-  fdt: Correct cast for sandbox in fdtdec_setup_memory_size()
+  fdt: Correct cast for sandbox in fdtdec_setup_mem_size_base()
 
  cmd/pci.c                   | 3 ++-
  fs/fat/fat.c                | 1 +
index 2906201..c99e635 100644 (file)
@@ -10,7 +10,7 @@ Content-Transfer-Encoding: 8bit
 
 Simon Glass (2):
   pci: Correct cast for sandbox
-  fdt: Correct cast for sandbox in fdtdec_setup_memory_size()
+  fdt: Correct cast for sandbox in fdtdec_setup_mem_size_base()
 
  cmd/pci.c                   | 3 ++-
  fs/fat/fat.c                | 1 +
index e328497..702c030 100644 (file)
@@ -1,7 +1,7 @@
 From 5ab48490f03051875ab13d288a4bf32b507d76fd Mon Sep 17 00:00:00 2001
 From: Simon Glass <sjg@chromium.org>
 Date: Sat, 15 Apr 2017 15:39:08 -0600
-Subject: [RFC 2/2] fdt: Correct cast for sandbox in fdtdec_setup_memory_size()
+Subject: [RFC 2/2] fdt: Correct cast for sandbox in fdtdec_setup_mem_size_base()
 MIME-Version: 1.0
 Content-Type: text/plain; charset=UTF-8
 Content-Transfer-Encoding: 8bit
@@ -58,7 +58,7 @@ diff --git a/lib/fdtdec.c b/lib/fdtdec.c
 index c072e54..942244f 100644
 --- a/lib/fdtdec.c
 +++ b/lib/fdtdec.c
-@@ -1200,7 +1200,8 @@ int fdtdec_setup_memory_size(void)
+@@ -1200,7 +1200,8 @@ int fdtdec_setup_mem_size_base(void)
        }
  
        gd->ram_size = (phys_size_t)(res.end - res.start + 1);
index 8ad9587..478ea93 100644 (file)
@@ -28,7 +28,7 @@ commit 5ab48490f03051875ab13d288a4bf32b507d76fd
 Author: Simon Glass <sjg@chromium.org>
 Date:   Sat Apr 15 15:39:08 2017 -0600
 
-    fdt: Correct cast for sandbox in fdtdec_setup_memory_size()
+    fdt: Correct cast for sandbox in fdtdec_setup_mem_size_base()
     
     This gives a warning with some native compilers: