diff options
author | Bill Richardson <wfrichar@chromium.org> | 2013-06-17 17:43:52 -0700 |
---|---|---|
committer | ChromeBot <chrome-bot@google.com> | 2013-06-18 16:12:08 -0700 |
commit | 89ee180156889ce0fab13fb1a2905bd2270ab8a9 (patch) | |
tree | 16a6867595a5d87d93ffd8e12326e40d7ddc901f | |
parent | 9bb5c83d6c77e50a445893bb35835aa8feb40a62 (diff) | |
download | chrome-ec-89ee180156889ce0fab13fb1a2905bd2270ab8a9.tar.gz |
Falco WP is active low, not active high
Read the value of the WP GPIO correctly.
BUG=chrome-os-partner:20091
BRANCH=none
TEST=manual
On the EC console, run
gpioget WP_L
Short the WP pin, run it again. You should see it change.
Change-Id: Id85c1d69c88ea3df4e529e844aa2455643f1a41b
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/58948
Reviewed-by: Randall Spangler <rspangler@chromium.org>
-rw-r--r-- | board/falco/board.c | 2 | ||||
-rw-r--r-- | board/falco/board.h | 3 | ||||
-rw-r--r-- | chip/lm4/switch.c | 4 |
3 files changed, 6 insertions, 3 deletions
diff --git a/board/falco/board.c b/board/falco/board.c index ba0bfffa16..40b983ce2f 100644 --- a/board/falco/board.c +++ b/board/falco/board.c @@ -59,7 +59,7 @@ const struct gpio_info gpio_list[GPIO_COUNT] = { x86_power_interrupt}, {"RECOVERY_L", LM4_GPIO_A, (1<<5), GPIO_PULL_UP|GPIO_INT_BOTH, switch_interrupt}, - {"WP", LM4_GPIO_A, (1<<4), GPIO_INT_BOTH, + {"WP_L", LM4_GPIO_A, (1<<4), GPIO_INT_BOTH, switch_interrupt}, /* Other inputs */ diff --git a/board/falco/board.h b/board/falco/board.h index 213b965b7e..6490568dbf 100644 --- a/board/falco/board.h +++ b/board/falco/board.h @@ -34,7 +34,6 @@ #define CONFIG_PWM_FAN #define CONFIG_TEMP_SENSOR #define CONFIG_USB_PORT_POWER_DUMB -#define CONFIG_WP_ACTIVE_HIGH #ifndef __ASSEMBLER__ @@ -83,7 +82,7 @@ enum gpio_signal { GPIO_VCORE_PGOOD, /* Power good on core VR */ GPIO_PCH_EDP_VDD_EN, /* PCH wants EDP enabled */ GPIO_RECOVERY_L, /* Recovery signal from servo */ - GPIO_WP, /* Write protect input */ + GPIO_WP_L, /* Write protect input */ /* Other inputs */ GPIO_FAN_ALERT_L, /* From thermal sensor */ diff --git a/chip/lm4/switch.c b/chip/lm4/switch.c index 0d20f9cd25..c4f1526275 100644 --- a/chip/lm4/switch.c +++ b/chip/lm4/switch.c @@ -416,7 +416,11 @@ static void switch_init(void) /* Enable interrupts, now that we've initialized */ gpio_enable_interrupt(GPIO_POWER_BUTTON_L); gpio_enable_interrupt(GPIO_RECOVERY_L); +#ifdef CONFIG_WP_ACTIVE_HIGH gpio_enable_interrupt(GPIO_WP); +#else + gpio_enable_interrupt(GPIO_WP_L); +#endif } DECLARE_HOOK(HOOK_INIT, switch_init, HOOK_PRIO_DEFAULT); |