*
*/
-#include "hw/hw_cpu.h"
#include <cpu/detect.h>
+#include "cfg/cfg_arch.h"
-#if CLOCK_FREQ != 48023000L
-#error Clock registers set for 48MHz operation, revise following code if you want a different clock.
+#if CPU_FREQ != 48023000L
+ /* Avoid errors on nightly test */
+ #if !defined(ARCH_NIGHTTEST) || !(ARCH & ARCH_NIGHTTEST)
+ #warning Clock registers set for 48.023MHz operation, revise following code if you want a different clock.
+ #endif
#endif
-#if CPU_ARM_AT91SAM7S256 || CPU_ARM_AT91SAM7X256 || CPU_ARM_AT91SAM7X128
+#if CPU_ARM_SAM7S_LARGE || CPU_ARM_SAM7X
/**
* With a 18.420MHz cristal, master clock is:
* (((18.420 * PLL_MUL_VAL + 1) / PLL_DIV_VAL) / AT91MCK_PRES) = 48.023MHz