summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2020-04-24 13:04:38 -0400
committerTom Rini <trini@konsulko.com>2020-04-24 13:04:38 -0400
commit18b9c98024ec89e00a57707f07ff6ada06089d26 (patch)
tree60b4659a673d7a9dff309ee0d0b324c242a53cfc /include
parentb897306341024695d17296efc1f9d83d06368209 (diff)
parent08140dba0f539842d4836afb56fe43a33d8ba045 (diff)
Merge branch '2020-04-24-master-imports'
- Assorted minor bugfixes. - Resync fixdep with Linux v5.7-rc1 - Numerous changes to reduce SPL in various cases including when we have read-only env support. - Allow mkimage to align the header on FIT images to a specific size.
Diffstat (limited to 'include')
-rw-r--r--include/configs/vexpress_aemv8a.h30
-rw-r--r--include/env_callback.h6
-rw-r--r--include/env_internal.h2
-rw-r--r--include/fdt_support.h9
-rw-r--r--include/imx8image.h1
-rw-r--r--include/search.h2
6 files changed, 39 insertions, 11 deletions
diff --git a/include/configs/vexpress_aemv8a.h b/include/configs/vexpress_aemv8a.h
index 9a9cec414c..4f3a792f49 100644
--- a/include/configs/vexpress_aemv8a.h
+++ b/include/configs/vexpress_aemv8a.h
@@ -177,16 +177,26 @@
"initrd_addr=0x88000000\0" \
"fdtfile=devtree.dtb\0" \
"fdt_addr=0x83000000\0" \
- "fdt_high=0xffffffffffffffff\0" \
- "initrd_high=0xffffffffffffffff\0"
-
-#define CONFIG_BOOTCOMMAND "smhload ${kernel_name} ${kernel_addr}; " \
- "smhload ${fdtfile} ${fdt_addr}; " \
- "smhload ${initrd_name} ${initrd_addr} "\
- "initrd_end; " \
- "fdt addr ${fdt_addr}; fdt resize; " \
- "fdt chosen ${initrd_addr} ${initrd_end}; " \
- "booti $kernel_addr - $fdt_addr"
+ "boot_name=boot.img\0" \
+ "boot_addr=0x8007f800\0"
+
+#define CONFIG_BOOTCOMMAND "if smhload ${boot_name} ${boot_addr}; then " \
+ " set bootargs; " \
+ " abootimg addr ${boot_addr}; " \
+ " abootimg get dtb --index=0 fdt_addr; " \
+ " bootm ${boot_addr} ${boot_addr} " \
+ " ${fdt_addr}; " \
+ "else; " \
+ " set fdt_high 0xffffffffffffffff; " \
+ " set initrd_high 0xffffffffffffffff; " \
+ " smhload ${kernel_name} ${kernel_addr}; " \
+ " smhload ${fdtfile} ${fdt_addr}; " \
+ " smhload ${initrd_name} ${initrd_addr} "\
+ " initrd_end; " \
+ " fdt addr ${fdt_addr}; fdt resize; " \
+ " fdt chosen ${initrd_addr} ${initrd_end}; " \
+ " booti $kernel_addr - $fdt_addr; " \
+ "fi"
#endif
diff --git a/include/env_callback.h b/include/env_callback.h
index 74da20eec3..05e9516a0f 100644
--- a/include/env_callback.h
+++ b/include/env_callback.h
@@ -72,6 +72,12 @@
"serial#:serialno," \
CONFIG_ENV_CALLBACK_LIST_STATIC
+#ifndef CONFIG_SPL_BUILD
void env_callback_init(struct env_entry *var_entry);
+#else
+static inline void env_callback_init(struct env_entry *var_entry)
+{
+}
+#endif
#endif /* __ENV_CALLBACK_H__ */
diff --git a/include/env_internal.h b/include/env_internal.h
index 90a4df8a72..e89fbdb1b7 100644
--- a/include/env_internal.h
+++ b/include/env_internal.h
@@ -207,6 +207,8 @@ struct env_driver {
#define env_save_ptr(x) NULL
#endif
+#define ENV_SAVE_PTR(x) (CONFIG_IS_ENABLED(SAVEENV) ? (x) : NULL)
+
extern struct hsearch_data env_htab;
#endif /* DO_DEPS_ONLY */
diff --git a/include/fdt_support.h b/include/fdt_support.h
index ba14acd7f6..2eff311fa4 100644
--- a/include/fdt_support.h
+++ b/include/fdt_support.h
@@ -343,6 +343,15 @@ int fdt_get_cells_len(const void *blob, char *nr_cells_name);
#ifdef USE_HOSTCC
int fdtdec_get_int(const void *blob, int node, const char *prop_name,
int default_val);
+
+/*
+ * Count child nodes of one parent node.
+ *
+ * @param blob FDT blob
+ * @param node parent node
+ * @return number of child node; 0 if there is not child node
+ */
+int fdtdec_get_child_count(const void *blob, int node);
#endif
#ifdef CONFIG_FMAN_ENET
int fdt_update_ethernet_dt(void *blob);
diff --git a/include/imx8image.h b/include/imx8image.h
index 68ec9f5fcd..00c614ab6c 100644
--- a/include/imx8image.h
+++ b/include/imx8image.h
@@ -11,7 +11,6 @@
#include <image.h>
#include <inttypes.h>
#include "imagetool.h"
-#include "linux/kernel.h"
#define __packed __attribute__((packed))
diff --git a/include/search.h b/include/search.h
index 0469a852e0..8f87dc72ce 100644
--- a/include/search.h
+++ b/include/search.h
@@ -29,8 +29,10 @@ enum env_action {
struct env_entry {
const char *key;
char *data;
+#ifndef CONFIG_SPL_BUILD
int (*callback)(const char *name, const char *value, enum env_op op,
int flags);
+#endif
int flags;
};