diff options
author | Hebbar <gururajakr@sanyo.co.in> | 2007-12-18 16:00:54 -0800 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2008-02-04 23:02:00 +0100 |
commit | f7ad79b6f9f0f45437b62e19b45356cc2aaf4884 (patch) | |
tree | 18b20e7c523127daeb4338c2f721b5e22f79bf05 | |
parent | 4fedfddf97461b88668b9aec774dfb7a0c6dc368 (diff) | |
download | u-boot-imx-f7ad79b6f9f0f45437b62e19b45356cc2aaf4884.zip u-boot-imx-f7ad79b6f9f0f45437b62e19b45356cc2aaf4884.tar.gz u-boot-imx-f7ad79b6f9f0f45437b62e19b45356cc2aaf4884.tar.bz2 |
ARM: add I2C init function call in lib_arm/board.c
Adds I2C init func call to init sequence for ARM boards. This is
present in ppc,blackfin and other processor init sequence.
Signed-off-by: K R Gururaja Hebbar <gururajakr@sanyo.co.in>
-rw-r--r-- | lib_arm/board.c | 18 |
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, |