Преглед изворни кода

Merge branch 'master' of git://git.denx.de/u-boot-mpc5xxx

Wolfgang Denk пре 16 година
родитељ
комит
845842c1e4

+ 4 - 0
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 @@ int board_early_init_f (void)
 	 * 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
 	 */

+ 1 - 1
cpu/mpc512x/Makefile

@@ -25,7 +25,7 @@ include $(TOPDIR)/config.mk
 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))

+ 1 - 1
cpu/mpc5xxx/Makefile

@@ -27,7 +27,7 @@ LIB	= $(obj)lib$(CPU).a
 
 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)

+ 2 - 0
drivers/net/Makefile

@@ -41,6 +41,8 @@ COBJS-$(CONFIG_DRIVER_KS8695ETH) += ks8695eth.o
 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

+ 1 - 1
cpu/mpc512x/fec.c → 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;
 

+ 0 - 0
cpu/mpc512x/fec.h → drivers/net/mpc512x_fec.h


+ 2 - 2
cpu/mpc5xxx/fec.c → 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;
 

+ 0 - 4
cpu/mpc5xxx/fec.h → 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;

+ 1 - 0
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 */

+ 1 - 0
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 */

+ 0 - 0
cpu/mpc5xxx/sdma.h → include/mpc5xxx_sdma.h