Gabe Black (gabeblack@chromium.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/3096
-gerrit
commit 98d3e24c00845e56d7323351bbfc4ca905fc4fbc Author: Gabe Black gabeblack@chromium.org Date: Mon Apr 15 19:47:40 2013 -0700
snow: Configure the power button as an input GPIO.
We need to read it to report its value to the payload. The kernel will reconfigure it as an external interrupt, but we'll make it a regular input for now.
Change-Id: I019bd2c2731144d3b7bb53fad0c2c903874f616c Signed-off-by: Gabe Black gabeblack@chromium.org --- src/mainboard/google/snow/romstage.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/src/mainboard/google/snow/romstage.c b/src/mainboard/google/snow/romstage.c index 73c0595..5178bb0 100644 --- a/src/mainboard/google/snow/romstage.c +++ b/src/mainboard/google/snow/romstage.c @@ -128,7 +128,8 @@ static void chromeos_gpios(void) enum { WP_GPIO = 6, RECMODE_GPIO = 0, - LID_GPIO = 5 + LID_GPIO = 5, + POWER_GPIO = 3 };
gpio_pt1 = (struct exynos5_gpio_part1 *)EXYNOS5_GPIO_PART1_BASE; @@ -137,12 +138,15 @@ static void chromeos_gpios(void) s5p_gpio_direction_input(&gpio_pt1->d1, WP_GPIO); s5p_gpio_set_pull(&gpio_pt1->d1, WP_GPIO, EXYNOS_GPIO_PULL_NONE);
- s5p_gpio_direction_input(&gpio_pt1->y1, FORCE_RECOVERY_MODE); - s5p_gpio_set_pull(&gpio_pt1->y1, FORCE_RECOVERY_MODE, + s5p_gpio_direction_input(&gpio_pt1->y1, RECMODE_GPIO); + s5p_gpio_set_pull(&gpio_pt1->y1, RECMODE_GPIO, EXYNOS_GPIO_PULL_NONE);
- s5p_gpio_direction_input(&gpio_pt2->x3, LID_OPEN); - s5p_gpio_set_pull(&gpio_pt2->x3, LID_OPEN, EXYNOS_GPIO_PULL_NONE); + s5p_gpio_direction_input(&gpio_pt2->x3, LID_GPIO); + s5p_gpio_set_pull(&gpio_pt2->x3, LID_GPIO, EXYNOS_GPIO_PULL_NONE); + + s5p_gpio_direction_input(&gpio_pt2->x1, POWER_GPIO); + s5p_gpio_set_pull(&gpio_pt2->x1, POWER_GPIO, EXYNOS_GPIO_PULL_NONE); }
void main(void)