summaryrefslogtreecommitdiff
path: root/post/cpu/ppc4xx
diff options
context:
space:
mode:
Diffstat (limited to 'post/cpu/ppc4xx')
-rw-r--r--post/cpu/ppc4xx/Makefile5
-rw-r--r--post/cpu/ppc4xx/cache.c3
-rw-r--r--post/cpu/ppc4xx/cache_4xx.S3
-rw-r--r--post/cpu/ppc4xx/denali_ecc.c4
-rw-r--r--post/cpu/ppc4xx/ether.c3
-rw-r--r--post/cpu/ppc4xx/fpu.c2
-rw-r--r--post/cpu/ppc4xx/spr.c3
-rw-r--r--post/cpu/ppc4xx/uart.c3
-rw-r--r--post/cpu/ppc4xx/watchdog.c3
9 files changed, 5 insertions, 24 deletions
diff --git a/post/cpu/ppc4xx/Makefile b/post/cpu/ppc4xx/Makefile
index e3f44b777..7b13413b9 100644
--- a/post/cpu/ppc4xx/Makefile
+++ b/post/cpu/ppc4xx/Makefile
@@ -20,10 +20,11 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
# MA 02111-1307 USA
#
+include $(TOPDIR)/include/autoconf.mk
LIB = libpostppc4xx.a
-AOBJS = cache_4xx.o
-COBJS = cache.o denali_ecc.o ether.o fpu.o spr.o uart.o watchdog.o
+AOBJS-$(CONFIG_HAS_POST) += cache_4xx.o
+COBJS-$(CONFIG_HAS_POST) += cache.o denali_ecc.o ether.o fpu.o spr.o uart.o watchdog.o
include $(TOPDIR)/post/rules.mk
diff --git a/post/cpu/ppc4xx/cache.c b/post/cpu/ppc4xx/cache.c
index 466ca926b..be6a2bf54 100644
--- a/post/cpu/ppc4xx/cache.c
+++ b/post/cpu/ppc4xx/cache.c
@@ -31,8 +31,6 @@
* several test scenarios.
*/
-#ifdef CONFIG_POST
-
#include <post.h>
#if CONFIG_POST & CFG_POST_CACHE
@@ -122,4 +120,3 @@ int cache_post_test (int flags)
}
#endif /* CONFIG_POST & CFG_POST_CACHE */
-#endif /* CONFIG_POST */
diff --git a/post/cpu/ppc4xx/cache_4xx.S b/post/cpu/ppc4xx/cache_4xx.S
index d5cb075d6..455ffa072 100644
--- a/post/cpu/ppc4xx/cache_4xx.S
+++ b/post/cpu/ppc4xx/cache_4xx.S
@@ -25,8 +25,6 @@
#include <config.h>
-#ifdef CONFIG_POST
-
#include <post.h>
#include <ppc_asm.tmpl>
#include <ppc_defs.h>
@@ -489,4 +487,3 @@ cache_post_test_inst:
blr
#endif /* CONFIG_POST & CFG_POST_CACHE */
-#endif /* CONFIG_POST */
diff --git a/post/cpu/ppc4xx/denali_ecc.c b/post/cpu/ppc4xx/denali_ecc.c
index 439f80d1f..12a1bbfa8 100644
--- a/post/cpu/ppc4xx/denali_ecc.c
+++ b/post/cpu/ppc4xx/denali_ecc.c
@@ -31,7 +31,7 @@
#include <common.h>
#include <watchdog.h>
-#if defined(CONFIG_POST) && (defined(CONFIG_440EPX) || defined(CONFIG_440GRX))
+#if defined(CONFIG_440EPX) || defined(CONFIG_440GRX)
#include <post.h>
@@ -268,4 +268,4 @@ int ecc_post_test(int flags)
return ret;
}
#endif /* CONFIG_POST & CFG_POST_ECC */
-#endif /* defined(CONFIG_POST) && ... */
+#endif /* defined(CONFIG_440EPX) || defined(CONFIG_440GRX) */
diff --git a/post/cpu/ppc4xx/ether.c b/post/cpu/ppc4xx/ether.c
index 4ac749134..ccbfcf91a 100644
--- a/post/cpu/ppc4xx/ether.c
+++ b/post/cpu/ppc4xx/ether.c
@@ -37,8 +37,6 @@
* TEST_NUM - number of tests
*/
-#ifdef CONFIG_POST
-
#include <post.h>
#if CONFIG_POST & CFG_POST_ETHER
@@ -430,4 +428,3 @@ out_free:
}
#endif /* CONFIG_POST & CFG_POST_ETHER */
-#endif /* CONFIG_POST */
diff --git a/post/cpu/ppc4xx/fpu.c b/post/cpu/ppc4xx/fpu.c
index 0c26fe00e..fff416997 100644
--- a/post/cpu/ppc4xx/fpu.c
+++ b/post/cpu/ppc4xx/fpu.c
@@ -25,7 +25,6 @@
#include <config.h>
-#ifdef CONFIG_POST
#if defined(CONFIG_440EP) || \
defined(CONFIG_440EPX)
@@ -56,4 +55,3 @@ void fpu_enable(void)
}
#endif
-#endif /* CONFIG_POST */
diff --git a/post/cpu/ppc4xx/spr.c b/post/cpu/ppc4xx/spr.c
index 37c95598f..6152eb21a 100644
--- a/post/cpu/ppc4xx/spr.c
+++ b/post/cpu/ppc4xx/spr.c
@@ -35,8 +35,6 @@
* corresponding table value.
*/
-#ifdef CONFIG_POST
-
#include <post.h>
#if CONFIG_POST & CFG_POST_SPR
@@ -199,4 +197,3 @@ int spr_post_test (int flags)
}
#endif /* CONFIG_POST & CFG_POST_SPR */
-#endif /* CONFIG_POST */
diff --git a/post/cpu/ppc4xx/uart.c b/post/cpu/ppc4xx/uart.c
index f47b48e9d..27cfb9159 100644
--- a/post/cpu/ppc4xx/uart.c
+++ b/post/cpu/ppc4xx/uart.c
@@ -32,8 +32,6 @@
* characters are transmitted.
*/
-#ifdef CONFIG_POST
-
#include <post.h>
#if CONFIG_POST & CFG_POST_UART
@@ -389,4 +387,3 @@ int uart_post_test (int flags)
}
#endif /* CONFIG_POST & CFG_POST_UART */
-#endif /* CONFIG_POST */
diff --git a/post/cpu/ppc4xx/watchdog.c b/post/cpu/ppc4xx/watchdog.c
index bd4f4c985..7fdecb485 100644
--- a/post/cpu/ppc4xx/watchdog.c
+++ b/post/cpu/ppc4xx/watchdog.c
@@ -35,8 +35,6 @@
* reboots, on the second iteration the test routine reports a success.
*/
-#ifdef CONFIG_POST
-
#include <post.h>
#if CONFIG_POST & CFG_POST_WATCHDOG
@@ -68,4 +66,3 @@ int watchdog_post_test (int flags)
}
#endif /* CONFIG_POST & CFG_POST_WATCHDOG */
-#endif /* CONFIG_POST */