diff mbox

[U-Boot,v2,23/27] spl: Add a way for boards to select which device tree to load

Message ID 1456206959-29115-24-git-send-email-sjg@chromium.org
State Accepted
Delegated to: Tom Rini
Headers show

Commit Message

Simon Glass Feb. 23, 2016, 5:55 a.m. UTC
SPL calls this function with each device tree it can find in the FIT. The
board should implement this function, using whatever hardware detection it
can muster to determine the correct device tree.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

Changes in v2: None

 include/image.h | 13 +++++++++++++
 1 file changed, 13 insertions(+)

Comments

Tom Rini March 15, 2016, 11:55 a.m. UTC | #1
On Mon, Feb 22, 2016 at 10:55:55PM -0700, Simon Glass wrote:

> SPL calls this function with each device tree it can find in the FIT. The
> board should implement this function, using whatever hardware detection it
> can muster to determine the correct device tree.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>

Applied to u-boot/master, thanks!
diff mbox

Patch

diff --git a/include/image.h b/include/image.h
index 6b86119..8af2e9b 100644
--- a/include/image.h
+++ b/include/image.h
@@ -1157,4 +1157,17 @@  ulong android_image_get_kload(const struct andr_img_hdr *hdr);
 
 #endif /* CONFIG_ANDROID_BOOT_IMAGE */
 
+/**
+ * board_fit_config_name_match() - Check for a matching board name
+ *
+ * This is used when SPL loads a FIT containing multiple device tree files
+ * and wants to work out which one to use. The description of each one is
+ * passed to this function. The description comes from the 'description' field
+ * in each (FDT) image node.
+ *
+ * @name: Device tree description
+ * @return 0 if this device tree should be used, non-zero to try the next
+ */
+int board_fit_config_name_match(const char *name);
+
 #endif	/* __IMAGE_H__ */