aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSimon Glass2016-02-22 22:55:45 -0700
committerTom Rini2016-03-14 19:18:26 -0400
commitaa34fbc087f246cbd83223bed499ca62694787d8 (patch)
tree2702c73e51f50fc822d347b629582f7232873f4d /include
parent70d41093c5d6d378a8e750d1829063890a3c7ca5 (diff)
fdt: Allow libfdt to be used in SPL
Add an option to enable libfdt in SPL. This can be useful when decoding FIT files in SPL. We need to make sure this option is not enabled in SPL by this change. Also this option needs to be enabled in host builds. Si add a new IMAGE_USE_LIBFDT #define which can be used in files that are built on the host but must also build for U-Boot and SPL. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include')
-rw-r--r--include/common.h10
-rw-r--r--include/image.h12
2 files changed, 6 insertions, 16 deletions
diff --git a/include/common.h b/include/common.h
index 1563d649f01..3e1a4c98b71 100644
--- a/include/common.h
+++ b/include/common.h
@@ -596,12 +596,8 @@ void upmconfig (unsigned int, unsigned int *, unsigned int);
ulong get_tbclk (void);
void reset_misc (void);
void reset_cpu (ulong addr);
-#if defined (CONFIG_OF_LIBFDT) && defined (CONFIG_OF_BOARD_SETUP)
void ft_cpu_setup(void *blob, bd_t *bd);
-#ifdef CONFIG_PCI
void ft_pci_setup(void *blob, bd_t *bd);
-#endif
-#endif
void smp_set_core_boot_addr(unsigned long addr, int corenr);
void smp_kick_all_cpus(void);
@@ -660,10 +656,8 @@ int get_serial_clock(void);
#if defined(CONFIG_MPC85xx)
typedef MPC85xx_SYS_INFO sys_info_t;
void get_sys_info ( sys_info_t * );
-# if defined(CONFIG_OF_LIBFDT)
- void ft_fixup_cpu(void *, u64);
- void ft_fixup_num_cores(void *);
-# endif
+void ft_fixup_cpu(void *, u64);
+void ft_fixup_num_cores(void *);
#endif
#if defined(CONFIG_MPC86xx)
typedef MPC86xx_SYS_INFO sys_info_t;
diff --git a/include/image.h b/include/image.h
index 02ca43bb89e..b2fb3d90e0c 100644
--- a/include/image.h
+++ b/include/image.h
@@ -26,7 +26,8 @@ struct lmb;
#include <sys/types.h>
/* new uImage format support enabled on host */
-#define IMAGE_ENABLE_FIT 1
+#define IMAGE_ENABLE_FIT 1
+#define IMAGE_ENABLE_OF_LIBFDT 1
#define CONFIG_FIT_VERBOSE 1 /* enable fit_format_{error,warning}() */
#define IMAGE_ENABLE_IGNORE 0
@@ -42,7 +43,8 @@ struct lmb;
#define IMAGE_ENABLE_IGNORE 1
#define IMAGE_INDENT_STRING " "
-#define IMAGE_ENABLE_FIT CONFIG_IS_ENABLED(FIT)
+#define IMAGE_ENABLE_FIT CONFIG_IS_ENABLED(FIT)
+#define IMAGE_ENABLE_OF_LIBFDT CONFIG_IS_ENABLED(OF_LIBFDT)
#endif /* USE_HOSTCC */
@@ -103,12 +105,6 @@ struct lmb;
# define IMAGE_ENABLE_RAMDISK_HIGH 0
#endif
-#ifdef CONFIG_OF_LIBFDT
-# define IMAGE_ENABLE_OF_LIBFDT 1
-#else
-# define IMAGE_ENABLE_OF_LIBFDT 0
-#endif
-
#ifdef CONFIG_SYS_BOOT_GET_CMDLINE
# define IMAGE_BOOT_GET_CMDLINE 1
#else