post: Migrate to Kconfig

We move the existing CONFIG_POST_* functionality over to CFG_POST and
then introduce CONFIG_POST to Kconfig.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
diff --git a/post/lib_powerpc/andi.c b/post/lib_powerpc/andi.c
index d4f60aa..d69d613 100644
--- a/post/lib_powerpc/andi.c
+++ b/post/lib_powerpc/andi.c
@@ -19,7 +19,7 @@
 #include <post.h>
 #include "cpu_asm.h"
 
-#if CONFIG_POST & CONFIG_SYS_POST_CPU
+#if CFG_POST & CONFIG_SYS_POST_CPU
 
 extern void cpu_post_exec_21 (ulong *code, ulong *cr, ulong *res, ulong op);
 extern ulong cpu_post_makecr (long v);
diff --git a/post/lib_powerpc/asm.S b/post/lib_powerpc/asm.S
index 91b5999..13302d7 100644
--- a/post/lib_powerpc/asm.S
+++ b/post/lib_powerpc/asm.S
@@ -10,7 +10,7 @@
 #include <ppc_defs.h>
 #include <asm/cache.h>
 
-#if CONFIG_POST & CONFIG_SYS_POST_CPU
+#if CFG_POST & CONFIG_SYS_POST_CPU
 
 /* void cpu_post_exec_02 (ulong *code, ulong op1, ulong op2); */
 	.global	cpu_post_exec_02
diff --git a/post/lib_powerpc/b.c b/post/lib_powerpc/b.c
index 0b02e91..eb9371f 100644
--- a/post/lib_powerpc/b.c
+++ b/post/lib_powerpc/b.c
@@ -24,7 +24,7 @@
 #include <post.h>
 #include "cpu_asm.h"
 
-#if CONFIG_POST & CONFIG_SYS_POST_CPU
+#if CFG_POST & CONFIG_SYS_POST_CPU
 
 extern void cpu_post_exec_11 (ulong *code, ulong *res, ulong op1);
 extern void cpu_post_exec_31 (ulong *code, ulong *ctr, ulong *lr, ulong *jump,
diff --git a/post/lib_powerpc/cmp.c b/post/lib_powerpc/cmp.c
index e708697..e4d0931 100644
--- a/post/lib_powerpc/cmp.c
+++ b/post/lib_powerpc/cmp.c
@@ -23,7 +23,7 @@
 #include <post.h>
 #include "cpu_asm.h"
 
-#if CONFIG_POST & CONFIG_SYS_POST_CPU
+#if CFG_POST & CONFIG_SYS_POST_CPU
 
 extern void cpu_post_exec_12 (ulong *code, ulong *res, ulong op1, ulong op2);
 
diff --git a/post/lib_powerpc/cmpi.c b/post/lib_powerpc/cmpi.c
index 85a9b0a..983892d 100644
--- a/post/lib_powerpc/cmpi.c
+++ b/post/lib_powerpc/cmpi.c
@@ -23,7 +23,7 @@
 #include <post.h>
 #include "cpu_asm.h"
 
-#if CONFIG_POST & CONFIG_SYS_POST_CPU
+#if CFG_POST & CONFIG_SYS_POST_CPU
 
 extern void cpu_post_exec_11 (ulong *code, ulong *res, ulong op1);
 
diff --git a/post/lib_powerpc/complex.c b/post/lib_powerpc/complex.c
index bb29e91..d2ec21b 100644
--- a/post/lib_powerpc/complex.c
+++ b/post/lib_powerpc/complex.c
@@ -18,7 +18,7 @@
 #include <post.h>
 #include "cpu_asm.h"
 
-#if CONFIG_POST & CONFIG_SYS_POST_CPU
+#if CFG_POST & CONFIG_SYS_POST_CPU
 
 extern int cpu_post_complex_1_asm (int a1, int a2, int a3, int a4, int n);
 extern int cpu_post_complex_2_asm (int x, int n);
diff --git a/post/lib_powerpc/cpu.c b/post/lib_powerpc/cpu.c
index 1d47107..77c2538 100644
--- a/post/lib_powerpc/cpu.c
+++ b/post/lib_powerpc/cpu.c
@@ -20,7 +20,7 @@
 #include <post.h>
 #include <asm/mmu.h>
 
-#if CONFIG_POST & CONFIG_SYS_POST_CPU
+#if CFG_POST & CONFIG_SYS_POST_CPU
 
 extern int cpu_post_test_cmp (void);
 extern int cpu_post_test_cmpi (void);
@@ -118,4 +118,4 @@
 	return ret;
 }
 
