diff mbox

[U-Boot,2/2] Kirkwood: OpenRD: Initialize MPPs during early init

Message ID 1287148576-25446-1-git-send-email-tanmay.upadhyay@einfochips.com
State Superseded, archived
Headers show

Commit Message

Tanmay Upadhyay Oct. 15, 2010, 1:16 p.m. UTC
This patch adds board_early_init_f function for OpenRD boards. The
function initializes MPPs so that peripherals can work at early
stage.

Signed-off-by: Tanmay Upadhyay <tanmay.upadhyay@einfochips.com>
---
 board/Marvell/openrd/openrd.c |    6 +++++-
 include/configs/openrd.h      |    2 ++
 2 files changed, 7 insertions(+), 1 deletions(-)
diff mbox

Patch

diff --git a/board/Marvell/openrd/openrd.c b/board/Marvell/openrd/openrd.c
index 3953282..2d34a24 100644
--- a/board/Marvell/openrd/openrd.c
+++ b/board/Marvell/openrd/openrd.c
@@ -41,7 +41,7 @@ 
 
 DECLARE_GLOBAL_DATA_PTR;
 
-int board_init(void)
+int board_early_init_f(void)
 {
 	/*
 	 * default gpio configuration
@@ -108,7 +108,11 @@  int board_init(void)
 	};
 
 	kirkwood_mpp_conf(kwmpp_config);
+	return 0;
+}
 
+int board_init(void)
+{
 	/*
 	 * arch number of board
 	 */
diff --git a/include/configs/openrd.h b/include/configs/openrd.h
index c4dcad6..850dbae 100644
--- a/include/configs/openrd.h
+++ b/include/configs/openrd.h
@@ -110,4 +110,6 @@ 
 #define CONFIG_SYS_ATA_IDE1_OFFSET	MV_SATA_PORT1_OFFSET
 #endif /*CONFIG_MVSATA_IDE*/
 
+/* board_early_init_f function in openrd.c initializes all MPP settings */
+#define CONFIG_BOARD_EARLY_INIT_F
 #endif /* _CONFIG_OPENRD_H */