public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Dirk Behme <dirk.behme@googlemail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/1] TI OMAP3 Use arm init sequence to initialize i2c
Date: Sat, 26 Sep 2009 07:54:41 +0200	[thread overview]
Message-ID: <4ABDACA1.4030701@googlemail.com> (raw)
In-Reply-To: <1253810115-27861-2-git-send-email-Tom.Rix@windriver.com>

Tom Rix wrote:
> This changes fixes an early i2c error.
> 
> It appears that I2C is working because once a read or write
> error is detected, the omap24xx_i2c driver calls i2c_init
> inside its error handling check.
> 
> While it is ok to attempt error handling this way, the boards
> must not depend on this side effect to initialize it's i2c.
> 
> Instead of explicitly calling i2c_init for every board, use
> the generic arm initialization in lib_arm/board.c. By defining
> the config variable CONFIG_HARD_I2C, the omap3 i2c initialization
> is included in the init_sequence table.
> 
> Run tested on Beagle.
> Compile tested on the omap3's
> 
> Signed-off-by: Tom Rix <Tom.Rix@windriver.com>

Acked-by: Dirk Behme <dirk.behme@googlemail.com>

> ---
>  include/configs/devkit8000.h    |    1 +
>  include/configs/omap3_beagle.h  |    1 +
>  include/configs/omap3_evm.h     |    1 +
>  include/configs/omap3_overo.h   |    1 +
>  include/configs/omap3_pandora.h |    1 +
>  include/configs/omap3_zoom1.h   |    1 +
>  include/configs/omap3_zoom2.h   |    1 +
>  7 files changed, 7 insertions(+), 0 deletions(-)
> 
> diff --git a/include/configs/devkit8000.h b/include/configs/devkit8000.h
> index cd40da6..a8ac786 100644
> --- a/include/configs/devkit8000.h
> +++ b/include/configs/devkit8000.h
> @@ -98,6 +98,7 @@
>  #define CONFIG_DOS_PARTITION		1
>  
>  /* I2C */
> +#define CONFIG_HARD_I2C			1
>  #define CONFIG_SYS_I2C_SPEED		100000
>  #define CONFIG_SYS_I2C_SLAVE		1
>  #define CONFIG_SYS_I2C_BUS		0
> diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h
> index 61629f8..55eeb94 100644
> --- a/include/configs/omap3_beagle.h
> +++ b/include/configs/omap3_beagle.h
> @@ -123,6 +123,7 @@
>  #undef CONFIG_CMD_NFS		/* NFS support			*/
>  
>  #define CONFIG_SYS_NO_FLASH
> +#define CONFIG_HARD_I2C			1
>  #define CONFIG_SYS_I2C_SPEED		100000
>  #define CONFIG_SYS_I2C_SLAVE		1
>  #define CONFIG_SYS_I2C_BUS		0
> diff --git a/include/configs/omap3_evm.h b/include/configs/omap3_evm.h
> index 9f0f34b..72e9626 100644
> --- a/include/configs/omap3_evm.h
> +++ b/include/configs/omap3_evm.h
> @@ -121,6 +121,7 @@
>  #undef CONFIG_CMD_IMLS		/* List all found images	*/
>  
>  #define CONFIG_SYS_NO_FLASH
> +#define CONFIG_HARD_I2C			1
>  #define CONFIG_SYS_I2C_SPEED		100000
>  #define CONFIG_SYS_I2C_SLAVE		1
>  #define CONFIG_SYS_I2C_BUS		0
> diff --git a/include/configs/omap3_overo.h b/include/configs/omap3_overo.h
> index 6616b55..c4fd696 100644
> --- a/include/configs/omap3_overo.h
> +++ b/include/configs/omap3_overo.h
> @@ -114,6 +114,7 @@
>  
>  
>  #define CONFIG_SYS_NO_FLASH
> +#define CONFIG_HARD_I2C			1
>  #define CONFIG_SYS_I2C_SPEED		100000
>  #define CONFIG_SYS_I2C_SLAVE		1
>  #define CONFIG_SYS_I2C_BUS		0
> diff --git a/include/configs/omap3_pandora.h b/include/configs/omap3_pandora.h
> index 1cfd7e9..064c0bc 100644
> --- a/include/configs/omap3_pandora.h
> +++ b/include/configs/omap3_pandora.h
> @@ -112,6 +112,7 @@
>  #undef CONFIG_CMD_NFS		/* NFS support			*/
>  
>  #define CONFIG_SYS_NO_FLASH
> +#define CONFIG_HARD_I2C			1
>  #define CONFIG_SYS_I2C_SPEED		100000
>  #define CONFIG_SYS_I2C_SLAVE		1
>  #define CONFIG_SYS_I2C_BUS		0
> diff --git a/include/configs/omap3_zoom1.h b/include/configs/omap3_zoom1.h
> index 61a41e7..b55b8f0 100644
> --- a/include/configs/omap3_zoom1.h
> +++ b/include/configs/omap3_zoom1.h
> @@ -119,6 +119,7 @@
>  #undef CONFIG_CMD_NFS		/* NFS support			*/
>  
>  #define CONFIG_SYS_NO_FLASH
> +#define CONFIG_HARD_I2C			1
>  #define CONFIG_SYS_I2C_SPEED		100000
>  #define CONFIG_SYS_I2C_SLAVE		1
>  #define CONFIG_SYS_I2C_BUS		0
> diff --git a/include/configs/omap3_zoom2.h b/include/configs/omap3_zoom2.h
> index 03f92f5..75ab980 100644
> --- a/include/configs/omap3_zoom2.h
> +++ b/include/configs/omap3_zoom2.h
> @@ -140,6 +140,7 @@
>  #undef CONFIG_CMD_NFS			/* NFS support			*/
>  
>  #define CONFIG_SYS_NO_FLASH
> +#define CONFIG_HARD_I2C			1
>  #define CONFIG_SYS_I2C_SPEED		100000
>  #define CONFIG_SYS_I2C_SLAVE		1
>  #define CONFIG_SYS_I2C_BUS		0

  reply	other threads:[~2009-09-26  5:54 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-24 16:35 [U-Boot] TI OMAP3 Fixing i2c initialization Tom Rix
2009-09-24 16:35 ` [U-Boot] [PATCH 1/1] TI OMAP3 Use arm init sequence to initialize i2c Tom Rix
2009-09-26  5:54   ` Dirk Behme [this message]
2009-09-28  5:27   ` Heiko Schocher
2009-09-28  5:53     ` Dirk Behme
2009-09-28  5:46       ` Heiko Schocher
2009-09-29  6:19   ` Dirk Behme
2009-09-29 12:49     ` Tom

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4ABDACA1.4030701@googlemail.com \
    --to=dirk.behme@googlemail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox