summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabe Black <gabeblack@chromium.org>2013-04-15 19:47:40 -0700
committerGabe Black <gabeblack@chromium.org>2013-04-16 11:11:18 +0200
commite2b20f2d5ad6b061d7645528c45a4bfc4beb1f29 (patch)
tree822e50cb47f7443190dd361785fec88ce29bacd8
parentacb9d4459973627f3b082dafb3f184a56a5d4219 (diff)
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> Reviewed-on: http://review.coreboot.org/3096 Reviewed-by: David Hendricks <dhendrix@chromium.org> Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
-rw-r--r--src/mainboard/google/snow/romstage.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mainboard/google/snow/romstage.c b/src/mainboard/google/snow/romstage.c
index 96e93dae5d..4dce4398d8 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;
@@ -142,6 +143,9 @@ static void chromeos_gpios(void)
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)