tree: Consolidate BIT() macro

Change-Id: I7e61f7671b70ca5ed751d99405714436bcd18d5a
Signed-off-by: Edward O'Callaghan <quasisec@google.com>
Original-Reviewed-on: https://review.coreboot.org/c/flashrom/+/64962
Original-Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Original-Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/flashrom-stable/+/72338
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
diff --git a/include/flash.h b/include/flash.h
index e955942..efc2558 100644
--- a/include/flash.h
+++ b/include/flash.h
@@ -39,6 +39,8 @@
 #define KiB (1024)
 #define MiB (1024 * KiB)
 
+#define BIT(x) (1<<(x))
+
 /* Assumes `n` and `a` are at most 64-bit wide (to avoid typeof() operator). */
 #define ALIGN_DOWN(n, a) ((n) & ~((uint64_t)(a) - 1))
 
diff --git a/nicintel_eeprom.c b/nicintel_eeprom.c
index 662707c..f024afc 100644
--- a/nicintel_eeprom.c
+++ b/nicintel_eeprom.c
@@ -69,7 +69,6 @@
 #define EEWR_ADDR 2
 #define EEWR_DATA 16
 
-#define BIT(x) (1<<x)
 #define EE_PAGE_MASK 0x3f
 
 static uint8_t *nicintel_eebar;
diff --git a/nicintel_spi.c b/nicintel_spi.c
index 8a57b54..174af9a 100644
--- a/nicintel_spi.c
+++ b/nicintel_spi.c
@@ -74,8 +74,6 @@
 // #define FL_BUSY	30
 // #define FL_ER	31
 
-#define BIT(x) (1<<(x))
-
 static uint8_t *nicintel_spibar;
 
 static const struct dev_entry nics_intel_spi[] = {