Browse Source

Blackfin: only build post code when CONFIG_POST

Save some time by using CONFIG_POST in the Makefile rather than C files.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Mike Frysinger 15 years ago
parent
commit
7a1e87b106
3 changed files with 1 additions and 9 deletions
  1. 1 2
      lib_blackfin/Makefile
  2. 0 4
      lib_blackfin/post.c
  3. 0 3
      lib_blackfin/tests.c

+ 1 - 2
lib_blackfin/Makefile

@@ -40,9 +40,8 @@ COBJS-y	+= board.o
 COBJS-y	+= boot.o
 COBJS-y	+= cache.o
 COBJS-y	+= muldi3.o
-COBJS-y	+= post.o
+COBJS-$(CONFIG_POST) += post.o tests.o
 COBJS-y	+= string.o
-COBJS-y	+= tests.o
 
 SRCS	:= $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
 OBJS	:= $(addprefix $(obj),$(SOBJS-y) $(COBJS-y))

+ 0 - 4
lib_blackfin/post.c

@@ -30,8 +30,6 @@
 #include <logbuff.h>
 #endif
 
-#ifdef CONFIG_POST
-
 DECLARE_GLOBAL_DATA_PTR;
 
 #define POST_MAX_NUMBER		32
@@ -421,5 +419,3 @@ unsigned long post_time_ms(unsigned long base)
 {
 	return (unsigned long)get_ticks() / (get_tbclk() / CONFIG_SYS_HZ) - base;
 }
-
-#endif				/* CONFIG_POST */

+ 0 - 3
lib_blackfin/tests.c

@@ -27,7 +27,6 @@
 
 #include <common.h>
 #include <config.h>
-#ifdef CONFIG_POST
 
 #include <post.h>
 #define CONFIG_SYS_POST_FLASH  0x00004000
@@ -249,5 +248,3 @@ struct post_test post_list[] = {
 };
 
 unsigned int post_list_size = sizeof(post_list) / sizeof(struct post_test);
-
-#endif				/* CONFIG_POST */