From 6fa449c874918f43870a3dbba1be169da4fac7fb Mon Sep 17 00:00:00 2001 From: daeinki Date: Wed, 20 Jan 2010 20:19:02 +0900 Subject: [PATCH] s5pc110: modified ARIES board detection. Signed-off-by: daeinki --- board/samsung/universal/universal.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/board/samsung/universal/universal.c b/board/samsung/universal/universal.c index c4074d2..96793c5 100644 --- a/board/samsung/universal/universal.c +++ b/board/samsung/universal/universal.c @@ -441,36 +441,38 @@ static void check_board_revision(int board, int rev) static unsigned int get_hw_revision(struct s5pc1xx_gpio_bank *bank) { unsigned int rev; -#ifndef KESSLER_REV09 - gpio_direction_input(bank, 1); +#ifdef KESSLER_REV09 gpio_direction_input(bank, 2); gpio_direction_input(bank, 3); gpio_direction_input(bank, 4); + gpio_direction_input(bank, 7); - gpio_set_pull(bank, 1, GPIO_PULL_NONE); /* HWREV_MODE3 */ gpio_set_pull(bank, 2, GPIO_PULL_NONE); /* HWREV_MODE0 */ gpio_set_pull(bank, 3, GPIO_PULL_NONE); /* HWREV_MODE1 */ gpio_set_pull(bank, 4, GPIO_PULL_NONE); /* HWREV_MODE2 */ + gpio_set_pull(bank, 7, GPIO_PULL_NONE); /* HWREV_MODE3 */ rev = gpio_get_value(bank, 2); rev |= (gpio_get_value(bank, 3) << 1); rev |= (gpio_get_value(bank, 4) << 2); - rev |= (gpio_get_value(bank, 1) << 3); + rev |= (gpio_get_value(bank, 7) << 3); + /* test */ + rev = 9; #else + gpio_direction_input(bank, 1); gpio_direction_input(bank, 2); gpio_direction_input(bank, 3); gpio_direction_input(bank, 4); - gpio_direction_input(bank, 7); - gpio_set_pull(bank, 2, GPIO_PULL_NONE); /* HWREV_MODE3 */ - gpio_set_pull(bank, 3, GPIO_PULL_NONE); /* HWREV_MODE0 */ - gpio_set_pull(bank, 4, GPIO_PULL_NONE); /* HWREV_MODE1 */ - gpio_set_pull(bank, 7, GPIO_PULL_NONE); /* HWREV_MODE2 */ + gpio_set_pull(bank, 1, GPIO_PULL_NONE); /* HWREV_MODE3 */ + gpio_set_pull(bank, 2, GPIO_PULL_NONE); /* HWREV_MODE0 */ + gpio_set_pull(bank, 3, GPIO_PULL_NONE); /* HWREV_MODE1 */ + gpio_set_pull(bank, 4, GPIO_PULL_NONE); /* HWREV_MODE2 */ rev = gpio_get_value(bank, 2); rev |= (gpio_get_value(bank, 3) << 1); rev |= (gpio_get_value(bank, 4) << 2); - rev |= (gpio_get_value(bank, 7) << 3); + rev |= (gpio_get_value(bank, 1) << 3); #endif /* KESSLER_REV09 */ return rev; -- 2.7.4