summaryrefslogtreecommitdiffstats
path: root/include/spl.h
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2016-02-22 22:55:56 -0700
committerTom Rini <trini@konsulko.com>2016-03-14 19:18:30 -0400
commitf1dcee59a2afc4cf39699eef7631edbff8693933 (patch)
tree495ae6e880875227e816aac1517f32e6ddea663b /include/spl.h
parent4b307f2387da95d3b91f1fef8c5b6dc2108ddb4d (diff)
downloadtalos-obmc-uboot-f1dcee59a2afc4cf39699eef7631edbff8693933.tar.gz
talos-obmc-uboot-f1dcee59a2afc4cf39699eef7631edbff8693933.zip
spl: Add an option to load a FIT containing U-Boot
This provides a way to load a FIT containing U-Boot and a selection of device tree files. The board can select the correct device tree by probing the hardware. Then U-Boot is started with the selected device tree. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/spl.h')
-rw-r--r--include/spl.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/include/spl.h b/include/spl.h
index 92cdc049d4..16f2f6a9ee 100644
--- a/include/spl.h
+++ b/include/spl.h
@@ -29,6 +29,24 @@ struct spl_image_info {
u32 flags;
};
+/*
+ * Information required to load data from a device
+ *
+ * @dev: Pointer to the device, e.g. struct mmc *
+ * @priv: Private data for the device
+ * @bl_len: Block length for reading in bytes
+ * @read: Function to call to read from the device
+ */
+struct spl_load_info {
+ void *dev;
+ void *priv;
+ int bl_len;
+ ulong (*read)(struct spl_load_info *load, ulong sector, ulong count,
+ void *buf);
+};
+
+int spl_load_simple_fit(struct spl_load_info *info, ulong sector, void *fdt);
+
#define SPL_COPY_PAYLOAD_ONLY 1
extern struct spl_image_info spl_image;
OpenPOWER on IntegriCloud