From 5157083c8766b09db2153515c831da2791c76102 Mon Sep 17 00:00:00 2001 From: Minkyu Kang Date: Fri, 20 Nov 2009 15:17:06 +0900 Subject: [PATCH] 5pc1xx: aquila: workaround: fix revision check (default is Rev0.4) Signed-off-by: Minkyu Kang --- board/samsung/universal/universal.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/board/samsung/universal/universal.c b/board/samsung/universal/universal.c index aa35740..d253d36 100644 --- a/board/samsung/universal/universal.c +++ b/board/samsung/universal/universal.c @@ -413,12 +413,15 @@ static void show_hw_revision(void) struct s5pc110_gpio *gpio = (struct s5pc110_gpio *)S5PC110_GPIO_BASE; + /* default is Rev 0.4 */ + board_rev &= ~0xf; + board_rev |= 0x4; + udelay(2000); - if (gpio_get_value(&gpio->gpio_j0, 4)) { + /* if GPJ0[4] is low, it's Rev 0.0 */ + if (gpio_get_value(&gpio->gpio_j0, 4) == 0) board_rev &= ~0xf; - board_rev |= 0x4; - } } } -- 2.7.4