diff options
-rw-r--r-- | src/ec/acpi/ec.c | 3 | ||||
-rw-r--r-- | src/ec/google/chromeec/ec_boardid.c | 2 | ||||
-rw-r--r-- | src/ec/google/chromeec/ec_skuid.c | 2 | ||||
-rw-r--r-- | src/ec/google/wilco/boardid.c | 2 | ||||
-rw-r--r-- | src/ec/intel/board_id.c | 2 | ||||
-rw-r--r-- | src/include/rules.h | 3 | ||||
-rw-r--r-- | src/include/stddef.h | 6 | ||||
-rw-r--r-- | src/lib/cbfs.c | 4 | ||||
-rw-r--r-- | src/mainboard/intel/adlrvp/board_id.c | 2 | ||||
-rw-r--r-- | src/mainboard/intel/glkrvp/boardid.c | 2 | ||||
-rw-r--r-- | src/mainboard/intel/glkrvp/variants/baseboard/boardid.c | 2 | ||||
-rw-r--r-- | src/mainboard/intel/jasperlake_rvp/board_id.c | 2 | ||||
-rw-r--r-- | src/mainboard/intel/kblrvp/board_id.c | 2 | ||||
-rw-r--r-- | src/mainboard/intel/tglrvp/board_id.c | 2 |
14 files changed, 10 insertions, 26 deletions
diff --git a/src/ec/acpi/ec.c b/src/ec/acpi/ec.c index f183801e43..dddfb6baa8 100644 --- a/src/ec/acpi/ec.c +++ b/src/ec/acpi/ec.c @@ -147,9 +147,6 @@ void ec_clr_bit(u8 addr, u8 bit) void ec_set_ports(u16 cmd_reg, u16 data_reg) { - if (!ENV_HAS_DATA_SECTION) - return; - ec_cmd_reg = cmd_reg; ec_data_reg = data_reg; } diff --git a/src/ec/google/chromeec/ec_boardid.c b/src/ec/google/chromeec/ec_boardid.c index b19d9a74b2..d728324272 100644 --- a/src/ec/google/chromeec/ec_boardid.c +++ b/src/ec/google/chromeec/ec_boardid.c @@ -5,7 +5,7 @@ uint32_t board_id(void) { - MAYBE_STATIC_NONZERO uint32_t id = BOARD_ID_INIT; + static uint32_t id = BOARD_ID_INIT; if (id == BOARD_ID_INIT) { if (google_chromeec_get_board_version(&id)) diff --git a/src/ec/google/chromeec/ec_skuid.c b/src/ec/google/chromeec/ec_skuid.c index 874324497f..259ce44f2a 100644 --- a/src/ec/google/chromeec/ec_skuid.c +++ b/src/ec/google/chromeec/ec_skuid.c @@ -5,7 +5,7 @@ uint32_t google_chromeec_get_board_sku(void) { - MAYBE_STATIC_NONZERO uint32_t sku_id = CROS_SKU_UNKNOWN; + static uint32_t sku_id = CROS_SKU_UNKNOWN; if (sku_id != CROS_SKU_UNKNOWN) return sku_id; diff --git a/src/ec/google/wilco/boardid.c b/src/ec/google/wilco/boardid.c index 8bde715e3b..9ff88995ef 100644 --- a/src/ec/google/wilco/boardid.c +++ b/src/ec/google/wilco/boardid.c @@ -5,7 +5,7 @@ uint32_t board_id(void) { - MAYBE_STATIC_NONZERO uint32_t id = BOARD_ID_INIT; + static uint32_t id = BOARD_ID_INIT; if (id == BOARD_ID_INIT) { uint8_t ec_id; diff --git a/src/ec/intel/board_id.c b/src/ec/intel/board_id.c index 15acad6617..72d74c51f0 100644 --- a/src/ec/intel/board_id.c +++ b/src/ec/intel/board_id.c @@ -19,7 +19,7 @@ static uint32_t get_board_id_via_ext_ec(void) /* Get Board ID via EC I/O port write/read */ int get_rvp_board_id(void) { - MAYBE_STATIC_NONZERO int id = BOARD_ID_UNKNOWN; + static int id = BOARD_ID_UNKNOWN; if (CONFIG(EC_GOOGLE_CHROMEEC)) { /* CHROME_EC */ id = get_board_id_via_ext_ec(); diff --git a/src/include/rules.h b/src/include/rules.h index 02c36f2b25..b30b21d333 100644 --- a/src/include/rules.h +++ b/src/include/rules.h @@ -278,9 +278,6 @@ #define ENV_CACHE_AS_RAM 0 #endif -/* Indicates .data section support. */ -#define ENV_HAS_DATA_SECTION 1 - /* Indicates if the stage uses the _data and _bss regions defined in * arch/x86/car.ld */ #define ENV_SEPARATE_DATA_AND_BSS (ENV_CACHE_AS_RAM && (ENV_BOOTBLOCK || !CONFIG(NO_XIP_EARLY_STAGES))) diff --git a/src/include/stddef.h b/src/include/stddef.h index e30b05f672..484017daf3 100644 --- a/src/include/stddef.h +++ b/src/include/stddef.h @@ -34,12 +34,6 @@ typedef __WINT_TYPE__ wint_t; #define DEVTREE_CONST #endif -#if ENV_HAS_DATA_SECTION -#define MAYBE_STATIC_NONZERO static -#else -#define MAYBE_STATIC_NONZERO -#endif - /* Provide a pointer to address 0 that thwarts any "accessing this is * undefined behaviour and do whatever" trickery in compilers. * Use when you _really_ need to read32(zeroptr) (ie. read address 0). diff --git a/src/lib/cbfs.c b/src/lib/cbfs.c index 78eeb3bfb2..d0a87d349c 100644 --- a/src/lib/cbfs.c +++ b/src/lib/cbfs.c @@ -20,12 +20,8 @@ #include <thread.h> #include <timestamp.h> -#if ENV_HAS_DATA_SECTION struct mem_pool cbfs_cache = MEM_POOL_INIT(_cbfs_cache, REGION_SIZE(cbfs_cache), CONFIG_CBFS_CACHE_ALIGN); -#else -struct mem_pool cbfs_cache = MEM_POOL_INIT(NULL, 0, 0); -#endif static void switch_to_postram_cache(int unused) { diff --git a/src/mainboard/intel/adlrvp/board_id.c b/src/mainboard/intel/adlrvp/board_id.c index de7a3804d9..041cdff451 100644 --- a/src/mainboard/intel/adlrvp/board_id.c +++ b/src/mainboard/intel/adlrvp/board_id.c @@ -19,7 +19,7 @@ static uint32_t get_board_id_via_ext_ec(void) /* Get Board ID via EC I/O port write/read */ int get_board_id(void) { - MAYBE_STATIC_NONZERO int id = -1; + static int id = -1; if (id < 0) { if (CONFIG(EC_GOOGLE_CHROMEEC)) { diff --git a/src/mainboard/intel/glkrvp/boardid.c b/src/mainboard/intel/glkrvp/boardid.c index e53a0a11f7..35dcc4b29d 100644 --- a/src/mainboard/intel/glkrvp/boardid.c +++ b/src/mainboard/intel/glkrvp/boardid.c @@ -12,7 +12,7 @@ uint32_t board_id(void) { - MAYBE_STATIC_NONZERO int id = -1; + static int id = -1; if (id < 0) { if (CONFIG(EC_GOOGLE_CHROMEEC)) id = variant_board_id(); diff --git a/src/mainboard/intel/glkrvp/variants/baseboard/boardid.c b/src/mainboard/intel/glkrvp/variants/baseboard/boardid.c index 2553dccde5..54081d1b81 100644 --- a/src/mainboard/intel/glkrvp/variants/baseboard/boardid.c +++ b/src/mainboard/intel/glkrvp/variants/baseboard/boardid.c @@ -6,7 +6,7 @@ int variant_board_id(void) { - MAYBE_STATIC_NONZERO uint32_t id = BOARD_ID_INIT; + static uint32_t id = BOARD_ID_INIT; if (CONFIG(EC_GOOGLE_CHROMEEC)) { if (id == BOARD_ID_INIT) { diff --git a/src/mainboard/intel/jasperlake_rvp/board_id.c b/src/mainboard/intel/jasperlake_rvp/board_id.c index 90609ff079..d1876de48f 100644 --- a/src/mainboard/intel/jasperlake_rvp/board_id.c +++ b/src/mainboard/intel/jasperlake_rvp/board_id.c @@ -23,7 +23,7 @@ static uint32_t get_board_id_via_ext_ec(void) */ int get_board_id(void) { - MAYBE_STATIC_NONZERO int id = -1; + static int id = -1; if (id < 0) { if (CONFIG(EC_GOOGLE_CHROMEEC)) { diff --git a/src/mainboard/intel/kblrvp/board_id.c b/src/mainboard/intel/kblrvp/board_id.c index c206b8675e..4305295d9b 100644 --- a/src/mainboard/intel/kblrvp/board_id.c +++ b/src/mainboard/intel/kblrvp/board_id.c @@ -9,7 +9,7 @@ */ int get_ec_boardinfo(void) { - MAYBE_STATIC_NONZERO int ec_info = -1; + static int ec_info = -1; if (ec_info < 0) { uint8_t buffer[2]; uint8_t index; diff --git a/src/mainboard/intel/tglrvp/board_id.c b/src/mainboard/intel/tglrvp/board_id.c index a6cad1c4d8..fc262fea9e 100644 --- a/src/mainboard/intel/tglrvp/board_id.c +++ b/src/mainboard/intel/tglrvp/board_id.c @@ -20,7 +20,7 @@ static uint32_t get_board_id_via_ext_ec(void) /* Get Board ID via EC I/O port write/read */ int get_board_id(void) { - MAYBE_STATIC_NONZERO int id = -1; + static int id = -1; if (id < 0) { if (CONFIG(EC_GOOGLE_CHROMEEC)) { |