Convert CONFIG_SYS_I2C_LEGACY to Kconfig and add CONFIG_[ST]PL_SYS_I2C_LEGACY
[platform/kernel/u-boot.git] / include / asm-generic / global_data.h
index e278d4c..a4cf7fd 100644 (file)
@@ -23,6 +23,8 @@
 #include <fdtdec.h>
 #include <membuff.h>
 #include <linux/list.h>
+#include <linux/build_bug.h>
+#include <asm-offsets.h>
 
 struct acpi_ctx;
 struct driver_rt;
@@ -275,7 +277,7 @@ struct global_data {
         */
        void *trace_buff;
 #endif
-#if defined(CONFIG_SYS_I2C)
+#if CONFIG_IS_ENABLED(SYS_I2C_LEGACY)
        /**
         * @cur_i2c_bus: currently used I2C bus
         */
@@ -464,6 +466,9 @@ struct global_data {
        char *smbios_version;
 #endif
 };
+#ifndef DO_DEPS_ONLY
+static_assert(sizeof(struct global_data) == GD_SIZE);
+#endif
 
 /**
  * gd_board_type() - retrieve board type