summaryrefslogtreecommitdiff
path: root/post/lib_ppc
diff options
context:
space:
mode:
Diffstat (limited to 'post/lib_ppc')
-rw-r--r--post/lib_ppc/Makefile11
-rw-r--r--post/lib_ppc/andi.c3
-rw-r--r--post/lib_ppc/asm.S3
-rw-r--r--post/lib_ppc/b.c3
-rw-r--r--post/lib_ppc/cmp.c3
-rw-r--r--post/lib_ppc/cmpi.c3
-rw-r--r--post/lib_ppc/complex.c3
-rw-r--r--post/lib_ppc/cpu.c3
-rw-r--r--post/lib_ppc/cr.c3
-rw-r--r--post/lib_ppc/fpu/20001122-1.c3
-rw-r--r--post/lib_ppc/fpu/20010114-2.c3
-rw-r--r--post/lib_ppc/fpu/20010226-1.c3
-rw-r--r--post/lib_ppc/fpu/980619-1.c3
-rw-r--r--post/lib_ppc/fpu/Makefile6
-rw-r--r--post/lib_ppc/fpu/acc1.c3
-rw-r--r--post/lib_ppc/fpu/compare-fp-1.c3
-rw-r--r--post/lib_ppc/fpu/fpu.c3
-rw-r--r--post/lib_ppc/fpu/mul-subnormal-single-1.c3
-rw-r--r--post/lib_ppc/load.c3
-rw-r--r--post/lib_ppc/multi.c3
-rw-r--r--post/lib_ppc/rlwimi.c3
-rw-r--r--post/lib_ppc/rlwinm.c3
-rw-r--r--post/lib_ppc/rlwnm.c3
-rw-r--r--post/lib_ppc/srawi.c3
-rw-r--r--post/lib_ppc/store.c3
-rw-r--r--post/lib_ppc/string.c3
-rw-r--r--post/lib_ppc/three.c3
-rw-r--r--post/lib_ppc/threei.c3
-rw-r--r--post/lib_ppc/threex.c3
-rw-r--r--post/lib_ppc/two.c3
-rw-r--r--post/lib_ppc/twox.c3
31 files changed, 8 insertions, 96 deletions
diff --git a/post/lib_ppc/Makefile b/post/lib_ppc/Makefile
index 9f1b329d7..bd7a23299 100644
--- a/post/lib_ppc/Makefile
+++ b/post/lib_ppc/Makefile
@@ -20,14 +20,13 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
# MA 02111-1307 USA
#
-
-SUBDIRS = fpu
+include $(TOPDIR)/config.mk
LIB = libpostppc.a
-AOBJS = asm.o
-COBJS = cpu.o cmp.o cmpi.o two.o twox.o three.o threex.o
-COBJS += threei.o andi.o srawi.o rlwnm.o rlwinm.o rlwimi.o
-COBJS += store.o load.o cr.o b.o multi.o string.o complex.o
+AOBJS-$(CONFIG_HAS_POST) += asm.o
+COBJS-$(CONFIG_HAS_POST) += cpu.o cmp.o cmpi.o two.o twox.o three.o threex.o
+COBJS-$(CONFIG_HAS_POST) += threei.o andi.o srawi.o rlwnm.o rlwinm.o rlwimi.o
+COBJS-$(CONFIG_HAS_POST) += store.o load.o cr.o b.o multi.o string.o complex.o
include $(TOPDIR)/post/rules.mk
diff --git a/post/lib_ppc/andi.c b/post/lib_ppc/andi.c
index 7ddf2ab2f..e3315bf15 100644
--- a/post/lib_ppc/andi.c
+++ b/post/lib_ppc/andi.c
@@ -32,8 +32,6 @@
* different sets of operand registers and result registers.
*/
-#ifdef CONFIG_POST
-
#include <post.h>
#include "cpu_asm.h"
@@ -120,4 +118,3 @@ int cpu_post_test_andi (void)
}
#endif
-#endif
diff --git a/post/lib_ppc/asm.S b/post/lib_ppc/asm.S
index 12791762b..6220ed2bb 100644
--- a/post/lib_ppc/asm.S
+++ b/post/lib_ppc/asm.S
@@ -22,8 +22,6 @@
#include <config.h>
-#ifdef CONFIG_POST
-
#include <post.h>
#include <ppc_asm.tmpl>
#include <ppc_defs.h>
@@ -358,4 +356,3 @@ cpu_post_complex_2_loop:
blr
#endif
-#endif
diff --git a/post/lib_ppc/b.c b/post/lib_ppc/b.c
index 6e276c48d..45b9ff26e 100644
--- a/post/lib_ppc/b.c
+++ b/post/lib_ppc/b.c
@@ -37,8 +37,6 @@
* linked in U-Boot at build time.
*/
-#ifdef CONFIG_POST
-
#include <post.h>
#include "cpu_asm.h"
@@ -194,4 +192,3 @@ int cpu_post_test_b (void)
}
#endif
-#endif
diff --git a/post/lib_ppc/cmp.c b/post/lib_ppc/cmp.c
index 789a24cb7..89f754a0b 100644
--- a/post/lib_ppc/cmp.c
+++ b/post/lib_ppc/cmp.c
@@ -36,8 +36,6 @@
* the result in and the expected result.
*/
-#ifdef CONFIG_POST
-
#include <post.h>
#include "cpu_asm.h"
@@ -130,4 +128,3 @@ int cpu_post_test_cmp (void)
}
#endif
-#endif
diff --git a/post/lib_ppc/cmpi.c b/post/lib_ppc/cmpi.c
index e0c2aaff8..0afdd7115 100644
--- a/post/lib_ppc/cmpi.c
+++ b/post/lib_ppc/cmpi.c
@@ -36,8 +36,6 @@
* the result in and the expected result.
*/
-#ifdef CONFIG_POST
-
#include <post.h>
#include "cpu_asm.h"
@@ -130,4 +128,3 @@ int cpu_post_test_cmpi (void)
}
#endif
-#endif
diff --git a/post/lib_ppc/complex.c b/post/lib_ppc/complex.c
index 033584bec..271392a0e 100644
--- a/post/lib_ppc/complex.c
+++ b/post/lib_ppc/complex.c
@@ -31,8 +31,6 @@
* calculations, but probably under different timing conditions, etc.
*/
-#ifdef CONFIG_POST
-
#include <post.h>
#include "cpu_asm.h"
@@ -123,4 +121,3 @@ int cpu_post_test_complex (void)
}
#endif
-#endif
diff --git a/post/lib_ppc/cpu.c b/post/lib_ppc/cpu.c
index 4ab6d2dc0..5c7f76191 100644
--- a/post/lib_ppc/cpu.c
+++ b/post/lib_ppc/cpu.c
@@ -32,8 +32,6 @@
* For more details refer to post/cpu/ *.c files.
*/
-#ifdef CONFIG_POST
-
#include <watchdog.h>
#include <post.h>
#include <asm/mmu.h>
@@ -147,4 +145,3 @@ int cpu_post_test (int flags)
}
#endif /* CONFIG_POST & CFG_POST_CPU */
-#endif /* CONFIG_POST */
diff --git a/post/lib_ppc/cr.c b/post/lib_ppc/cr.c
index da6ef3745..0bd9e748f 100644
--- a/post/lib_ppc/cr.c
+++ b/post/lib_ppc/cr.c
@@ -46,8 +46,6 @@
* expected one.
*/
-#ifdef CONFIG_POST
-
#include <post.h>
#include "cpu_asm.h"
@@ -353,4 +351,3 @@ int cpu_post_test_cr (void)
}
#endif
-#endif
diff --git a/post/lib_ppc/fpu/20001122-1.c b/post/lib_ppc/fpu/20001122-1.c
index f689b8232..dece61483 100644
--- a/post/lib_ppc/fpu/20001122-1.c
+++ b/post/lib_ppc/fpu/20001122-1.c
@@ -26,8 +26,6 @@
#include <common.h>
-#ifdef CONFIG_POST
-
#include <post.h>
#if CONFIG_POST & CFG_POST_FPU
@@ -59,4 +57,3 @@ int fpu_post_test_math1 (void)
}
#endif /* CONFIG_POST & CFG_POST_FPU */
-#endif /* CONFIG_POST */
diff --git a/post/lib_ppc/fpu/20010114-2.c b/post/lib_ppc/fpu/20010114-2.c
index 6e60507f9..8a172174c 100644
--- a/post/lib_ppc/fpu/20010114-2.c
+++ b/post/lib_ppc/fpu/20010114-2.c
@@ -26,8 +26,6 @@
#include <common.h>
-#ifdef CONFIG_POST
-
#include <post.h>
#if CONFIG_POST & CFG_POST_FPU
@@ -63,4 +61,3 @@ int fpu_post_test_math2 (void)
}
#endif /* CONFIG_POST & CFG_POST_FPU */
-#endif /* CONFIG_POST */
diff --git a/post/lib_ppc/fpu/20010226-1.c b/post/lib_ppc/fpu/20010226-1.c
index b2c47e365..f366252e6 100644
--- a/post/lib_ppc/fpu/20010226-1.c
+++ b/post/lib_ppc/fpu/20010226-1.c
@@ -26,8 +26,6 @@
#include <common.h>
-#ifdef CONFIG_POST
-
#include <post.h>
#if CONFIG_POST & CFG_POST_FPU
@@ -51,4 +49,3 @@ int fpu_post_test_math3 (void)
}
#endif /* CONFIG_POST & CFG_POST_FPU */
-#endif /* CONFIG_POST */
diff --git a/post/lib_ppc/fpu/980619-1.c b/post/lib_ppc/fpu/980619-1.c
index 990aa0c98..7f26482a5 100644
--- a/post/lib_ppc/fpu/980619-1.c
+++ b/post/lib_ppc/fpu/980619-1.c
@@ -26,8 +26,6 @@
#include <common.h>
-#ifdef CONFIG_POST
-
#include <post.h>
#if CONFIG_POST & CFG_POST_FPU
@@ -57,4 +55,3 @@ int fpu_post_test_math4 (void)
}
#endif /* CONFIG_POST & CFG_POST_FPU */
-#endif /* CONFIG_POST */
diff --git a/post/lib_ppc/fpu/Makefile b/post/lib_ppc/fpu/Makefile
index 82646c80d..db435931d 100644
--- a/post/lib_ppc/fpu/Makefile
+++ b/post/lib_ppc/fpu/Makefile
@@ -20,12 +20,12 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
# MA 02111-1307 USA
#
-
+include $(TOPDIR)/config.mk
LIB = libpostppcfpu.a
-COBJS += fpu.o 20001122-1.o 20010114-2.o 20010226-1.o 980619-1.o
-COBJS += acc1.o compare-fp-1.o mul-subnormal-single-1.o
+COBJS-$(CONFIG_HAS_POST) += fpu.o 20001122-1.o 20010114-2.o 20010226-1.o 980619-1.o
+COBJS-$(CONFIG_HAS_POST) += acc1.o compare-fp-1.o mul-subnormal-single-1.o
include $(TOPDIR)/post/rules.mk
diff --git a/post/lib_ppc/fpu/acc1.c b/post/lib_ppc/fpu/acc1.c
index 4cecbf6a4..921282e8b 100644
--- a/post/lib_ppc/fpu/acc1.c
+++ b/post/lib_ppc/fpu/acc1.c
@@ -26,8 +26,6 @@
#include <common.h>
-#ifdef CONFIG_POST
-
#include <post.h>
#if CONFIG_POST & CFG_POST_FPU
@@ -54,4 +52,3 @@ int fpu_post_test_math5 (void)
}
#endif /* CONFIG_POST & CFG_POST_FPU */
-#endif /* CONFIG_POST */
diff --git a/post/lib_ppc/fpu/compare-fp-1.c b/post/lib_ppc/fpu/compare-fp-1.c
index d866ad5a3..be8f6208a 100644
--- a/post/lib_ppc/fpu/compare-fp-1.c
+++ b/post/lib_ppc/fpu/compare-fp-1.c
@@ -28,8 +28,6 @@
#include <common.h>
-#ifdef CONFIG_POST
-
#include <post.h>
#if CONFIG_POST & CFG_POST_FPU
@@ -222,4 +220,3 @@ int fpu_post_test_math6 (void)
}
#endif /* CONFIG_POST & CFG_POST_FPU */
-#endif /* CONFIG_POST */
diff --git a/post/lib_ppc/fpu/fpu.c b/post/lib_ppc/fpu/fpu.c
index 07dcba8cc..9ddb67a21 100644
--- a/post/lib_ppc/fpu/fpu.c
+++ b/post/lib_ppc/fpu/fpu.c
@@ -34,8 +34,6 @@
* For more details refer to post/cpu/ *.c files.
*/
-#ifdef CONFIG_POST
-
#include <post.h>
#if CONFIG_POST & CFG_POST_FPU
@@ -89,4 +87,3 @@ int fpu_post_test (int flags)
}
#endif /* CONFIG_POST & CFG_POST_FPU */
-#endif /* CONFIG_POST */
diff --git a/post/lib_ppc/fpu/mul-subnormal-single-1.c b/post/lib_ppc/fpu/mul-subnormal-single-1.c
index 67f48da33..7e6fe87b0 100644
--- a/post/lib_ppc/fpu/mul-subnormal-single-1.c
+++ b/post/lib_ppc/fpu/mul-subnormal-single-1.c
@@ -28,8 +28,6 @@
#include <common.h>
-#ifdef CONFIG_POST
-
#include <post.h>
#if CONFIG_POST & CFG_POST_FPU
@@ -100,4 +98,3 @@ int fpu_post_test_math7 (void)
}
#endif /* CONFIG_POST & CFG_POST_FPU */
-#endif /* CONFIG_POST */
diff --git a/post/lib_ppc/load.c b/post/lib_ppc/load.c
index 393c56830..86bc2234c 100644
--- a/post/lib_ppc/load.c
+++ b/post/lib_ppc/load.c
@@ -41,8 +41,6 @@
* register (it must change for "load with update" instructions).
*/
-#ifdef CONFIG_POST
-
#include <post.h>
#include "cpu_asm.h"
@@ -252,4 +250,3 @@ int cpu_post_test_load (void)
}
#endif
-#endif
diff --git a/post/lib_ppc/multi.c b/post/lib_ppc/multi.c
index 872438478..5d3f58428 100644
--- a/post/lib_ppc/multi.c
+++ b/post/lib_ppc/multi.c
@@ -33,8 +33,6 @@
* of the source and target buffers are then compared.
*/
-#ifdef CONFIG_POST
-
#include <post.h>
#include "cpu_asm.h"
@@ -78,4 +76,3 @@ int cpu_post_test_multi (void)
}
#endif
-#endif
diff --git a/post/lib_ppc/rlwimi.c b/post/lib_ppc/rlwimi.c
index f65f79a8e..1d8e61ec1 100644
--- a/post/lib_ppc/rlwimi.c
+++ b/post/lib_ppc/rlwimi.c
@@ -32,8 +32,6 @@
* different sets of operand registers and result registers.
*/
-#ifdef CONFIG_POST
-
#include <post.h>
#include "cpu_asm.h"
@@ -159,4 +157,3 @@ int cpu_post_test_rlwimi (void)
}
#endif
-#endif
diff --git a/post/lib_ppc/rlwinm.c b/post/lib_ppc/rlwinm.c
index e240c41b1..113e79d00 100644
--- a/post/lib_ppc/rlwinm.c
+++ b/post/lib_ppc/rlwinm.c
@@ -32,8 +32,6 @@
* different sets of operand registers and result registers.
*/
-#ifdef CONFIG_POST
-
#include <post.h>
#include "cpu_asm.h"
@@ -152,4 +150,3 @@ int cpu_post_test_rlwinm (void)
}
#endif
-#endif
diff --git a/post/lib_ppc/rlwnm.c b/post/lib_ppc/rlwnm.c
index 523cf4da5..a6684bf60 100644
--- a/post/lib_ppc/rlwnm.c
+++ b/post/lib_ppc/rlwnm.c
@@ -32,8 +32,6 @@
* different sets of operand registers and result registers.
*/
-#ifdef CONFIG_POST
-
#include <post.h>
#include "cpu_asm.h"
@@ -162,4 +160,3 @@ int cpu_post_test_rlwnm (void)
}
#endif
-#endif
diff --git a/post/lib_ppc/srawi.c b/post/lib_ppc/srawi.c
index 91c82c915..8c70007c5 100644
--- a/post/lib_ppc/srawi.c
+++ b/post/lib_ppc/srawi.c
@@ -32,8 +32,6 @@
* different sets of operand registers and result registers.
*/
-#ifdef CONFIG_POST
-
#include <post.h>
#include "cpu_asm.h"
@@ -153,4 +151,3 @@ int cpu_post_test_srawi (void)
}
#endif
-#endif
diff --git a/post/lib_ppc/store.c b/post/lib_ppc/store.c
index f495bf2aa..09ec48554 100644
--- a/post/lib_ppc/store.c
+++ b/post/lib_ppc/store.c
@@ -41,8 +41,6 @@
* with update" instructions).
*/
-#ifdef CONFIG_POST
-
#include <post.h>
#include "cpu_asm.h"
@@ -232,4 +230,3 @@ int cpu_post_test_store (void)
}
#endif
-#endif
diff --git a/post/lib_ppc/string.c b/post/lib_ppc/string.c
index bd83bd136..b2daa8804 100644
--- a/post/lib_ppc/string.c
+++ b/post/lib_ppc/string.c
@@ -33,8 +33,6 @@
* of the source and target buffers are then compared.
*/
-#ifdef CONFIG_POST
-
#include <post.h>
#include "cpu_asm.h"
@@ -103,4 +101,3 @@ int cpu_post_test_string (void)
}
#endif
-#endif
diff --git a/post/lib_ppc/three.c b/post/lib_ppc/three.c
index c2d747604..a7f1a866f 100644
--- a/post/lib_ppc/three.c
+++ b/post/lib_ppc/three.c
@@ -35,8 +35,6 @@
* different sets of operand registers and result registers.
*/
-#ifdef CONFIG_POST
-
#include <post.h>
#include "cpu_asm.h"
@@ -256,4 +254,3 @@ int cpu_post_test_three (void)
}
#endif
-#endif
diff --git a/post/lib_ppc/threei.c b/post/lib_ppc/threei.c
index 79f01789c..bbb4f50b7 100644
--- a/post/lib_ppc/threei.c
+++ b/post/lib_ppc/threei.c
@@ -34,8 +34,6 @@
* different sets of operand registers and result registers.
*/
-#ifdef CONFIG_POST
-
#include <post.h>
#include "cpu_asm.h"
@@ -134,4 +132,3 @@ int cpu_post_test_threei (void)
}
#endif
-#endif
diff --git a/post/lib_ppc/threex.c b/post/lib_ppc/threex.c
index 2c7206384..6aac93789 100644
--- a/post/lib_ppc/threex.c
+++ b/post/lib_ppc/threex.c
@@ -35,8 +35,6 @@
* different sets of operand registers and result registers.
*/
-#ifdef CONFIG_POST
-
#include <post.h>
#include "cpu_asm.h"
@@ -226,4 +224,3 @@ int cpu_post_test_threex (void)
}
#endif
-#endif
diff --git a/post/lib_ppc/two.c b/post/lib_ppc/two.c
index cfbac5e62..3d6b3c016 100644
--- a/post/lib_ppc/two.c
+++ b/post/lib_ppc/two.c
@@ -35,8 +35,6 @@
* different sets of operand registers and result registers.
*/
-#ifdef CONFIG_POST
-
#include <post.h>
#include "cpu_asm.h"
@@ -173,4 +171,3 @@ int cpu_post_test_two (void)
}
#endif
-#endif
diff --git a/post/lib_ppc/twox.c b/post/lib_ppc/twox.c
index 48d9954ca..7417a3680 100644
--- a/post/lib_ppc/twox.c
+++ b/post/lib_ppc/twox.c
@@ -35,8 +35,6 @@
* different sets of operand registers and result registers.
*/
-#ifdef CONFIG_POST
-
#include <post.h>
#include "cpu_asm.h"
@@ -173,4 +171,3 @@ int cpu_post_test_twox (void)
}
#endif
-#endif