]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - cpu/at32ap/cpu.c
Merge branch 'fixes' into cleanups
[people/ms/u-boot.git] / cpu / at32ap / cpu.c
index 1a1370289d585d5f6a0dda663cd8b60a260f16ed..904bfb227e5b2534cecf429213d55aa7f23bf905 100644 (file)
 #include "hsmc3.h"
 
 /* Sanity checks */
-#if (CFG_CLKDIV_CPU > CFG_CLKDIV_HSB)          \
-       || (CFG_CLKDIV_HSB > CFG_CLKDIV_PBA)    \
-       || (CFG_CLKDIV_HSB > CFG_CLKDIV_PBB)
+#if (CONFIG_SYS_CLKDIV_CPU > CONFIG_SYS_CLKDIV_HSB)            \
+       || (CONFIG_SYS_CLKDIV_HSB > CONFIG_SYS_CLKDIV_PBA)      \
+       || (CONFIG_SYS_CLKDIV_HSB > CONFIG_SYS_CLKDIV_PBB)
 # error Constraint fCPU >= fHSB >= fPB{A,B} violated
 #endif
-#if defined(CONFIG_PLL) && ((CFG_PLL0_MUL < 1) || (CFG_PLL0_DIV < 1))
+#if defined(CONFIG_PLL) && ((CONFIG_SYS_PLL0_MUL < 1) || (CONFIG_SYS_PLL0_DIV < 1))
 # error Invalid PLL multiplier and/or divider
 #endif
 
@@ -47,7 +47,7 @@ int cpu_init(void)
 {
        extern void _evba(void);
 
-       gd->cpu_hz = CFG_OSC0_HZ;
+       gd->cpu_hz = CONFIG_SYS_OSC0_HZ;
 
        /* TODO: Move somewhere else, but needs to be run before we
         * increase the clock frequency. */
@@ -65,9 +65,6 @@ int cpu_init(void)
        sysreg_write(EVBA, (unsigned long)&_evba);
        asm volatile("csrf      %0" : : "i"(SYSREG_EM_OFFSET));
 
-       if(gclk_init)
-               gclk_init();
-
        return 0;
 }