*/
#include <common.h>
+#include <hang.h>
#include <asm/io.h>
#include <asm/arch/at91_common.h>
#include <asm/arch/at91_pit.h>
#endif
tmp = readl(&pmc->mor);
+/*
+ * some boards have an external oscillator with driving.
+ * in this case we need to disable the internal SoC driving (bypass mode)
+ */
+#if defined(CONFIG_SPL_AT91_MCK_BYPASS)
+ tmp |= AT91_PMC_MOR_OSCBYPASS;
+#else
tmp &= ~AT91_PMC_MOR_OSCBYPASS;
+#endif
tmp &= ~AT91_PMC_MOR_KEY(0xff);
tmp |= AT91_PMC_MOR_KEY(0x37);
writel(tmp, &pmc->mor);
configure_2nd_sram_as_l2_cache();
#endif
+#if !defined(CONFIG_WDT_AT91)
/* disable watchdog */
at91_disable_wdt();
+#endif
/* PMC configuration */
at91_pmc_init();