[U-Boot-Users] [PATCH 2/3] AT91SAM9260EK: Move CONFIG_CMD_NAND to Makefile
Jean-Christophe PLAGNIOL-VILLARD
plagnioj at jcrosoft.com
Tue Apr 1 07:40:25 CEST 2008
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj at jcrosoft.com>
diff --git a/board/atmel/at91sam9260ek/Makefile b/board/atmel/at91sam9260ek/Makefile
index 309ea46..8a629b9 100644
--- a/board/atmel/at91sam9260ek/Makefile
+++ b/board/atmel/at91sam9260ek/Makefile
@@ -25,10 +25,12 @@ include $(TOPDIR)/config.mk
LIB = $(obj)lib$(BOARD).a
-COBJS := at91sam9260ek.o led.o nand.o
+COBJS-y += at91sam9260ek.o
+COBJS-y += led.o
+COBJS-$(CONFIG_CMD_NAND) += nand.o
-SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
+SRCS := $(SOBJS:.o=.S) $(COBJS-y:.o=.c)
+OBJS := $(addprefix $(obj),$(COBJS-y))
SOBJS := $(addprefix $(obj),$(SOBJS))
$(LIB): $(obj).depend $(OBJS) $(SOBJS)
diff --git a/board/atmel/at91sam9260ek/nand.c b/board/atmel/at91sam9260ek/nand.c
index 5131c41..abb788a 100644
--- a/board/atmel/at91sam9260ek/nand.c
+++ b/board/atmel/at91sam9260ek/nand.c
@@ -29,8 +29,6 @@
#include <asm/arch/gpio.h>
#include <asm/arch/at91_pio.h>
-#ifdef CONFIG_CMD_NAND
-
#include <nand.h>
/*
@@ -76,4 +74,3 @@ int board_nand_init(struct nand_chip *nand)
return 0;
}
-#endif
--
1.5.4.1
More information about the U-Boot
mailing list