Exclude drivers/qe/fdt.c without CONFIG_QE
authorSebastien Carlier <sebastien.carlier@gmail.com>
Thu, 18 Nov 2010 11:06:46 +0000 (12:06 +0100)
committerWolfgang Denk <wd@denx.de>
Thu, 18 Nov 2010 14:22:10 +0000 (15:22 +0100)
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>
Tested-by: Wolfgang Denk <wd@denx.de>
drivers/qe/Makefile
drivers/qe/fdt.c

index 8e9a035e9204738be30b49cc45a579dcd76bf156..ef4bdf8b24e7c7435ba722eedcbf265133fd3bfd 100644 (file)
@@ -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)
index d7c7d13cab535ccfbf6785352c2312ad00c9fcea..73e9060d572d64be28a474ddb5214bd61aa117ce 100644 (file)
@@ -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
 }