From 0a51e9248e2d27e0a02ef1e740c576ce90a39ee1 Mon Sep 17 00:00:00 2001 From: Yuri Tikhonov Date: Mon, 31 Mar 2008 10:49:34 +0200 Subject: POST: preparations for moving CONFIG_POST to Makefiles Remove CONFIG_POST ifdefs from the post/ source files. Signed-off-by: Yuri Tikhonov Signed-off-by: Wolfgang Denk --- post/drivers/i2c.c | 3 --- post/drivers/memory.c | 3 --- post/drivers/rtc.c | 3 --- 3 files changed, 9 deletions(-) (limited to 'post/drivers') diff --git a/post/drivers/i2c.c b/post/drivers/i2c.c index 1b2e64471b..f54fe9970a 100644 --- a/post/drivers/i2c.c +++ b/post/drivers/i2c.c @@ -23,8 +23,6 @@ #include -#ifdef CONFIG_POST - /* * I2C test * @@ -91,4 +89,3 @@ int i2c_post_test (int flags) } #endif /* CONFIG_POST & CFG_POST_I2C */ -#endif /* CONFIG_POST */ diff --git a/post/drivers/memory.c b/post/drivers/memory.c index fb969856bc..e94d92c08b 100644 --- a/post/drivers/memory.c +++ b/post/drivers/memory.c @@ -150,8 +150,6 @@ * the whole RAM. */ -#ifdef CONFIG_POST - #include #include @@ -483,4 +481,3 @@ int memory_post_test (int flags) } #endif /* CONFIG_POST & CFG_POST_MEMORY */ -#endif /* CONFIG_POST */ diff --git a/post/drivers/rtc.c b/post/drivers/rtc.c index 7d4f9b88ee..4afe8e67e7 100644 --- a/post/drivers/rtc.c +++ b/post/drivers/rtc.c @@ -38,8 +38,6 @@ * nonleap-years. */ -#ifdef CONFIG_POST - #include #include @@ -180,4 +178,3 @@ int rtc_post_test (int flags) } #endif /* CONFIG_POST & CFG_POST_RTC */ -#endif /* CONFIG_POST */ -- cgit v1.2.1 From 2d2b994a30bb100774dc747ae9865b7f95285a88 Mon Sep 17 00:00:00 2001 From: Yuri Tikhonov Date: Mon, 31 Mar 2008 10:51:37 +0200 Subject: POST: move CONFIG_POST to Makefiles Introduce the new logical option CONFIG_HAS_POST which is set when the platform has CONFIG_POST set. Use CONFIG_HAS_POST in the post/ Makefiles to determine should the POST libs be compiled for the selected target platform, or not. To avoid breaking u-boot linking process, the empty post/libpost.a file is created for platforms which do not have POSTs. Signed-off-by: Yuri Tikhonov Signed-off-by: Wolfgang Denk --- post/drivers/Makefile | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'post/drivers') diff --git a/post/drivers/Makefile b/post/drivers/Makefile index cb2f1deacd..0b6cdf58c9 100644 --- a/post/drivers/Makefile +++ b/post/drivers/Makefile @@ -20,12 +20,10 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, # MA 02111-1307 USA # - - -SUBDIRS = +include $(TOPDIR)/config.mk LIB = libpostdrivers.a -COBJS = i2c.o memory.o rtc.o +COBJS-$(CONFIG_HAS_POST) += i2c.o memory.o rtc.o include $(TOPDIR)/post/rules.mk -- cgit v1.2.1