-#endif /* CONFIG_POST & CONFIG_SYS_POST_CPU */
+#endif /* CFG_POST & CONFIG_SYS_POST_CPU */
diff --git a/post/lib_powerpc/cr.c b/post/lib_powerpc/cr.c
index 56ed355..077fb0f 100644
--- a/post/lib_powerpc/cr.c
+++ b/post/lib_powerpc/cr.c
@@ -33,7 +33,7 @@
 #include <post.h>
 #include "cpu_asm.h"
 
-#if CONFIG_POST & CONFIG_SYS_POST_CPU
+#if CFG_POST & CONFIG_SYS_POST_CPU
 
 extern void cpu_post_exec_11 (ulong *code, ulong *res, ulong op1);
 extern void cpu_post_exec_21x (ulong *code, ulong *op1, ulong *op2, ulong op3);
diff --git a/post/lib_powerpc/fpu/20001122-1.c b/post/lib_powerpc/fpu/20001122-1.c
index 4b452dc..eddd3f9 100644
--- a/post/lib_powerpc/fpu/20001122-1.c
+++ b/post/lib_powerpc/fpu/20001122-1.c
@@ -13,7 +13,7 @@
 
 GNU_FPOST_ATTR
 
-#if CONFIG_POST & CONFIG_SYS_POST_FPU
+#if CFG_POST & CONFIG_SYS_POST_FPU
 
 int fpu_post_test_math1 (void)
 {
@@ -40,4 +40,4 @@
 	return 0;
 }
 
-#endif /* CONFIG_POST & CONFIG_SYS_POST_FPU */
+#endif /* CFG_POST & CONFIG_SYS_POST_FPU */
diff --git a/post/lib_powerpc/fpu/20010114-2.c b/post/lib_powerpc/fpu/20010114-2.c
index 4aadd1e..9e3e546 100644
--- a/post/lib_powerpc/fpu/20010114-2.c
+++ b/post/lib_powerpc/fpu/20010114-2.c
@@ -13,7 +13,7 @@
 
 GNU_FPOST_ATTR
 
-#if CONFIG_POST & CONFIG_SYS_POST_FPU
+#if CFG_POST & CONFIG_SYS_POST_FPU
 
 static float rintf (float x)
 {
@@ -45,4 +45,4 @@
 	return 0;
 }
 
-#endif /* CONFIG_POST & CONFIG_SYS_POST_FPU */
+#endif /* CFG_POST & CONFIG_SYS_POST_FPU */
diff --git a/post/lib_powerpc/fpu/20010226-1.c b/post/lib_powerpc/fpu/20010226-1.c
index b09a25c..5bb3860 100644
--- a/post/lib_powerpc/fpu/20010226-1.c
+++ b/post/lib_powerpc/fpu/20010226-1.c
@@ -13,7 +13,7 @@
 
 GNU_FPOST_ATTR
 
-#if CONFIG_POST & CONFIG_SYS_POST_FPU
+#if CFG_POST & CONFIG_SYS_POST_FPU
 
 int fpu_post_test_math3 (void)
 {
@@ -33,4 +33,4 @@
 	return 0;
 }
 
-#endif /* CONFIG_POST & CONFIG_SYS_POST_FPU */
+#endif /* CFG_POST & CONFIG_SYS_POST_FPU */
diff --git a/post/lib_powerpc/fpu/980619-1.c b/post/lib_powerpc/fpu/980619-1.c
index 2fea708..415cd50 100644
--- a/post/lib_powerpc/fpu/980619-1.c
+++ b/post/lib_powerpc/fpu/980619-1.c
@@ -13,7 +13,7 @@
 
 GNU_FPOST_ATTR
 
