public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Kim Phillips <kim.phillips@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] [PATCH 2/2] add MPC8343 based board mvBlueLYNX-M7
Date: Thu, 8 May 2008 14:49:28 -0500	[thread overview]
Message-ID: <20080508144928.2f480295.kim.phillips@freescale.com> (raw)
In-Reply-To: <20080507103656.8330e409.kim.phillips@freescale.com>

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

> On Wed, 07 May 2008 12:01:48 +0200
> Andr? Schwarz <Andre.Schwarz@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

  reply	other threads:[~2008-05-08 19:49 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <4820147A.4050401@matrix-vision.de>
     [not found] ` <20080506092606.05828286.kim.phillips@freescale.com>
2008-05-06 14:50   ` [U-Boot-Users] [PATCH 1/2] add MPC8343 based board mvBlueLYNX-M7 Andre Schwarz
2008-05-09 20:50     ` Wolfgang Denk
2008-05-06 14:51   ` [U-Boot-Users] [PATCH 2/2] " Andre Schwarz
2008-05-06 20:06     ` Jean-Christophe PLAGNIOL-VILLARD
2008-05-07 10:01       ` André Schwarz
2008-05-07 15:36         ` Kim Phillips
2008-05-08 19:49           ` Kim Phillips [this message]
2008-05-27  8:44             ` Andre Schwarz
2008-05-28  1:16               ` Kim Phillips
2008-06-10  7:14 Andre Schwarz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080508144928.2f480295.kim.phillips@freescale.com \
    --to=kim.phillips@freescale.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox