diff --git a/cpu/pxa/interrupts.c b/cpu/pxa/interrupts.c
index 40d8bf2..2bc5c50 100644
--- a/cpu/pxa/interrupts.c
+++ b/cpu/pxa/interrupts.c
@@ -28,6 +28,7 @@
 
 #include <common.h>
 #include <asm/arch/pxa-regs.h>
+#include <div64.h>
 
 #ifdef CONFIG_USE_IRQ
 #error: interrupts not implemented yet
@@ -41,6 +42,20 @@
 #error "Timer frequency unknown - please config PXA CPU type"
 #endif
 
+static inline unsigned long long tick_to_time(unsigned long long tick)
+{
+	tick *= CONFIG_SYS_HZ;
+	do_div(tick, TIMER_FREQ_HZ);
+	return tick;
+}
+
+static inline unsigned long long us_to_tick(unsigned long long us)
+{
+	us = us * TIMER_FREQ_HZ + 999999;
+	do_div(us, 1000000);
+	return us;
+}
+
 int interrupt_init (void)
 {
 	/* nothing happens here - we don't setup any IRQs */
@@ -75,33 +90,20 @@
 
 ulong get_timer_masked (void)
 {
-	unsigned long long ticks = get_ticks();
-
-	return (((ticks / TIMER_FREQ_HZ) * 1000) +
-	        ((ticks % TIMER_FREQ_HZ) * 1000) / TIMER_FREQ_HZ);
+	return tick_to_time(get_ticks());
 }
 
 void udelay_masked (unsigned long usec)
 {
+	unsigned long long tmp;
 	ulong tmo;
-	ulong endtime;
-	signed long diff;
 
-	if (usec >= 1000) {
-		tmo = usec / 1000;
-		tmo *= TIMER_FREQ_HZ;
-		tmo /= 1000;
-	} else {
-		tmo = usec * TIMER_FREQ_HZ;
-		tmo /= (1000*1000);
-	}
+	tmo = us_to_tick(usec);
+	tmp = get_ticks() + tmo;	/* get current timestamp */
 
-	endtime = get_ticks() + tmo;
+	while (get_ticks() < tmp)	/* loop till event */
+		 /*NOP*/;
 
-	do {
-		ulong now = get_ticks();
-		diff = endtime - now;
-	} while (diff >= 0);
 }
 
 /*
diff --git a/drivers/net/mpc5xxx_fec.c b/drivers/net/mpc5xxx_fec.c
index 2bf901e..0f1d1af 100644
--- a/drivers/net/mpc5xxx_fec.c
+++ b/drivers/net/mpc5xxx_fec.c
@@ -281,13 +281,6 @@
 	}
 
 	fec->eth->x_cntrl = 0x00000000;	/* half-duplex, heartbeat disabled */
-	if (fec->xcv_type != SEVENWIRE) {
-		/*
-		 * Set MII_SPEED = (1/(mii_speed * 2)) * System Clock
-		 * and do not drop the Preamble.
-		 */
-		fec->eth->mii_speed = (((gd->ipb_clk >> 20) / 5) << 1); /* No MII for 7-wire mode */
-	}
 
 	/*
 	 * Set Opcode/Pause Duration Register
@@ -640,6 +633,15 @@
 	 */
 	udelay(10);
 
+	/* don't leave the MII speed set to zero */
+	if (fec->xcv_type != SEVENWIRE) {
+		/*
+		 * Set MII_SPEED = (1/(mii_speed * 2)) * System Clock
+		 * and do not drop the Preamble.
+		 */
+		fec->eth->mii_speed = (((gd->ipb_clk >> 20) / 5) << 1); /* No MII for 7-wire mode */
+	}
+
 #if (DEBUG & 0x3)
 	printf("Ethernet task stopped\n");
 #endif
@@ -897,6 +899,13 @@
 #else
 #error fec->xcv_type not initialized.
 #endif
+	if (fec->xcv_type != SEVENWIRE) {
+		/*
+		 * Set MII_SPEED = (1/(mii_speed * 2)) * System Clock
+		 * and do not drop the Preamble.
+		 */
+		fec->eth->mii_speed = (((gd->ipb_clk >> 20) / 5) << 1); /* No MII for 7-wire mode */
+	}
 
 	dev->priv = (void *)fec;
 	dev->iobase = MPC5XXX_FEC;
