From: Jean-Christophe PLAGNIOL-VILLARD Date: Fri, 6 Feb 2009 22:58:09 +0100 Subject: [U-Boot] [PATCH] i.MX31: fir imx31_phycore to work after Linux reboot In-Reply-To: References: Message-ID: <20090206215809.GG24772@game.jcrosoft.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de maybe fix to fir :) On 10:03 Fri 06 Feb , Guennadi Liakhovetski wrote: > Upon power on i.MX31 enables most peripheral clocks, Linux disables the ones > that it's not using to save power. Until now U-Boot on imx31_phycore didn't > enable the I2C clock explicitly, so, after a reboot under Linux, if Linux > didn't use I2C, the clock would stay disabled. And U-Boot on imx31_phycore > uses an I2C EEPROM for environment data. So, after a reboot U-Boot would be > left with its default environment. This patch fixes this problem by enabling > the I2C clock explicitly. > > Signed-off-by: Guennadi Liakhovetski > --- > board/imx31_phycore/imx31_phycore.c | 3 +++ > 1 files changed, 3 insertions(+), 0 deletions(-) > > diff --git a/board/imx31_phycore/imx31_phycore.c b/board/imx31_phycore/imx31_phycore.c > index 4c64cb9..6b78194 100644 > --- a/board/imx31_phycore/imx31_phycore.c > +++ b/board/imx31_phycore/imx31_phycore.c > @@ -60,6 +60,9 @@ int board_init (void) > mx31_gpio_mux(MUX_CSPI2_MOSI__I2C2_SCL); > mx31_gpio_mux(MUX_CSPI2_MISO__I2C2_SDA); > > + /* start I2C2 clock */ > + __REG(CCM_CGR0) = __REG(CCM_CGR0) | (3 << 28); > + is not better to ahve this in the I2C driver? Best Regards, J.