+#include <cpu_def.h>
#include <lpc2xxx.h>
#include "pll.h"
*/
void sys_pll_init(uint32_t f_cclk, uint32_t f_osc) {
uint32_t m, p, p_max;
+ unsigned long flags;
+
+ save_and_cli(flags);
/* turn memory acceleration off */
MAMCR = 0x0;
/* turn memory acceleration on */
MAMTIM = f_cclk/20000000;
MAMCR = 0x2;
+
+ restore_flags(flags);
}
#endif
void lpc23xx_pll_init(int clk_src, int m, int n, int cclk_div) {
unsigned u;
+ unsigned long flags;
+
+ save_and_cli(flags);
/* turn memory acceleration off */
MAMCR = 0x0;
MAMTIM = f_cclk/20000000;
MAMCR = 0x2;
***/
+
+ restore_flags(flags);
}
#endif