summaryrefslogtreecommitdiff
path: root/common/cbi.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/cbi.c')
-rw-r--r--common/cbi.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/common/cbi.c b/common/cbi.c
index 1f92e584c2..e1839a9b6e 100644
--- a/common/cbi.c
+++ b/common/cbi.c
@@ -225,7 +225,11 @@ int cbi_set_board_info(enum cbi_data_tag tag, const uint8_t *buf, uint8_t size)
static int eeprom_is_write_protected(void)
{
+#ifdef CONFIG_WP_ACTIVE_HIGH
+ return gpio_get_level(GPIO_WP);
+#else
return !gpio_get_level(GPIO_WP_L);
+#endif /* CONFIG_WP_ACTIVE_HIGH */
}
static int write_board_info(void)