
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 lg@denx.de
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.