Commit 710cbb2ab61472622486ebb8437d89b233ffc9b8

Authored by Ravi Babu
Committed by Lokesh Vutla
1 parent 20c97a2a1b

spl: fdt: support for fdt fixup for falcon boot

Adding support for fdt fixup to update the
memory node in device tree for falcon boot.

This is needed for single stage or falcon
bootmode, to pass memory configuration to
kernel through DT memory node.

Signed-off-by: Ravi Babu <ravibabu@ti.com>
Reviewed-by: Lukasz Majewski <lukma@denx.de>

Showing 3 changed files with 8 additions and 2 deletions Side-by-side Diff

arch/arm/lib/Makefile
... ... @@ -35,6 +35,7 @@
35 35 else
36 36 obj-$(CONFIG_SPL_FRAMEWORK) += spl.o
37 37 obj-$(CONFIG_SPL_FRAMEWORK) += zimage.o
  38 +obj-$(CONFIG_OF_LIBFDT) += bootm-fdt.o
38 39 endif
39 40 obj-$(CONFIG_SEMIHOSTING) += semihosting.o
40 41  
arch/arm/lib/bootm-fdt.c
... ... @@ -27,8 +27,10 @@
27 27  
28 28 int arch_fixup_fdt(void *blob)
29 29 {
  30 + int ret = 0;
  31 +#if defined(CONFIG_ARMV7_NONSEC) || defined(CONFIG_OF_LIBFDT)
30 32 bd_t *bd = gd->bd;
31   - int bank, ret;
  33 + int bank;
32 34 u64 start[CONFIG_NR_DRAM_BANKS];
33 35 u64 size[CONFIG_NR_DRAM_BANKS];
34 36  
35 37  
... ... @@ -42,9 +44,11 @@
42 44 #endif
43 45 }
44 46  
  47 +#ifdef CONFIG_OF_LIBFDT
45 48 ret = fdt_fixup_memory_banks(blob, start, size, CONFIG_NR_DRAM_BANKS);
46 49 if (ret)
47 50 return ret;
  51 +#endif
48 52  
49 53 #ifdef CONFIG_ARMV8_SPIN_TABLE
50 54 ret = spin_table_update_dt(blob);
... ... @@ -57,6 +61,7 @@
57 61 ret = psci_update_dt(blob);
58 62 if (ret)
59 63 return ret;
  64 +#endif
60 65 #endif
61 66  
62 67 return 0;
... ... @@ -96,7 +96,7 @@
96 96 obj-$(CONFIG_SPL_YMODEM_SUPPORT) += xyzModem.o
97 97 obj-$(CONFIG_SPL_LOAD_FIT) += common_fit.o
98 98 obj-$(CONFIG_SPL_NET_SUPPORT) += miiphyutil.o
99   -obj-$(CONFIG_SPL_OF_TRANSLATE) += fdt_support.o
  99 +obj-$(CONFIG_SPL_OF_LIBFDT) += fdt_support.o
100 100 ifdef CONFIG_SPL_USB_HOST_SUPPORT
101 101 obj-$(CONFIG_SPL_USB_SUPPORT) += usb.o usb_hub.o
102 102 obj-$(CONFIG_USB_STORAGE) += usb_storage.o