lib: fdtdec: Rename routine fdtdec_setup_memory_size()

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>
lime2-spi
Siva Durga Prasad Paladugu 6 years ago committed by Michal Simek
parent 1473b12ad0
commit 12308b128f
  1. 2
      arch/arm/mach-mvebu/arm64-common.c
  2. 2
      arch/arm/mach-socfpga/misc.c
  3. 2
      board/broadcom/bcmstb/bcmstb.c
  4. 2
      board/emulation/qemu-arm/qemu-arm.c
  5. 2
      board/renesas/alt/alt.c
  6. 2
      board/renesas/blanche/blanche.c
  7. 2
      board/renesas/draak/draak.c
  8. 2
      board/renesas/eagle/eagle.c
  9. 2
      board/renesas/ebisu/ebisu.c
  10. 2
      board/renesas/gose/gose.c
  11. 2
      board/renesas/koelsch/koelsch.c
  12. 2
      board/renesas/lager/lager.c
  13. 2
      board/renesas/porter/porter.c
  14. 2
      board/renesas/salvator-x/salvator-x.c
  15. 2
      board/renesas/silk/silk.c
  16. 2
      board/renesas/stout/stout.c
  17. 2
      board/renesas/ulcb/ulcb.c
  18. 2
      board/st/stm32f429-discovery/stm32f429-discovery.c
  19. 2
      board/st/stm32f429-evaluation/stm32f429-evaluation.c
  20. 2
      board/st/stm32f469-discovery/stm32f469-discovery.c
  21. 2
      board/st/stm32h743-disco/stm32h743-disco.c
  22. 2
      board/st/stm32h743-eval/stm32h743-eval.c
  23. 2
      board/xilinx/zynq/board.c
  24. 2
      board/xilinx/zynqmp/zynqmp.c
  25. 2
      board/xilinx/zynqmp_r5/board.c
  26. 16
      include/fdtdec.h
  27. 2
      lib/fdtdec.c
  28. 2
      tools/patman/func_test.py
  29. 2
      tools/patman/test/0000-cover-letter.patch
  30. 4
      tools/patman/test/0002-fdt-Correct-cast-for-sandbox-in-fdtdec_setup_memory_.patch
  31. 2
      tools/patman/test/test01.txt

@ -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;

@ -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;

@ -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;

@ -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;

@ -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;

@ -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;

@ -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;

@ -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;

@ -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;

@ -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;

@ -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;

@ -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;

@ -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;

@ -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;

@ -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;

@ -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;

@ -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;

@ -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;

@ -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;

@ -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;

@ -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;

@ -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;

@ -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();

@ -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;

@ -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;

@ -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

@ -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;

@ -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 +

@ -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 +

@ -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);

@ -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:

Loading…
Cancel
Save