Merge branch 'master' of git://git.denx.de/u-boot-mpc5xxx
diff --git a/board/ads5121/ads5121.c b/board/ads5121/ads5121.c
index ba3d7d2..deaa292 100644
--- a/board/ads5121/ads5121.c
+++ b/board/ads5121/ads5121.c
@@ -25,6 +25,7 @@
 #include <mpc512x.h>
 #include <asm/bitops.h>
 #include <command.h>
+#include <asm/processor.h>
 #include <fdt_support.h>
 #ifdef CONFIG_MISC_INIT_R
 #include <i2c.h>
@@ -92,6 +93,9 @@
 	 * Configure Flash Speed
 	 */
 	*((volatile u32 *)(CFG_IMMR + LPC_OFFSET + CS0_CONFIG)) = CFG_CS0_CFG;
+	if (SVR_MJREV (im->sysconf.spridr) >= 2) {
+		*((volatile u32 *)(CFG_IMMR + LPC_OFFSET + CS_ALE_TIMING_CONFIG)) = CFG_CS_ALETIMING;
+	}
 	/*
 	 * Enable clocks
 	 */
diff --git a/cpu/mpc512x/Makefile b/cpu/mpc512x/Makefile
index 8ba8ae8..e8f1060 100644
--- a/cpu/mpc512x/Makefile
+++ b/cpu/mpc512x/Makefile
@@ -25,7 +25,7 @@
 LIB	= $(obj)lib$(CPU).a
 
 START	= start.o
-COBJS	= traps.o cpu.o cpu_init.o speed.o interrupts.o serial.o fec.o i2c.o iopin.o
+COBJS	= traps.o cpu.o cpu_init.o speed.o interrupts.o serial.o i2c.o iopin.o
 
 SRCS	:= $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c)
 OBJS	:= $(addprefix $(obj),$(SOBJS) $(COBJS))
diff --git a/cpu/mpc5xxx/Makefile b/cpu/mpc5xxx/Makefile
index 312b0bf..06fdbcf 100644
--- a/cpu/mpc5xxx/Makefile
+++ b/cpu/mpc5xxx/Makefile
@@ -27,7 +27,7 @@
 
 START	= start.o
 SOBJS	= io.o firmware_sc_task_bestcomm.impl.o firmware_sc_task.impl.o
-COBJS	= i2c.o traps.o cpu.o cpu_init.o fec.o ide.o interrupts.o \
+COBJS	= i2c.o traps.o cpu.o cpu_init.o ide.o interrupts.o \
 	  loadtask.o pci_mpc5200.o serial.o speed.o usb_ohci.o usb.o
 
 SRCS	:= $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c)
diff --git a/drivers/net/Makefile b/drivers/net/Makefile
index bcf31cb..a084000 100644
--- a/drivers/net/Makefile
+++ b/drivers/net/Makefile
@@ -41,6 +41,8 @@
 COBJS-$(CONFIG_DRIVER_LAN91C96) += lan91c96.o
 COBJS-$(CONFIG_MACB) += macb.o
 COBJS-$(CONFIG_MCFFEC) += mcffec.o
+COBJS-$(CONFIG_MPC5xxx_FEC) += mpc5xxx_fec.o
+COBJS-$(CONFIG_MPC512x_FEC) += mpc512x_fec.o
 COBJS-$(CONFIG_NATSEMI) += natsemi.o
 ifeq ($(CONFIG_DRIVER_NE2000),y)
 COBJS-y += ne2000.o
diff --git a/cpu/mpc512x/fec.c b/drivers/net/mpc512x_fec.c
similarity index 99%
rename from cpu/mpc512x/fec.c
rename to drivers/net/mpc512x_fec.c
index e9df7de..7caeeda 100644
--- a/cpu/mpc512x/fec.c
+++ b/drivers/net/mpc512x_fec.c
@@ -11,7 +11,7 @@
 #include <malloc.h>
 #include <net.h>
 #include <miiphy.h>
-#include "fec.h"
+#include "mpc512x_fec.h"
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/cpu/mpc512x/fec.h b/drivers/net/mpc512x_fec.h
similarity index 100%
rename from cpu/mpc512x/fec.h
rename to drivers/net/mpc512x_fec.h
diff --git a/cpu/mpc5xxx/fec.c b/drivers/net/mpc5xxx_fec.c
similarity index 99%
rename from cpu/mpc5xxx/fec.c
rename to drivers/net/mpc5xxx_fec.c
index bf804ee..3d3eb8b 100644
--- a/cpu/mpc5xxx/fec.c
+++ b/drivers/net/mpc5xxx_fec.c
@@ -8,11 +8,11 @@
 
 #include <common.h>
 #include <mpc5xxx.h>
+#include <mpc5xxx_sdma.h>
 #include <malloc.h>
 #include <net.h>
 #include <miiphy.h>
-#include "sdma.h"
-#include "fec.h"
+#include "mpc5xxx_fec.h"
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/cpu/mpc5xxx/fec.h b/drivers/net/mpc5xxx_fec.h
similarity index 98%
rename from cpu/mpc5xxx/fec.h
rename to drivers/net/mpc5xxx_fec.h
index 81756a5..16c3e8e 100644
--- a/cpu/mpc5xxx/fec.h
+++ b/drivers/net/mpc5xxx_fec.h
@@ -11,10 +11,6 @@
 #ifndef __MPC5XXX_FEC_H
 #define __MPC5XXX_FEC_H
 
-#include <common.h>
-#include <mpc5xxx.h>
-#include "sdma.h"
-
 typedef unsigned long uint32;
 typedef unsigned short uint16;
 typedef unsigned char uint8;
diff --git a/include/configs/ads5121.h b/include/configs/ads5121.h
index 5f74afb..f516c46 100644
--- a/include/configs/ads5121.h
+++ b/include/configs/ads5121.h
@@ -210,6 +210,7 @@
 
 #define CFG_CS0_CFG		0x05059310	/* ALE active low, data size 4bytes */
 #define CFG_CS2_CFG		0x05059010	/* ALE active low, data size 1byte */
+#define CFG_CS_ALETIMING	0x00000005	/* Use alternative CS timing for CS0 and CS2 */
 
 /* Use SRAM for initial stack */
 #define CFG_INIT_RAM_ADDR	CFG_SRAM_BASE		/* Initial RAM address */
diff --git a/include/mpc512x.h b/include/mpc512x.h
index a76b1ca..cb418d1 100644
--- a/include/mpc512x.h
+++ b/include/mpc512x.h
@@ -58,6 +58,7 @@
 #define CS5_CONFIG		0x00014
 #define CS6_CONFIG		0x00018
 #define CS7_CONFIG		0x0001C
+#define CS_ALE_TIMING_CONFIG	0x00034
 
 #define CS_CTRL			0x00020
 #define CS_CTRL_ME		0x01000000	/* CS Master Enable bit */
diff --git a/cpu/mpc5xxx/sdma.h b/include/mpc5xxx_sdma.h
similarity index 100%
rename from cpu/mpc5xxx/sdma.h
rename to include/mpc5xxx_sdma.h