All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] libfdt: Add option to disable arch_fixup_fdt() calls
@ 2016-06-09 14:23 Michal Simek
  2016-06-09 14:29 ` Alexander Graf
  2016-06-10 16:44 ` Simon Glass
  0 siblings, 2 replies; 12+ messages in thread
From: Michal Simek @ 2016-06-09 14:23 UTC (permalink / raw)
  To: u-boot

Disable arch_fixup_fdt() calls for cases where U-Boot shouldn't update
memory setup in DTB file.
One example of usage of this option is to boot OS with different memory
setup than U-Boot use.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---

 Kconfig                  | 8 ++++++++
 arch/arm/lib/bootm-fdt.c | 2 ++
 common/image-fdt.c       | 3 +++
 3 files changed, 13 insertions(+)

diff --git a/Kconfig b/Kconfig
index 4b4621666560..3efba624ecff 100644
--- a/Kconfig
+++ b/Kconfig
@@ -291,6 +291,14 @@ config SYS_CLK_FREQ
 	help
 	  TODO: Move CONFIG_SYS_CLK_FREQ for all the architecture
 
+config DISABLE_ARCH_FIXUP_FDT
+	bool "Disable arch_fixup_fdt() call"
+	depends on ARM
+	help
+	  Disable FDT memory map syncup before OS boot. This feature can be
+	  used for booting OS with different memory setup where the part of
+	  the memory location should be used for different purpose.
+
 endmenu		# Boot images
 
 source "common/Kconfig"
diff --git a/arch/arm/lib/bootm-fdt.c b/arch/arm/lib/bootm-fdt.c
index 7677358742e1..a873b778ade9 100644
--- a/arch/arm/lib/bootm-fdt.c
+++ b/arch/arm/lib/bootm-fdt.c
@@ -24,6 +24,7 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
+#ifndef CONFIG_DISABLE_ARCH_FIXUP_FDT
 int arch_fixup_fdt(void *blob)
 {
 	bd_t *bd = gd->bd;
@@ -50,3 +51,4 @@ int arch_fixup_fdt(void *blob)
 #endif
 	return ret;
 }
+#endif
diff --git a/common/image-fdt.c b/common/image-fdt.c
index 6cac7dbb7f8b..9e05becd464a 100644
--- a/common/image-fdt.c
+++ b/common/image-fdt.c
@@ -460,6 +460,9 @@ __weak int ft_verify_fdt(void *fdt)
 
 __weak int arch_fixup_fdt(void *blob)
 {
+#ifdef CONFIG_DISABLE_ARCH_FIXUP_FDT
+	printf("## Disable arch_fixup_fdt()\n");
+#endif
 	return 0;
 }
 
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2016-07-15  7:36 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-09 14:23 [U-Boot] [PATCH] libfdt: Add option to disable arch_fixup_fdt() calls Michal Simek
2016-06-09 14:29 ` Alexander Graf
2016-06-09 14:32   ` Michal Simek
2016-06-09 14:40     ` Alexander Graf
2016-06-10 11:07       ` Michal Simek
2016-06-10 11:13         ` Alexander Graf
2016-06-10 11:51           ` Michal Simek
2016-06-10 12:12             ` Alexander Graf
2016-06-10 12:31               ` Michal Simek
2016-06-10 12:34                 ` Alexander Graf
2016-06-10 16:44 ` Simon Glass
2016-07-15  7:36   ` Michal Simek

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.