/* if we are passed a buffer use it, otherwise try the environment */
if (!env_hwconfig) {
- if (!(gd->flags & GD_FLG_ENV_READY) && gd->env_valid != ENV_VALID) {
+#if CONFIG_IS_ENABLED(ENV_SUPPORT)
+ if (!(gd->flags & GD_FLG_ENV_READY) &&
+ gd->env_valid != ENV_VALID)
+#else
+ if (true)
+#endif
+ {
printf("WARNING: Calling __hwconfig without a buffer "
"and before environment is ready\n");
return NULL;
* @cpu_clk: CPU clock rate in Hz
*/
unsigned long cpu_clk;
+#if CONFIG_IS_ENABLED(ENV_SUPPORT)
/**
* @env_addr: address of environment structure
*
* environment variables.
*/
unsigned long env_addr;
+#endif /* ENV_SUPPORT */
/**
* @ram_base: base address of RAM used by U-Boot
*/
* @baudrate: baud rate of the serial interface
*/
unsigned int baudrate;
+#if CONFIG_IS_ENABLED(ENV_SUPPORT)
/**
* @env_has_init: bit mask indicating environment locations
*
* @env_load_prio: priority of the loaded environment
*/
char env_load_prio;
- /**
- * @fdt_src: Source of FDT
- */
- enum fdt_source_t fdt_src;
/**
* @env_buf: buffer for env_get() before reloc
*/
char env_buf[32];
+#endif /* ENV_SUPPORT */
+ /**
+ * @fdt_src: Source of FDT
+ */
+ enum fdt_source_t fdt_src;
/**
* @arch: architecture-specific data
*/
DEFINE(GD_NEW_GD, offsetof(struct global_data, new_gd));
+#if CONFIG_IS_ENABLED(ENV_SUPPORT)
DEFINE(GD_ENV_ADDR, offsetof(struct global_data, env_addr));
+#endif
return 0;
}