summaryrefslogtreecommitdiff
path: root/arch/powerpc/lib/board.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/lib/board.c')
-rw-r--r--arch/powerpc/lib/board.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/arch/powerpc/lib/board.c b/arch/powerpc/lib/board.c
index bef3f76f0c..a101e03601 100644
--- a/arch/powerpc/lib/board.c
+++ b/arch/powerpc/lib/board.c
@@ -82,8 +82,7 @@ extern void sc3_read_eeprom(void);
#if defined(CONFIG_CMD_DOC)
void doc_init(void);
#endif
-#if defined(CONFIG_HARD_I2C) || \
- defined(CONFIG_SOFT_I2C)
+#if defined(CONFIG_HARD_I2C) || defined(CONFIG_SYS_I2C)
#include <i2c.h>
#endif
#include <spi.h>
@@ -198,11 +197,15 @@ static int init_func_ram(void)
/***********************************************************************/
-#if defined(CONFIG_HARD_I2C) || defined(CONFIG_SOFT_I2C)
+#if defined(CONFIG_HARD_I2C) || defined(CONFIG_SYS_I2C)
static int init_func_i2c(void)
{
puts("I2C: ");
+#ifdef CONFIG_SYS_I2C
+ i2c_init_all();
+#else
i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);
+#endif
puts("ready\n");
return 0;
}
@@ -291,7 +294,7 @@ static init_fnc_t *init_sequence[] = {
misc_init_f,
#endif
INIT_FUNC_WATCHDOG_RESET
-#if defined(CONFIG_HARD_I2C) || defined(CONFIG_SOFT_I2C)
+#if defined(CONFIG_HARD_I2C) || defined(CONFIG_SYS_I2C)
init_func_i2c,
#endif
#if defined(CONFIG_HARD_SPI)