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>
This commit is contained in:
Gabe Black 2013-04-15 19:47:40 -07:00
parent acb9d44599
commit e2b20f2d5a
1 changed files with 5 additions and 1 deletions

View File

@ -128,7 +128,8 @@ static void chromeos_gpios(void)
enum { enum {
WP_GPIO = 6, WP_GPIO = 6,
RECMODE_GPIO = 0, RECMODE_GPIO = 0,
LID_GPIO = 5 LID_GPIO = 5,
POWER_GPIO = 3
}; };
gpio_pt1 = (struct exynos5_gpio_part1 *)EXYNOS5_GPIO_PART1_BASE; 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_direction_input(&gpio_pt2->x3, LID_GPIO);
s5p_gpio_set_pull(&gpio_pt2->x3, LID_GPIO, EXYNOS_GPIO_PULL_NONE); 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) void main(void)