mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-24 21:54:01 +00:00
ddr: fsl: Allow to compile it without env support
When env support is disabled then usage of env_get_f() generates linker errors. So do not compile env_get_f() when env support is disabled (for example when disabled only in SPL). Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
This commit is contained in:
parent
d64a8fd0a9
commit
78cdaf4053
1 changed files with 4 additions and 0 deletions
|
@ -761,7 +761,9 @@ unsigned int populate_memctl_options(const common_timing_params_t *common_dimm,
|
|||
* Extract hwconfig from environment since we have not properly setup
|
||||
* the environment but need it for ddr config params
|
||||
*/
|
||||
#if CONFIG_IS_ENABLED(ENV_SUPPORT)
|
||||
if (env_get_f("hwconfig", buf, sizeof(buf)) < 0)
|
||||
#endif
|
||||
buf[0] = '\0';
|
||||
|
||||
#if defined(CONFIG_SYS_FSL_DDR3) || \
|
||||
|
@ -1408,7 +1410,9 @@ int fsl_use_spd(void)
|
|||
* Extract hwconfig from environment since we have not properly setup
|
||||
* the environment but need it for ddr config params
|
||||
*/
|
||||
#if CONFIG_IS_ENABLED(ENV_SUPPORT)
|
||||
if (env_get_f("hwconfig", buf, sizeof(buf)) < 0)
|
||||
#endif
|
||||
buf[0] = '\0';
|
||||
|
||||
/* if hwconfig is not enabled, or "sdram" is not defined, use spd */
|
||||
|
|
Loading…
Reference in a new issue