summaryrefslogtreecommitdiff
path: root/src/vendorcode/cavium
diff options
context:
space:
mode:
Diffstat (limited to 'src/vendorcode/cavium')
-rw-r--r--src/vendorcode/cavium/bdk/libbdk-hal/bdk-config.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/vendorcode/cavium/bdk/libbdk-hal/bdk-config.c b/src/vendorcode/cavium/bdk/libbdk-hal/bdk-config.c
index 8e348d0175..e078e7476f 100644
--- a/src/vendorcode/cavium/bdk/libbdk-hal/bdk-config.c
+++ b/src/vendorcode/cavium/bdk/libbdk-hal/bdk-config.c
@@ -18,7 +18,6 @@
static struct bdk_devicetree_key_value *config_fdt;
-#if !defined(__PRE_RAM__)
static struct bdk_devicetree_key_value *bdk_config_duplicate(
const struct bdk_devicetree_key_value *old,
size_t free_space)
@@ -38,7 +37,7 @@ static struct bdk_devicetree_key_value *bdk_config_duplicate(
return new;
}
-#endif
+
/**
* Set the device tree used for configuration
*
@@ -49,11 +48,11 @@ static struct bdk_devicetree_key_value *bdk_config_duplicate(
*/
int bdk_config_set_fdt(const struct bdk_devicetree_key_value *fdt)
{
-#if !defined(__PRE_RAM__)
- config_fdt = bdk_config_duplicate(fdt, 0);
-#else
- config_fdt = (void *)fdt;
-#endif
+ if (ENV_STAGE_HAS_HEAP_SECTION)
+ config_fdt = bdk_config_duplicate(fdt, 0);
+ else
+ config_fdt = (void *)fdt;
+
return 0;
}
@@ -66,7 +65,6 @@ int bdk_config_set_fdt(const struct bdk_devicetree_key_value *fdt)
*/
static void set_value(const char *name, const char *val)
{
-#if !defined(__PRE_RAM__)
struct bdk_devicetree_key_value *iter;
char n[64];
@@ -98,7 +96,6 @@ static void set_value(const char *name, const char *val)
iter++;
iter->key = 0;
iter->value = 0;
-#endif
}
/**
@@ -207,6 +204,9 @@ void bdk_config_set_int(int64_t value, bdk_config_t cfg_item, ...)
/* Make sure the correct access function was called */
assert(config_info[cfg_item].ctype == BDK_CONFIG_TYPE_INT);
+ if (!ENV_STAGE_HAS_HEAP_SECTION)
+ return;
+
if (!config_fdt)
return;