vendorcode/cavium: Replace use of __PRE_RAM__

Change-Id: I7c93031c8c0e3a86261988edc956e8cd5a8dd961
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/34998
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Kyösti Mälkki 2019-08-19 09:40:51 +03:00
parent 7596c54dba
commit 1011ed76a6
1 changed files with 9 additions and 9 deletions

View File

@ -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;