From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michal Simek Date: Fri, 15 Jul 2016 09:36:05 +0200 Subject: [U-Boot] [PATCH] libfdt: Add option to disable arch_fixup_fdt() calls In-Reply-To: References: <7bfd9751694a9be0b2c74e10345dfc6e51e5f86b.1465482210.git.michal.simek@xilinx.com> Message-ID: <57889265.605@xilinx.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 10.6.2016 18:44, Simon Glass wrote: > Hi Michal, > > On 9 June 2016 at 08:23, Michal Simek wrote: >> 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 >> --- >> >> 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 >> > > I think this would be better as a positive Kconfig - ARCH_FIXUP_FDT. > > Also this is pretty ugly - with a weak function that gets #ifdefed > out. How about changing it so that the function is only called if the > Kconfig is set, and then it does not have to be weak? All fixed in v2. Thanks, Michal