From 48f6f945c028a83725ab962cbff5120ac5280cd0 Mon Sep 17 00:00:00 2001
From: Eric Benard <eric@eukrea.com>
Date: Fri, 17 Jun 2011 09:24:24 +0200
Subject: [PATCH 09/30] beagleboard: enable HUB power on XM boards
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

LEDA needs to be at level 0 to enable HUB_3V3

Signed-off-by: Eric Bénard <eric@eukrea.com>
---
 board/ti/beagle/beagle.c |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c
index 7768901..a6ce5a8 100644
--- a/board/ti/beagle/beagle.c
+++ b/board/ti/beagle/beagle.c
@@ -309,8 +309,15 @@ int misc_init_r(void)
 		setenv(expansion_config.env_var, expansion_config.env_setting);
 
 	twl4030_power_init();
-	twl4030_led_init(TWL4030_LED_LEDEN_LEDAON | TWL4030_LED_LEDEN_LEDBON);
-
+	switch (get_board_revision()) {
+		case REVISION_C4:
+		case REVISION_XM_C:
+			twl4030_led_init(TWL4030_LED_LEDEN_LEDAON | TWL4030_LED_LEDEN_LEDBON);
+			break;
+		default:
+			twl4030_led_init(TWL4030_LED_LEDEN_LEDBON);
+			break;
+	}
 	/* Set GPIO states before they are made outputs */
 	writel(GPIO23 | GPIO10 | GPIO8 | GPIO2 | GPIO1,
 		&gpio6_base->setdataout);
-- 
1.6.6.1

