diff options
author | Valentin Longchamp <valentin.longchamp@keymile.com> | 2013-10-18 11:47:17 +0200 |
---|---|---|
committer | York Sun <yorksun@freescale.com> | 2013-10-24 09:35:33 -0700 |
commit | 0a4f88b98c098532bfe0a4a5f874e6e05708c4f3 (patch) | |
tree | 08e58ce9f0b5740bd7f3c05fbf2901b88c2452e1 /board/keymile/common | |
parent | 7c3d6a29cd1ed315185068fd8384d150ef5f967b (diff) | |
download | u-boot-imx-0a4f88b98c098532bfe0a4a5f874e6e05708c4f3.zip u-boot-imx-0a4f88b98c098532bfe0a4a5f874e6e05708c4f3.tar.gz u-boot-imx-0a4f88b98c098532bfe0a4a5f874e6e05708c4f3.tar.bz2 |
KM: define CONFIG_SYS_I2C_INIT_BOARD only for concerned board
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.
The km83xx boards use other functions and thus do not need this.
This patch removes the CONFIG_SYS_I2C_INIT_BOARD from keymile-common.h
and defines it for km_arm.h and km82xx.h.
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
Diffstat (limited to 'board/keymile/common')
-rw-r--r-- | board/keymile/common/common.c | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/board/keymile/common/common.c b/board/keymile/common/common.c index 136b2de..3d7b056 100644 --- a/board/keymile/common/common.c +++ b/board/keymile/common/common.c @@ -24,10 +24,6 @@ #include "common.h" #include <i2c.h> -#if !defined(CONFIG_MPC83xx) -static void i2c_write_start_seq(void); -#endif - DECLARE_GLOBAL_DATA_PTR; /* @@ -78,7 +74,6 @@ int set_km_env(void) } #if defined(CONFIG_SYS_I2C_INIT_BOARD) -#if !defined(CONFIG_MPC83xx) static void i2c_write_start_seq(void) { set_sda(1); @@ -101,21 +96,6 @@ static void i2c_write_start_seq(void) */ int i2c_make_abort(void) { - -#if defined(CONFIG_HARD_I2C) && !defined(MACH_TYPE_KM_KIRKWOOD) - immap_t *immap = (immap_t *)CONFIG_SYS_IMMR; - i2c8260_t *i2c = (i2c8260_t *)&immap->im_i2c; - - /* - * disable I2C controller first, otherwhise it thinks we want to - * talk to the slave port... - */ - clrbits_8(&i2c->i2c_i2mod, 0x01); - - /* Set the PortPins to GPIO */ - setports(1); -#endif - int scl_state = 0; int sda_state = 0; int i = 0; @@ -148,13 +128,8 @@ int i2c_make_abort(void) set_sda(1); get_sda(); -#if defined(CONFIG_HARD_I2C) - /* Set the PortPins back to use for I2C */ - setports(0); -#endif return ret; } -#endif /** * i2c_init_board - reset i2c bus. When the board is powercycled during a |