-#if CONFIG_POST & CONFIG_SYS_POST_FPU
+#if CFG_POST & CONFIG_SYS_POST_FPU
 
 int fpu_post_test_math4 (void)
 {
@@ -39,4 +39,4 @@
 	return 0;
 }
 
-#endif /* CONFIG_POST & CONFIG_SYS_POST_FPU */
+#endif /* CFG_POST & CONFIG_SYS_POST_FPU */
diff --git a/post/lib_powerpc/fpu/acc1.c b/post/lib_powerpc/fpu/acc1.c
index 9e5783b..4cf3b7c 100644
--- a/post/lib_powerpc/fpu/acc1.c
+++ b/post/lib_powerpc/fpu/acc1.c
@@ -13,7 +13,7 @@
 
 GNU_FPOST_ATTR
 
-#if CONFIG_POST & CONFIG_SYS_POST_FPU
+#if CFG_POST & CONFIG_SYS_POST_FPU
 
 static double func (const double *array)
 {
@@ -36,4 +36,4 @@
 	return 0;
 }
 
-#endif /* CONFIG_POST & CONFIG_SYS_POST_FPU */
+#endif /* CFG_POST & CONFIG_SYS_POST_FPU */
diff --git a/post/lib_powerpc/fpu/compare-fp-1.c b/post/lib_powerpc/fpu/compare-fp-1.c
index d46a13a..029600f 100644
--- a/post/lib_powerpc/fpu/compare-fp-1.c
+++ b/post/lib_powerpc/fpu/compare-fp-1.c
@@ -15,7 +15,7 @@
 
 GNU_FPOST_ATTR
 
-#if CONFIG_POST & CONFIG_SYS_POST_FPU
+#if CFG_POST & CONFIG_SYS_POST_FPU
 
 static int failed;
 
@@ -204,4 +204,4 @@
 	return 0;
 }
 
-#endif /* CONFIG_POST & CONFIG_SYS_POST_FPU */
+#endif /* CFG_POST & CONFIG_SYS_POST_FPU */
diff --git a/post/lib_powerpc/fpu/fpu.c b/post/lib_powerpc/fpu/fpu.c
index bd65f62..8993b36 100644
--- a/post/lib_powerpc/fpu/fpu.c
+++ b/post/lib_powerpc/fpu/fpu.c
@@ -21,7 +21,7 @@
 
 GNU_FPOST_ATTR
 
-#if CONFIG_POST & CONFIG_SYS_POST_FPU
+#if CFG_POST & CONFIG_SYS_POST_FPU
 
 #include <watchdog.h>
 
@@ -71,4 +71,4 @@
 	return ret;
 }
 
-#endif /* CONFIG_POST & CONFIG_SYS_POST_FPU */
+#endif /* CFG_POST & CONFIG_SYS_POST_FPU */
diff --git a/post/lib_powerpc/fpu/mul-subnormal-single-1.c b/post/lib_powerpc/fpu/mul-subnormal-single-1.c
index cb61c91..87b882c6 100644
--- a/post/lib_powerpc/fpu/mul-subnormal-single-1.c
+++ b/post/lib_powerpc/fpu/mul-subnormal-single-1.c
@@ -15,7 +15,7 @@
 
 GNU_FPOST_ATTR
 
-#if CONFIG_POST & CONFIG_SYS_POST_FPU
+#if CFG_POST & CONFIG_SYS_POST_FPU
 
 union uf
 {
@@ -82,4 +82,4 @@
 	return 0;
 }
 
-#endif /* CONFIG_POST & CONFIG_SYS_POST_FPU */
+#endif /* CFG_POST & CONFIG_SYS_POST_FPU */
diff --git a/post/lib_powerpc/load.c b/post/lib_powerpc/load.c
index 5269563..ece0b27 100644
--- a/post/lib_powerpc/load.c
+++ b/post/lib_powerpc/load.c
@@ -28,7 +28,7 @@
 #include <post.h>
 #include "cpu_asm.h"
 
