From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Date: Fri, 12 Jun 2009 16:57:06 -0500 Subject: [U-Boot] [PATCH 4/4] ZOOM1 Add power reset button In-Reply-To: <20090612214630.GE1802@game.jcrosoft.org> References: <1244638432-30893-1-git-send-email-Tom.Rix@windriver.com> <1244638432-30893-2-git-send-email-Tom.Rix@windriver.com> <1244638432-30893-3-git-send-email-Tom.Rix@windriver.com> <1244638432-30893-4-git-send-email-Tom.Rix@windriver.com> <1244638432-30893-5-git-send-email-Tom.Rix@windriver.com> <20090612214630.GE1802@game.jcrosoft.org> Message-ID: <4A32CF32.9080701@windriver.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Jean-Christophe PLAGNIOL-VILLARD wrote: > On 07:53 Wed 10 Jun , Tom Rix wrote: > >> The reset button is the red circle on the top right, front of >> the board. Press and hold the button for 8 seconds to completely >> reset the board. >> >> Signed-off-by: Tom Rix >> --- >> board/omap3/zoom1/zoom1.c | 8 ++++++++ >> drivers/i2c/twl4030_i2c.c | 2 +- >> include/configs/omap3_zoom1.h | 1 + >> 3 files changed, 10 insertions(+), 1 deletions(-) >> >> diff --git a/board/omap3/zoom1/zoom1.c b/board/omap3/zoom1/zoom1.c >> index db4d087..8a3afaf 100644 >> --- a/board/omap3/zoom1/zoom1.c >> +++ b/board/omap3/zoom1/zoom1.c >> @@ -31,6 +31,7 @@ >> * MA 02111-1307 USA >> */ >> #include >> +#include >> #include >> #include >> #include >> @@ -51,6 +52,13 @@ int board_init(void) >> /* boot param addr */ >> gd->bd->bi_boot_params = (OMAP34XX_SDRC_CS0 + 0x100); >> >> + /* >> + * Board Reset >> + * The board is reset by holding the red button on the >> + * top right front face for eight seconds. >> + */ >> + twl4030_power_reset_init(); >> + >> return 0; >> } >> >> diff --git a/drivers/i2c/twl4030_i2c.c b/drivers/i2c/twl4030_i2c.c >> index 549f974..00146f8 100644 >> --- a/drivers/i2c/twl4030_i2c.c >> +++ b/drivers/i2c/twl4030_i2c.c >> @@ -40,7 +40,7 @@ static inline int twl4030_i2c_read_u8(u8 chip_no, u8 *val, u8 reg) >> */ >> void twl4030_power_reset_init(void) >> { >> -#ifdef CONFIG_OMAP3_ZOOM2 >> +#if defined(CONFIG_OMAP3_ZOOM2) || defined(CONFIG_OMAP3_ZOOM1) >> > I think it will be better to avoid board specifc code in the driver > unless it's the only solution > > I think this is zoom1 and zoom2 specific. I could add this function to each of their board files. I was trying to avoid that. Tom > Best Regards, > J. >