@@ -40,10 +40,6 @@
#include "common.h"
#include <i2c.h>
-#if !defined(CONFIG_MPC83xx)
-static void i2c_write_start_seq(void);
-#endif
-
DECLARE_GLOBAL_DATA_PTR;
/*
@@ -94,7 +90,7 @@ int set_km_env(void)
}
#if defined(CONFIG_SYS_I2C_INIT_BOARD)
-#if !defined(CONFIG_MPC83xx)
+#if defined(CONFIG_KM_I2C_ABORT)
static void i2c_write_start_seq(void)
{
set_sda(1);
@@ -59,6 +59,7 @@
#define CONFIG_CMD_NAND
#define CONFIG_CMD_SF
#define CONFIG_SOFT_I2C /* I2C bit-banged */
+#define CONFIG_KM_I2C_ABORT
/* SPI NOR Flash default params, used by sf commands */
#define CONFIG_SF_DEFAULT_SPEED 8100000
@@ -247,6 +247,7 @@
#define CONFIG_SOFT_I2C /* I2C bit-banged */
#define CONFIG_SYS_I2C_SPEED 50000 /* I2C speed */
#define CONFIG_SYS_I2C_SLAVE 0x7F /* I2C slave address */
+#define CONFIG_KM_I2C_ABORT
/*
* Software (bit-bang) I2C driver configuration
This must be defined for all the keymile boards that use the common i2c_abort function that is used to "reset" the I2C bus. These are currently km82xx and km_arm boards. This patch defines them for both architectures. The kmp204x and km83xx boards use other functions and thus do not define this. Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com> --- Changes in v2: - Introduce CONFIG_KM_I2C_ABORT #define to avoid #if !defined in common.c board/keymile/common/common.c | 6 +----- include/configs/km/km_arm.h | 1 + include/configs/km82xx.h | 1 + 3 files changed, 3 insertions(+), 5 deletions(-)