-#if CONFIG_POST & CONFIG_SYS_POST_CPU
+#if CFG_POST & CONFIG_SYS_POST_CPU
 
 extern void cpu_post_exec_22w (ulong *code, ulong *op1, ulong op2, ulong *op3);
 extern void cpu_post_exec_21w (ulong *code, ulong *op1, ulong *op2);
diff --git a/post/lib_powerpc/multi.c b/post/lib_powerpc/multi.c
index f082e4c..0e9ee88 100644
--- a/post/lib_powerpc/multi.c
+++ b/post/lib_powerpc/multi.c
@@ -21,7 +21,7 @@
 #include <post.h>
 #include "cpu_asm.h"
 
-#if CONFIG_POST & CONFIG_SYS_POST_CPU
+#if CFG_POST & CONFIG_SYS_POST_CPU
 
 extern void cpu_post_exec_02(ulong *code, ulong op1, ulong op2);
 
diff --git a/post/lib_powerpc/rlwimi.c b/post/lib_powerpc/rlwimi.c
index 7b4dc79..d24a3f6 100644
--- a/post/lib_powerpc/rlwimi.c
+++ b/post/lib_powerpc/rlwimi.c
@@ -19,7 +19,7 @@
 #include <post.h>
 #include "cpu_asm.h"
 
-#if CONFIG_POST & CONFIG_SYS_POST_CPU
+#if CFG_POST & CONFIG_SYS_POST_CPU
 
 extern void cpu_post_exec_22 (ulong *code, ulong *cr, ulong *res, ulong op1,
     ulong op2);
diff --git a/post/lib_powerpc/rlwinm.c b/post/lib_powerpc/rlwinm.c
index 8a03e9b..9f4a3ed 100644
--- a/post/lib_powerpc/rlwinm.c
+++ b/post/lib_powerpc/rlwinm.c
@@ -19,7 +19,7 @@
 #include <post.h>
 #include "cpu_asm.h"
 
-#if CONFIG_POST & CONFIG_SYS_POST_CPU
+#if CFG_POST & CONFIG_SYS_POST_CPU
 
 extern void cpu_post_exec_21 (ulong *code, ulong *cr, ulong *res, ulong op1);
 extern ulong cpu_post_makecr (long v);
diff --git a/post/lib_powerpc/rlwnm.c b/post/lib_powerpc/rlwnm.c
index e2beb4e..224e6bd 100644
--- a/post/lib_powerpc/rlwnm.c
+++ b/post/lib_powerpc/rlwnm.c
@@ -19,7 +19,7 @@
 #include <post.h>
 #include "cpu_asm.h"
 
-#if CONFIG_POST & CONFIG_SYS_POST_CPU
+#if CFG_POST & CONFIG_SYS_POST_CPU
 
 extern void cpu_post_exec_22 (ulong *code, ulong *cr, ulong *res, ulong op1,
     ulong op2);
diff --git a/post/lib_powerpc/srawi.c b/post/lib_powerpc/srawi.c
index d4a8fab..713d4f2 100644
--- a/post/lib_powerpc/srawi.c
+++ b/post/lib_powerpc/srawi.c
@@ -19,7 +19,7 @@
 #include <post.h>
 #include "cpu_asm.h"
 
-#if CONFIG_POST & CONFIG_SYS_POST_CPU
+#if CFG_POST & CONFIG_SYS_POST_CPU
 
 extern void cpu_post_exec_21 (ulong *code, ulong *cr, ulong *res, ulong op);
 extern ulong cpu_post_makecr (long v);
diff --git a/post/lib_powerpc/store.c b/post/lib_powerpc/store.c
index 8e278fe..2dbcccf 100644
--- a/post/lib_powerpc/store.c
+++ b/post/lib_powerpc/store.c
@@ -28,7 +28,7 @@
 #include <post.h>
 #include "cpu_asm.h"
 
