]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
image: Export fit_conf_get_prop_node()
authorSimon Glass <sjg@chromium.org>
Tue, 7 May 2013 06:12:00 +0000 (06:12 +0000)
committerTom Rini <trini@ti.com>
Tue, 14 May 2013 19:37:25 +0000 (15:37 -0400)
This function will be needed by signature checking code, so export it,
and also add docs.

Signed-off-by: Simon Glass <sjg@chromium.org>
common/image-fit.c
include/image.h

index f5a777e7492df4ff2a6bd97aef9436d56683bfa0..de6fce629ac62e27e1192d50302b5e45c6f22af3 100644 (file)
@@ -1308,7 +1308,7 @@ int fit_conf_get_node(const void *fit, const char *conf_uname)
        return noffset;
 }
 
-static int __fit_conf_get_prop_node(const void *fit, int noffset,
+int fit_conf_get_prop_node(const void *fit, int noffset,
                const char *prop_name)
 {
        char *uname;
@@ -1338,7 +1338,7 @@ static int __fit_conf_get_prop_node(const void *fit, int noffset,
  */
 int fit_conf_get_kernel_node(const void *fit, int noffset)
 {
-       return __fit_conf_get_prop_node(fit, noffset, FIT_KERNEL_PROP);
+       return fit_conf_get_prop_node(fit, noffset, FIT_KERNEL_PROP);
 }
 
 /**
@@ -1357,7 +1357,7 @@ int fit_conf_get_kernel_node(const void *fit, int noffset)
  */
 int fit_conf_get_ramdisk_node(const void *fit, int noffset)
 {
-       return __fit_conf_get_prop_node(fit, noffset, FIT_RAMDISK_PROP);
+       return fit_conf_get_prop_node(fit, noffset, FIT_RAMDISK_PROP);
 }
 
 /**
@@ -1376,7 +1376,7 @@ int fit_conf_get_ramdisk_node(const void *fit, int noffset)
  */
 int fit_conf_get_fdt_node(const void *fit, int noffset)
 {
-       return __fit_conf_get_prop_node(fit, noffset, FIT_FDT_PROP);
+       return fit_conf_get_prop_node(fit, noffset, FIT_FDT_PROP);
 }
 
 /**
index 507ce4268fee3ab4a5fbd9e01d76557d08d995cd..6d7cd54a9c14c04464c6df5f5eb688c1476eac16 100644 (file)
@@ -631,6 +631,20 @@ int fit_conf_get_kernel_node(const void *fit, int noffset);
 int fit_conf_get_ramdisk_node(const void *fit, int noffset);
 int fit_conf_get_fdt_node(const void *fit, int noffset);
 
+/**
+ * fit_conf_get_prop_node() - Get node refered to by a configuration
+ * @fit:       FIT to check
+ * @noffset:   Offset of conf@xxx node to check
+ * @prop_name: Property to read from the conf node
+ *
+ * The conf@ nodes contain references to other nodes, using properties
+ * like 'kernel = "kernel@1"'. Given such a property name (e.g. "kernel"),
+ * return the offset of the node referred to (e.g. offset of node
+ * "/images/kernel@1".
+ */
+int fit_conf_get_prop_node(const void *fit, int noffset,
+               const char *prop_name);
+
 void fit_conf_print(const void *fit, int noffset, const char *p);
 
 int fit_check_ramdisk(const void *fit, int os_noffset,