summaryrefslogtreecommitdiff
path: root/lib_arm
diff options
context:
space:
mode:
authorJon Loeliger <jdl@freescale.com>2008-02-13 16:03:20 -0600
committerJon Loeliger <jdl@freescale.com>2008-02-13 16:03:20 -0600
commitd075eec500acffed5fa404a45a3e12e158d0cb33 (patch)
tree2cecaae4e1c324827caa65d6c5215642ed4a91ed /lib_arm
parent60c1b95aabbfac17b0ea9422828784e163348c5c (diff)
parent10bbb38a402a2faf18858c451bcdc63d45888e6e (diff)
downloadu-boot-imx-d075eec500acffed5fa404a45a3e12e158d0cb33.zip
u-boot-imx-d075eec500acffed5fa404a45a3e12e158d0cb33.tar.gz
u-boot-imx-d075eec500acffed5fa404a45a3e12e158d0cb33.tar.bz2
Merge commit 'wd/master'
Diffstat (limited to 'lib_arm')
-rw-r--r--lib_arm/board.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/lib_arm/board.c b/lib_arm/board.c
index 7e7a282..22d573a 100644
--- a/lib_arm/board.c
+++ b/lib_arm/board.c
@@ -84,6 +84,11 @@ extern void cs8900_get_enetaddr (uchar * addr);
extern void rtl8019_get_enetaddr (uchar * addr);
#endif
+#if defined(CONFIG_HARD_I2C) || \
+ defined(CONFIG_SOFT_I2C)
+#include <i2c.h>
+#endif
+
/*
* Begin and End of memory area for malloc(), and current "brk"
*/
@@ -209,6 +214,16 @@ static void display_flash_config (ulong size)
}
#endif /* CFG_NO_FLASH */
+#if defined(CONFIG_HARD_I2C) || defined(CONFIG_SOFT_I2C)
+static int init_func_i2c (void)
+{
+ puts ("I2C: ");
+ i2c_init (CFG_I2C_SPEED, CFG_I2C_SLAVE);
+ puts ("ready\n");
+ return (0);
+}
+#endif
+
/*
* Breathe some life into the board...
*
@@ -251,6 +266,9 @@ init_fnc_t *init_sequence[] = {
#if defined(CONFIG_DISPLAY_BOARDINFO)
checkboard, /* display board info */
#endif
+#if defined(CONFIG_HARD_I2C) || defined(CONFIG_SOFT_I2C)
+ init_func_i2c,
+#endif
dram_init, /* configure available RAM banks */
display_dram_config,
NULL,