ARM: I2C Init function call in lib_arm/board.c
PATCH 1/1 ARM: I2C Init function call in lib_arm/board.c
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.
lib_arm/board.c +18 -0
@@ -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
Signature · 2 lines
View this message in context: http://www.nabble.com/-PATCH--ARM%3A-I2C-Init-function-call-in-lib_arm-board.c-tp14408151p14408151.html Sent from the Uboot - Users mailing list archive at Nabble.com.
PATCH 1/1 ARM: I2C Init function call in lib_arm/board.c
Quoted 3 lines · In message <[email protected]> you wrote:
This Patch adds I2C init func call to init sequence for arm boards. This is present in ppc,blackfin and other processor init sequence.
...
Quoted 2 lines
Signed-off-by Hebbar
Please provide a correct S-o-b line; it must contain your full name and mail address. Please see
http://www.denx.de/cgi-bin/gitweb.cgi?p=linux-2.6-denx.git;a=blob;f=Documentation/SubmittingPatches
for details.
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de All your people must learn before you can reach for the stars. -- Kirk, "The Gamesters of Triskelion", stardate 3259.2
PATCH 1/1 ARM: I2C Init function call in lib_arm/board.c
In reply to HebbarHi,
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.
lib_arm/board.c +18 -0
@@ -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
Signature · 2 lines
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.
Wolfgang Denk
AppliedPATCH 1/1 ARM: I2C Init function call in lib_arm/board.c
Quoted 5 lines · In message <[email protected]> you wrote:
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 <[email protected]>
Applied, thanks.
Best regards,
Wolfgang Denk
Signature · 4 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de 2000 pounds of chinese soup = 1 Won Ton