[U-Boot-Users] [PATCH 2/2] add MPC8343 based board mvBlueLYNX-M7

Kim Phillips kim.phillips at freescale.com
Thu May 8 21:49:28 CEST 2008


On Wed, 7 May 2008 10:36:56 -0500
Kim Phillips <kim.phillips at freescale.com> wrote:

> On Wed, 07 May 2008 12:01:48 +0200
> André Schwarz <Andre.Schwarz at matrix-vision.de> wrote:
> 
> > I'll re-send the 23rd try after my vacation at end of may.
> > If the merge window will be closed at that date it's obviously bad luck.
> 
> I can make the changes, André, thanks!

hmm..made the below changes, but I don't know how to recover from:

fpga.c:55: error: ‘Altera_EP2C20_SIZE’ undeclared here (not in a function)

it seems this never built? also, we are missing a config file in the
latest submission.  One more thing: please submit patches in an order
that will not break future builds during a git-bisect session, i.e.,
since I believe a single patch is less than the ML limit of 40KB, make
it a single patch, please.

Thanks,

Kim

diff --git a/board/mvblm7/Makefile b/board/mvblm7/Makefile
index 84cd14a..42e0243 100644
--- a/board/mvblm7/Makefile
+++ b/board/mvblm7/Makefile
@@ -24,8 +24,11 @@ include $(TOPDIR)/config.mk
 
 LIB	= $(obj)lib$(BOARD).a
 
-COBJS	:= $(BOARD).o pci.o fpga.o
+COBJS-y	:= $(BOARD).o
+COBJS-$(CONFIG_PCI) += pci.o
+COBJS-$(CONFIG_FPGA) += fpga.o
 
+COBJS	:= $(COBJS-y)
 SRCS	:= $(SOBJS:.o=.S) $(COBJS:.o=.c)
 OBJS	:= $(addprefix $(obj),$(COBJS))
 SOBJS	:= $(addprefix $(obj),$(SOBJS))
diff --git a/board/mvblm7/fpga.c b/board/mvblm7/fpga.c
index 5eaa037..a60af01 100644
--- a/board/mvblm7/fpga.c
+++ b/board/mvblm7/fpga.c
@@ -32,8 +32,6 @@
 #include "fpga.h"
 #include "mvblm7.h"
 
-#ifdef CONFIG_FPGA
-
 #ifdef FPGA_DEBUG
 #define fpga_debug(fmt, args...)      printf("%s: "fmt, __func__, ##args)
 #else
@@ -83,8 +81,8 @@ int fpga_config_fn(int assert, int flush, int cookie)
 {
 	volatile immap_t *im = (volatile immap_t *)CFG_IMMR;
 	volatile gpio83xx_t *gpio = (volatile gpio83xx_t *)&im->gpio[0];
-
 	u32 dvo = gpio->dat;
+
 	fpga_debug("SET config : %s\n", assert ? "low" : "high");
 	if (assert)
 		dvo |= FPGA_CONFIG;
@@ -134,8 +132,8 @@ int fpga_clk_fn(int assert_clk, int flush, int cookie)
 {
 	volatile immap_t *im = (volatile immap_t *)CFG_IMMR;
 	volatile gpio83xx_t *gpio = (volatile gpio83xx_t *)&im->gpio[0];
-
 	u32 dvo = gpio->dat;
+
 	fpga_debug("CLOCK %s\n", assert_clk ? "high" : "low");
 	if (assert_clk)
 		dvo |= FPGA_CCLK;
@@ -188,4 +186,3 @@ int fpga_wr_fn(void *buf, size_t len, int flush, int cookie)
 
 	return FPGA_SUCCESS;
 }
-#endif
diff --git a/board/mvblm7/mvblm7.c b/board/mvblm7/mvblm7.c
index 8f8e299..7e9b71f 100644
--- a/board/mvblm7/mvblm7.c
+++ b/board/mvblm7/mvblm7.c
@@ -43,15 +43,14 @@ int fixed_sdram(void)
 	u32 ddr_size_log2;
 
 	msize = CFG_DDR_SIZE;
-	for (ddr_size = msize << 20, ddr_size_log2 = 0;
-		(ddr_size > 1);
-		ddr_size = ddr_size>>1, ddr_size_log2++) {
+	for (ddr_size = msize << 20, ddr_size_log2 = 0; ddr_size > 1;
+		ddr_size = ddr_size >> 1, ddr_size_log2++)
 		if (ddr_size & 1)
 			return -1;
-	}
+
 	im->sysconf.ddrlaw[0].bar = ((CFG_DDR_SDRAM_BASE>>12) & 0xfffff);
 	im->sysconf.ddrlaw[0].ar = LAWAR_EN | ((ddr_size_log2 - 1) &
-		LAWAR_SIZE);
+					       LAWAR_SIZE);
 
 	im->ddr.csbnds[0].csbnds = CFG_DDR_CS0_BNDS;
 	im->ddr.cs_config[0] = CFG_DDR_CS0_CONFIG;
@@ -131,5 +130,4 @@ void ft_board_setup(void *blob, bd_t *bd)
 	ft_pci_setup(blob, bd);
 #endif
 }
-
 #endif
diff --git a/board/mvblm7/pci.c b/board/mvblm7/pci.c
index b6453d0..72123c8 100644
--- a/board/mvblm7/pci.c
+++ b/board/mvblm7/pci.c
@@ -28,11 +28,14 @@
 #include <libfdt.h>
 #endif
 #include <pci.h>
+#include <fpga.h>
 #include <mpc83xx.h>
 #include "mvblm7.h"
 
 DECLARE_GLOBAL_DATA_PTR;
 
+extern int mvblm7_init_fpga(void);
+
 /* System RAM mapped to PCI space */
 #define CONFIG_PCI_SYS_MEM_BUS	CFG_SDRAM_BASE
 #define CONFIG_PCI_SYS_MEM_PHYS	CFG_SDRAM_BASE




More information about the U-Boot mailing list