Skip to content
Snippets Groups Projects
Commit f7ad79b6 authored by Hebbar's avatar Hebbar Committed by Wolfgang Denk
Browse files

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: default avatarK R Gururaja Hebbar <gururajakr@sanyo.co.in>
parent 4fedfddf
No related branches found
No related tags found
No related merge requests found
...@@ -84,6 +84,11 @@ extern void cs8900_get_enetaddr (uchar * addr); ...@@ -84,6 +84,11 @@ extern void cs8900_get_enetaddr (uchar * addr);
extern void rtl8019_get_enetaddr (uchar * addr); extern void rtl8019_get_enetaddr (uchar * addr);
#endif #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" * Begin and End of memory area for malloc(), and current "brk"
*/ */
...@@ -209,6 +214,16 @@ static void display_flash_config (ulong size) ...@@ -209,6 +214,16 @@ static void display_flash_config (ulong size)
} }
#endif /* CFG_NO_FLASH */ #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... * Breathe some life into the board...
* *
...@@ -250,6 +265,9 @@ init_fnc_t *init_sequence[] = { ...@@ -250,6 +265,9 @@ init_fnc_t *init_sequence[] = {
#endif #endif
#if defined(CONFIG_DISPLAY_BOARDINFO) #if defined(CONFIG_DISPLAY_BOARDINFO)
checkboard, /* display board info */ checkboard, /* display board info */
#endif
#if defined(CONFIG_HARD_I2C) || defined(CONFIG_SOFT_I2C)
init_func_i2c,
#endif #endif
dram_init, /* configure available RAM banks */ dram_init, /* configure available RAM banks */
display_dram_config, display_dram_config,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment