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 <l...@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);
+
        gd->bd->bi_arch_number = MACH_TYPE_PCM037;     /* board id for linux */
        gd->bd->bi_boot_params = (0x80000100);  /* adress of boot parameters */
 
-- 
1.5.4

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to