summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
Diffstat (limited to 'board')
-rw-r--r--board/freescale/vybrid/vybrid.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/board/freescale/vybrid/vybrid.c b/board/freescale/vybrid/vybrid.c
index a1507e170bc..c9b423888f0 100644
--- a/board/freescale/vybrid/vybrid.c
+++ b/board/freescale/vybrid/vybrid.c
@@ -30,6 +30,7 @@
#include <asm/errno.h>
#include <asm/arch/sys_proto.h>
#include <asm/arch/crm_regs.h>
+#include <asm/arch/scsc_regs.h>
#include <i2c.h>
#include <mmc.h>
#include <fsl_esdhc.h>
@@ -512,9 +513,23 @@ int board_early_init_f(void)
int board_init(void)
{
+ u32 temp;
+ struct vybrid_scsc_reg *scsc = (struct vybrid_scsc_reg *)SCSCM_BASE_ADDR;
+
/* address of boot parameters */
gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
+ /*
+ * Enable external 32K Oscillator
+ *
+ * The internal clock experiences significant drift
+ * so we must use the external oscillator in order
+ * to maintain correct time in the hwclock
+ */
+ temp = __raw_readl(&scsc->sosc_ctr);
+ temp |= VYBRID_SCSC_SICR_CTR_SOSC_EN;
+ __raw_writel(temp, &scsc->sosc_ctr);
+
return 0;
}