Permalink
Browse files

FogBugz #332833-1: first baby step to support early release

This patch converts the function, is_external_fpga_config(),
into a more generic function, is_chosen_boolean_true().
The new generic function will be used to look for
the boolean property, "early-release-fpga-config".

Signed-off-by: Matthew Gerlach <mgerlach@opensource.altera.com>
  • Loading branch information...
1 parent 126f79c commit 86db7f0d9ee6d7003243a68db2245e67b2d1d53d Matthew Gerlach committed Nov 16, 2015
Showing with 13 additions and 6 deletions.
  1. +12 −6 arch/arm/cpu/armv7/socfpga_arria10/misc.c
  2. +1 −0 arch/arm/include/asm/arch-socfpga_arria10/misc.h
@@ -167,16 +167,22 @@ void skip_relocation(void)
board_init_r(id, (CONFIG_SYS_INIT_SP_ADDR - CONFIG_OCRAM_STACK_SIZE));
}
-int is_external_fpga_config(const void *blob)
+int is_chosen_boolean_true(const void *blob, const char *name)
{
- int node, len;
+ int node;
int rval = 0;
node = fdt_subnode_offset(blob, 0, "chosen");
- if (node >= 0) {
- if (fdt_getprop(blob, node, "external-fpga-config", &len))
- rval = 1;
- }
+
+ if (node >= 0)
+ rval = fdtdec_get_bool(blob, node, name);
return rval;
}
+
+int is_external_fpga_config(const void *blob)
+{
+ static const char *name = "external-fpga-config";
+
+ return is_chosen_boolean_true(blob, name);
+}
@@ -9,6 +9,7 @@
#ifndef __ASSEMBLY__
void skip_relocation(void);
+int is_chosen_boolean_true(const void *blob, const char *name);
int is_external_fpga_config(const void *blob);
int config_shared_fpga_pins(const void *blob);

0 comments on commit 86db7f0

Please sign in to comment.