summaryrefslogtreecommitdiff
path: root/include/asm-generic/global_data.h
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2024-08-21 10:19:25 -0600
committerTom Rini <trini@konsulko.com>2024-08-26 14:06:08 -0600
commit66ca5b78640578d6176031b3cc1018dc4e550dd3 (patch)
tree9ea8c5d1803c7c8ad48e1db03b2965912d5cc30b /include/asm-generic/global_data.h
parentd9902107027a41fc6a27b10f6e030c5a2465936b (diff)
global_data: Remove environment members if not used
If the environment is not enabled we don't need these fields in global_data. Make them conditional. Make these fields conditional. Move env_buf up one so it can share an #ifdef. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/asm-generic/global_data.h')
-rw-r--r--include/asm-generic/global_data.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/include/asm-generic/global_data.h b/include/asm-generic/global_data.h
index 6445bd477d4..d6c15e2c406 100644
--- a/include/asm-generic/global_data.h
+++ b/include/asm-generic/global_data.h
@@ -86,6 +86,7 @@ struct global_data {
* @cpu_clk: CPU clock rate in Hz
*/
unsigned long cpu_clk;
+#if CONFIG_IS_ENABLED(ENV_SUPPORT)
/**
* @env_addr: address of environment structure
*
@@ -93,6 +94,7 @@ struct global_data {
* environment variables.
*/
unsigned long env_addr;
+#endif /* ENV_SUPPORT */
/**
* @ram_base: base address of RAM used by U-Boot
*/
@@ -134,6 +136,7 @@ struct global_data {
* @baudrate: baud rate of the serial interface
*/
unsigned int baudrate;
+#if CONFIG_IS_ENABLED(ENV_SUPPORT)
/**
* @env_has_init: bit mask indicating environment locations
*
@@ -151,13 +154,14 @@ struct global_data {
*/
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
*/