Patchwork [U-Boot] Exclude drivers/qe/fdt.c without CONFIG_QE

login
register
mail settings
Submitter Sebastien Carlier
Date Nov. 18, 2010, 11:06 a.m.
Message ID <1290078406-23921-1-git-send-email-sebastien.carlier@gmail.com>
Download mbox | patch
Permalink /patch/72081/
State Accepted
Commit c05b18fd7768cb95cf8a1307b957992ff0aac058
Delegated to: Wolfgang Denk
Headers show

Comments

Sebastien Carlier - Nov. 18, 2010, 11:06 a.m.
Previously with archive libraries fdt.o was compiled and included in
qe.a and then discarded by the linker.  With partial linking this
results in unresolved symbols, which this commit fixes.

This commit also cleans up a now-useless conditional in fdt.c.

Signed-off-by: Sebastien Carlier <sebastien.carlier@gmail.com>
---
 drivers/qe/Makefile |    2 +-
 drivers/qe/fdt.c    |    2 --
 2 files changed, 1 insertions(+), 3 deletions(-)
Wolfgang Denk - Nov. 18, 2010, 2:22 p.m.
Dear Sebastien Carlier,

In message <1290078406-23921-1-git-send-email-sebastien.carlier@gmail.com> you wrote:
> This is a multi-part message in MIME format.
> --------------1.7.3.2.161.g3089c
> Content-Type: text/plain; charset=UTF-8; format=fixed
> Content-Transfer-Encoding: 8bit
> 
> 
> Previously with archive libraries fdt.o was compiled and included in
> qe.a and then discarded by the linker.  With partial linking this
> results in unresolved symbols, which this commit fixes.
> 
> This commit also cleans up a now-useless conditional in fdt.c.
> 
> Signed-off-by: Sebastien Carlier <sebastien.carlier@gmail.com>
> ---
>  drivers/qe/Makefile |    2 +-
>  drivers/qe/fdt.c    |    2 --
>  2 files changed, 1 insertions(+), 3 deletions(-)

This patch fixes building for the following boards:

MPC8308RDB, MPC8313ERDB_33, MPC8313ERDB_66, MPC8313ERDB_NAND_33,
MPC8313ERDB_NAND_66, MPC8315ERDB, MPC8315ERDB_NAND, MPC8349EMDS,
MPC8349ITX, MPC8349ITXGP, MPC8349ITX_LOWBOOT, MPC837XEMDS,
MPC837XEMDS_HOST, MPC837XERDB, MVBLM7, SIMPC8313_LP, SIMPC8313_SP,
TQM834x, mpc8308_p1m, sbc8349, sbc8349_PCI_33, sbc8349_PCI_66,
ve8313, vme8349

Tested-by: Wolfgang Denk <wd@denx.de>



Applied, thanks.

Best regards,

Wolfgang Denk
Kumar Gala - Nov. 19, 2010, 3:26 p.m.
On Nov 18, 2010, at 5:06 AM, Sebastien Carlier wrote:

> 
> Previously with archive libraries fdt.o was compiled and included in
> qe.a and then discarded by the linker.  With partial linking this
> results in unresolved symbols, which this commit fixes.
> 
> This commit also cleans up a now-useless conditional in fdt.c.
> 
> Signed-off-by: Sebastien Carlier <sebastien.carlier@gmail.com>
> ---
> drivers/qe/Makefile |    2 +-
> drivers/qe/fdt.c    |    2 --
> 2 files changed, 1 insertions(+), 3 deletions(-)

applied to 85xx

- k

Patch

diff --git a/drivers/qe/Makefile b/drivers/qe/Makefile
index 8e9a035..ef4bdf8 100644
--- a/drivers/qe/Makefile
+++ b/drivers/qe/Makefile
@@ -24,7 +24,7 @@  include $(TOPDIR)/config.mk
 
 LIB	:= $(obj)libqe.o
 
-COBJS-$(CONFIG_OF_LIBFDT) += fdt.o
+COBJS-$(and $(CONFIG_QE),$(CONFIG_OF_LIBFDT)) += fdt.o
 COBJS-$(CONFIG_QE) += qe.o uccf.o uec.o uec_phy.o
 
 COBJS	:= $(COBJS-y)
diff --git a/drivers/qe/fdt.c b/drivers/qe/fdt.c
index d7c7d13..73e9060 100644
--- a/drivers/qe/fdt.c
+++ b/drivers/qe/fdt.c
@@ -74,7 +74,6 @@  error:
 
 void ft_qe_setup(void *blob)
 {
-#ifdef CONFIG_QE
 	do_fixup_by_prop_u32(blob, "device_type", "qe", 4,
 		"bus-frequency", gd->qe_clk, 1);
 	do_fixup_by_prop_u32(blob, "device_type", "qe", 4,
@@ -88,5 +87,4 @@  void ft_qe_setup(void *blob)
 	do_fixup_by_compat_u32(blob, "fsl,qe-gtm",
 		"clock-frequency", gd->qe_clk / 2, 1);
 	fdt_fixup_qe_firmware(blob);
-#endif
 }