--- /dev/null
+/*
+ * system.c - misc system specific stuff
+ *
+ * author: hackbard@hackdaworld.org
+ *
+ */
+
+#include "system.h"
+
+/*
+ * functions
+ */
+
+void mmap_init(u8 memtype) {
+
+ MEMMAP=memtype;
+}
+
+void pll_init(void) {
+
+ /* configuration */
+ PLLCFG=0x42; // multiplier = 3 (for cclk), dividor = 4 (for f_cco)
+ PLLCON=0x03; // enable and set as clk source for the lpc
+
+ /* feed sequence */
+ PLLFEED=0xaa;
+ PLLFEED=0x55;
+
+ /* wait for lock */
+ while(!(PLLSTAT&(1<<10)))
+ continue;
+}
+
+void pause(int cnt) {
+
+ while(cnt--)
+ asm volatile ("nop");
+}
+