Fix timer code for ARM systems: make sure that udelay() does not
reset timers so it's save to use udelay() in timeout code.
diff --git a/cpu/at91rm9200/interrupts.c b/cpu/at91rm9200/interrupts.c
index f15c583..cccc405 100644
--- a/cpu/at91rm9200/interrupts.c
+++ b/cpu/at91rm9200/interrupts.c
@@ -231,20 +231,19 @@
 void udelay_masked (unsigned long usec)
 {
 	ulong tmo;
+	ulong endtime;
+	signed long diff;
 
-#if 0 /* doesn't work for usec < 1000 */
-	tmo = usec / 1000;
-	tmo *= CFG_HZ_CLOCK;
-#else
 	tmo = CFG_HZ_CLOCK / 1000;
 	tmo *= usec;
-#endif
 	tmo /= 1000;
 
-	reset_timer_masked ();
+	endtime = get_timer_raw () + tmo;
 
-	while (get_timer_raw () < tmo)
-		/*NOP*/;
+	do {
+		ulong now = get_timer_raw ();
+		diff = endtime - now;
+	} while (diff >= 0);
 }
 
 /*
diff --git a/cpu/at91rm9200/start.S b/cpu/at91rm9200/start.S
index e897e6b..1881ab1 100644
--- a/cpu/at91rm9200/start.S
+++ b/cpu/at91rm9200/start.S
@@ -117,11 +117,11 @@
 
 #ifdef CONFIG_INIT_CRITICAL
 	/* scratch stack */
-	ldr 	r1, =0x00204000
+/****	ldr 	r1, =0x00204000		****/
 	/* Insure word alignment */
-	bic     r1, r1, #3
+/****	bic     r1, r1, #3		****/
 	/* Init stack SYS	 */
-	mov     sp, r1
+/****	mov     sp, r1			****/
 	/*
 	 * This does a lot more than just set up the memory, which
 	 * is why it's called lowlevelinit