public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Hebbar <gururajakr@sanyo.co.in>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] [PATCH] ARM: I2C Init function call in lib_arm/board.c
Date: Tue, 18 Dec 2007 16:00:54 -0800 (PST)	[thread overview]
Message-ID: <14408494.post@talk.nabble.com> (raw)
In-Reply-To: <14408151.post@talk.nabble.com>




Hi,

we are working on a Customized ARM 926ejs Board. I am trying to port Uboot
for the same board. I found that few patches/changes/updates were required
for arm & ARM926 Specidifc Modules. Below are the Patches for the same

This Patch 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: K R Gururaja Hebbar <gururajakr@sanyo.co.in>

--- u-boot-1.3.1/lib_arm/board.c	2007-12-06 01:21:19.000000000 -0800
+++ uboot/lib_arm/board.c	2007-12-12 19:57:51.296875000 -0800
@@ -84,6 +84,11 @@ extern void cs8900_get_enetaddr (uchar *
 extern void rtl8019_get_enetaddr (uchar * addr);
 #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"
  */
@@ -209,6 +214,16 @@ static void display_flash_config (ulong 
 }
 #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...
  *
@@ -251,6 +266,9 @@ init_fnc_t *init_sequence[] = {
 #if defined(CONFIG_DISPLAY_BOARDINFO)
 	checkboard,		/* display board info */
 #endif
+#if defined(CONFIG_HARD_I2C) || defined(CONFIG_SOFT_I2C)
+	init_func_i2c,
+#endif
 	dram_init,		/* configure available RAM banks */
 	display_dram_config,
 	NULL,


I welcome comments, complaints, suggestions and advices. 

Regards
Gururaja
-- 
View this message in context: http://www.nabble.com/-PATCH--ARM%3A-I2C-Init-function-call-in-lib_arm-board.c-tp14408151p14408494.html
Sent from the Uboot - Users mailing list archive at Nabble.com.

  parent reply	other threads:[~2007-12-19  0:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-18 23:34 [U-Boot-Users] [PATCH] ARM: I2C Init function call in lib_arm/board.c Hebbar
2007-12-18 23:48 ` Wolfgang Denk
2007-12-19  0:00 ` Hebbar [this message]
2008-02-04 22:02   ` Wolfgang Denk

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=14408494.post@talk.nabble.com \
    --to=gururajakr@sanyo.co.in \
    --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