-#if CONFIG_POST & CONFIG_SYS_POST_CPU
+#if CFG_POST & CONFIG_SYS_POST_CPU
 
 extern void cpu_post_exec_12w (ulong *code, ulong *op1, ulong op2, ulong op3);
 extern void cpu_post_exec_11w (ulong *code, ulong *op1, ulong op2);
diff --git a/post/lib_powerpc/string.c b/post/lib_powerpc/string.c
index 0d8d280..9b54847 100644
--- a/post/lib_powerpc/string.c
+++ b/post/lib_powerpc/string.c
@@ -20,7 +20,7 @@
 #include <post.h>
 #include "cpu_asm.h"
 
-#if CONFIG_POST & CONFIG_SYS_POST_CPU
+#if CFG_POST & CONFIG_SYS_POST_CPU
 
 extern void cpu_post_exec_02 (ulong *code, ulong op1, ulong op2);
 extern void cpu_post_exec_04 (ulong *code, ulong op1, ulong op2, ulong op3,
diff --git a/post/lib_powerpc/three.c b/post/lib_powerpc/three.c
index fc6f1f5..55f0ff8 100644
--- a/post/lib_powerpc/three.c
+++ b/post/lib_powerpc/three.c
@@ -22,7 +22,7 @@
 #include <post.h>
 #include "cpu_asm.h"
 
-#if CONFIG_POST & CONFIG_SYS_POST_CPU
+#if CFG_POST & CONFIG_SYS_POST_CPU
 
 extern void cpu_post_exec_22 (ulong *code, ulong *cr, ulong *res, ulong op1,
     ulong op2);
diff --git a/post/lib_powerpc/threei.c b/post/lib_powerpc/threei.c
index f49c85e..ec52d23 100644
--- a/post/lib_powerpc/threei.c
+++ b/post/lib_powerpc/threei.c
@@ -21,7 +21,7 @@
 #include <post.h>
 #include "cpu_asm.h"
 
-#if CONFIG_POST & CONFIG_SYS_POST_CPU
+#if CFG_POST & CONFIG_SYS_POST_CPU
 
 extern void cpu_post_exec_21 (ulong *code, ulong *cr, ulong *res, ulong op);
 extern ulong cpu_post_makecr (long v);
diff --git a/post/lib_powerpc/threex.c b/post/lib_powerpc/threex.c
index 6bc5a54..6f5f0b8 100644
--- a/post/lib_powerpc/threex.c
+++ b/post/lib_powerpc/threex.c
@@ -22,7 +22,7 @@
 #include <post.h>
 #include "cpu_asm.h"
 
-#if CONFIG_POST & CONFIG_SYS_POST_CPU
+#if CFG_POST & CONFIG_SYS_POST_CPU
 
 extern void cpu_post_exec_22 (ulong *code, ulong *cr, ulong *res, ulong op1,
     ulong op2);
diff --git a/post/lib_powerpc/two.c b/post/lib_powerpc/two.c
index fa376c7..b44dd4e 100644
--- a/post/lib_powerpc/two.c
+++ b/post/lib_powerpc/two.c
@@ -22,7 +22,7 @@
 #include <post.h>
 #include "cpu_asm.h"
 
-#if CONFIG_POST & CONFIG_SYS_POST_CPU
+#if CFG_POST & CONFIG_SYS_POST_CPU
 
 extern void cpu_post_exec_21 (ulong *code, ulong *cr, ulong *res, ulong op1);
 extern ulong cpu_post_makecr (long v);
diff --git a/post/lib_powerpc/twox.c b/post/lib_powerpc/twox.c
index 5c36012..320cc0a 100644
--- a/post/lib_powerpc/twox.c
+++ b/post/lib_powerpc/twox.c
@@ -22,7 +22,7 @@
 #include <post.h>
 #include "cpu_asm.h"
 
-#if CONFIG_POST & CONFIG_SYS_POST_CPU
+#if CFG_POST & CONFIG_SYS_POST_CPU
 
 extern void cpu_post_exec_21 (ulong *code, ulong *cr, ulong *res, ulong op1);
 extern ulong cpu_post_makecr (long v);