]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
Merge branch 'master' of /home/wd/git/u-boot/lwmon5
authorWolfgang Denk <wd@denx.de>
Fri, 25 Apr 2008 09:32:01 +0000 (11:32 +0200)
committerWolfgang Denk <wd@denx.de>
Fri, 25 Apr 2008 09:32:01 +0000 (11:32 +0200)
Conflicts:

common/cmd_bootm.c
common/cmd_log.c
include/common.h
post/board/lwmon5/Makefile
post/board/lwmon5/dsp.c
post/board/lwmon5/dspic.c
post/board/lwmon5/fpga.c
post/board/lwmon5/gdc.c
post/board/lwmon5/sysmon.c
post/board/lwmon5/watchdog.c

Signed-off-by: Wolfgang Denk <wd@denx.de>
71 files changed:
Makefile
board/lwmon5/lwmon5.c
common/cmd_mem.c
include/asm-ppc/global_data.h
include/common.h
include/configs/lwmon5.h
post/Makefile
post/board/lwmon/sysmon.c
post/board/lwmon5/Makefile
post/board/lwmon5/dsp.c
post/board/lwmon5/dspic.c
post/board/lwmon5/fpga.c
post/board/lwmon5/gdc.c
post/board/lwmon5/sysmon.c
post/board/lwmon5/watchdog.c
post/board/netta/codec.c
post/board/netta/dsp.c
post/cpu/mpc8xx/cache.c
post/cpu/mpc8xx/cache_8xx.S
post/cpu/mpc8xx/ether.c
post/cpu/mpc8xx/spr.c
post/cpu/mpc8xx/uart.c
post/cpu/mpc8xx/usb.c
post/cpu/mpc8xx/watchdog.c
post/cpu/ppc4xx/Makefile
post/cpu/ppc4xx/cache.c
post/cpu/ppc4xx/cache_4xx.S
post/cpu/ppc4xx/denali_ecc.c
post/cpu/ppc4xx/ether.c
post/cpu/ppc4xx/fpu.c
post/cpu/ppc4xx/spr.c
post/cpu/ppc4xx/uart.c
post/cpu/ppc4xx/watchdog.c
post/drivers/Makefile
post/drivers/i2c.c
post/drivers/memory.c
post/drivers/rtc.c
post/lib_ppc/Makefile
post/lib_ppc/andi.c
post/lib_ppc/asm.S
post/lib_ppc/b.c
post/lib_ppc/cmp.c
post/lib_ppc/cmpi.c
post/lib_ppc/complex.c
post/lib_ppc/cpu.c
post/lib_ppc/cr.c
post/lib_ppc/fpu/20001122-1.c
post/lib_ppc/fpu/20010114-2.c
post/lib_ppc/fpu/20010226-1.c
post/lib_ppc/fpu/980619-1.c
post/lib_ppc/fpu/Makefile
post/lib_ppc/fpu/acc1.c
post/lib_ppc/fpu/compare-fp-1.c
post/lib_ppc/fpu/fpu.c
post/lib_ppc/fpu/mul-subnormal-single-1.c
post/lib_ppc/load.c
post/lib_ppc/multi.c
post/lib_ppc/rlwimi.c
post/lib_ppc/rlwinm.c
post/lib_ppc/rlwnm.c
post/lib_ppc/srawi.c
post/lib_ppc/store.c
post/lib_ppc/string.c
post/lib_ppc/three.c
post/lib_ppc/threei.c
post/lib_ppc/threex.c
post/lib_ppc/two.c
post/lib_ppc/twox.c
post/post.c
post/rules.mk
post/tests.c

index 6f1409fc1d8fa2c86474e86bab2a9ffed3aef249..86e44d04522691666ae078ac0a19a1475d044bc7 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -240,18 +240,10 @@ LIBS += drivers/rtc/librtc.a
 LIBS += drivers/serial/libserial.a
 LIBS += drivers/usb/libusb.a
 LIBS += drivers/video/libvideo.a
-LIBS += post/libpost.a post/drivers/libpostdrivers.a
-LIBS += $(shell if [ -d post/lib_$(ARCH) ]; then echo \
-       "post/lib_$(ARCH)/libpost$(ARCH).a"; fi)
-LIBS += $(shell if [ -d post/lib_$(ARCH)/fpu ]; then echo \
-       "post/lib_$(ARCH)/fpu/libpost$(ARCH)fpu.a"; fi)
-LIBS += $(shell if [ -d post/cpu/$(CPU) ]; then echo \
-       "post/cpu/$(CPU)/libpost$(CPU).a"; fi)
-LIBS += $(shell if [ -d post/board/$(BOARDDIR) ]; then echo \
-       "post/board/$(BOARDDIR)/libpost$(BOARD).a"; fi)
 LIBS += common/libcommon.a
 LIBS += libfdt/libfdt.a
 LIBS += api/libapi.a
+LIBS += post/libpost.a
 
 LIBS := $(addprefix $(obj),$(LIBS))
 .PHONY : $(LIBS) $(VERSION_FILE)
index e5fa25937b5e069eeff81cbdaa33471e99627e92..b63fbdc0cdd5e59e3a77ea832cd02fae9d91026b 100644 (file)
@@ -476,6 +476,24 @@ int is_pci_host(struct pci_controller *hose)
 void hw_watchdog_reset(void)
 {
        int val;
+#if defined(CONFIG_WD_MAX_RATE)
+       unsigned long long ct = get_ticks();
+
+       /*
+        * Don't allow watch-dog triggering more frequently than
+        * the predefined value CONFIG_WD_MAX_RATE [ticks].
+        */
+       if (ct >= gd->wdt_last) {
+               if ((ct - gd->wdt_last) < CONFIG_WD_MAX_RATE)
+                       return;
+       } else {
+               /* Time base counter had been reset */
+               if (((unsigned long long)(-1) - gd->wdt_last + ct) <
+                   CONFIG_WD_MAX_RATE)
+                       return;
+       }
+       gd->wdt_last = get_ticks();
+#endif
 
        /*
         * Toggle watchdog output
index d6d7a5b77f90d4bbd508aecbb1996d029953a2fe..51aa71fca84999b17fd451eb0607925732a22baa 100644 (file)
@@ -35,6 +35,7 @@
 #ifdef CONFIG_HAS_DATAFLASH
 #include <dataflash.h>
 #endif
+#include <watchdog.h>
 
 #if defined(CONFIG_CMD_MEMORY)         \
     || defined(CONFIG_CMD_I2C)         \
@@ -872,6 +873,7 @@ int do_mem_mtest (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
                    }
                }
                start[test_offset] = pattern;
+               WATCHDOG_RESET();
 
                /*
                 * Check for addr bits stuck low or shorted.
@@ -909,6 +911,7 @@ int do_mem_mtest (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
                 * Fill memory with a known pattern.
                 */
                for (pattern = 1, offset = 0; offset < num_words; pattern++, offset++) {
+                       WATCHDOG_RESET();
                        start[offset] = pattern;
                }
 
@@ -916,6 +919,7 @@ int do_mem_mtest (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
                 * Check each location and invert it for the second pass.
                 */
                for (pattern = 1, offset = 0; offset < num_words; pattern++, offset++) {
+                   WATCHDOG_RESET();
                    temp = start[offset];
                    if (temp != pattern) {
                        printf ("\nFAILURE (read/write) @ 0x%.8lx:"
@@ -932,6 +936,7 @@ int do_mem_mtest (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
                 * Check each location for the inverted pattern and zero it.
                 */
                for (pattern = 1, offset = 0; offset < num_words; pattern++, offset++) {
+                   WATCHDOG_RESET();
                    anti_pattern = ~pattern;
                    temp = start[offset];
                    if (temp != anti_pattern) {
@@ -958,6 +963,7 @@ int do_mem_mtest (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
                        pattern, "");
 
                for (addr=start,val=pattern; addr<end; addr++) {
+                       WATCHDOG_RESET();
                        *addr = val;
                        val  += incr;
                }
@@ -965,6 +971,7 @@ int do_mem_mtest (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
                puts ("Reading...");
 
                for (addr=start,val=pattern; addr<end; addr++) {
+                       WATCHDOG_RESET();
                        readback = *addr;
                        if (readback != val) {
                                printf ("\nMem error @ 0x%08X: "
index 9ccf7d6017d3f70d3479ae81ec1193eb92217ec8..202c8441c26aeca1fd6082b4f8ad921d004c24ce 100644 (file)
@@ -154,6 +154,9 @@ typedef     struct  global_data {
 #endif
 #if defined(CONFIG_LWMON) || defined(CONFIG_LWMON5)
        unsigned long kbd_status;
+#endif
+#if defined(CONFIG_WD_MAX_RATE)
+       unsigned long long wdt_last;    /* trace watch-dog triggering rate */
 #endif
        void            **jt;           /* jump table */
 } gd_t;
index 0ac1f801742f958c6e23f7a706224a54c0355094..f12e3bd0d6882a2c43b1a12a19b72547e49e10a1 100644 (file)
@@ -681,4 +681,8 @@ int cpu_reset(int nr);
 int cpu_release(int nr, int argc, char *argv[]);
 #endif
 
+#ifdef CONFIG_POST
+#define CONFIG_HAS_POST
+#endif
+
 #endif /* __COMMON_H_ */
index 36adf669d404681fbf93f9e977cc8124ef274ff0..cc6f87c61383ca5a8c927ce44b53e3e1834635e8 100644 (file)
 #define CFG_WATCHDOG_MAGIC_MASK        0xFFFF0000
 #define CFG_DSPIC_TEST_MASK    0x00000001
 
+/* Additional registers for watchdog timer post test */
+
+#define CFG_DSPIC_TEST_ADDR    (CFG_PERIPHERAL_BASE + GPT0_COMP5)
+#define CFG_WATCHDOG_TIME_ADDR (CFG_PERIPHERAL_BASE + GPT0_COMP4)
+#define CFG_WATCHDOG_FLAGS_ADDR        (CFG_PERIPHERAL_BASE + GPT0_COMP5)
+#define CFG_WATCHDOG_MAGIC     0x12480000
+#define CFG_WATCHDOG_MAGIC_MASK        0xFFFF0000
+#define CFG_DSPIC_TEST_MASK    0x00000001
+
 /*-----------------------------------------------------------------------
  * Serial Port
  *----------------------------------------------------------------------*/
 
 #define CONFIG_HW_WATCHDOG     1       /* Use external HW-Watchdog     */
 #define CONFIG_WD_PERIOD       40000   /* in usec */
+#define CONFIG_WD_MAX_RATE     66600   /* in ticks */
 
 /*
  * For booting Linux, the board info and command line data
index f32af951624ceb56ecbc9061771e12bc10ef7ddd..02b51544c2025124b75aa9f5b45c425e4ac90648 100644 (file)
 # MA 02111-1307 USA
 #
 
+include $(TOPDIR)/include/autoconf.mk
 
-SUBDIRS = drivers cpu lib_$(ARCH) board/$(BOARDDIR)
+LIB                            = libpost.a
+GPLIB-$(CONFIG_HAS_POST)       += libgenpost.a
+COBJS-$(CONFIG_HAS_POST)       += post.o tests.o
 
-LIB    = libpost.a
+SPLIB-$(CONFIG_HAS_POST) = drivers/libpostdrivers.a
+SPLIB-$(CONFIG_HAS_POST) += $(shell if [ -d lib_$(ARCH) ]; then echo \
+                           "lib_$(ARCH)/libpost$(ARCH).a"; fi)
+SPLIB-$(CONFIG_HAS_POST) += $(shell if [ -d lib_$(ARCH)/fpu ]; then echo \
+                           "lib_$(ARCH)/fpu/libpost$(ARCH)fpu.a"; fi)
+SPLIB-$(CONFIG_HAS_POST) += $(shell if [ -d cpu/$(CPU) ]; then echo \
+                           "cpu/$(CPU)/libpost$(CPU).a"; fi)
+SPLIB-$(CONFIG_HAS_POST) += $(shell if [ -d board/$(BOARD) ]; then echo \
+                           "board/$(BOARD)/libpost$(BOARD).a"; fi)
 
-COBJS  = post.o tests.o
+GPLIB  := $(GPLIB-y)
+SPLIB  := $(SPLIB-y)
+COBJS  := $(COBJS-y)
+SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS))
+LIB    := $(obj)$(LIB)
 
-include $(TOPDIR)/post/rules.mk
+all:   $(LIB)
+
+# generic POST library
+$(GPLIB): $(obj).depend $(OBJS)
+       $(AR) $(ARFLAGS) $@ $(OBJS)
+
+# specific POST libraries
+$(SPLIB): $(obj).depend
+       $(MAKE) -C $(dir $(subst $(obj),,$@))
+
+# the POST lib archive
+$(LIB): $(GPLIB) $(SPLIB)
+       (echo create $(LIB); for lib in $(GPLIB) $(SPLIB) ; \
+        do echo addlib $$lib; done; echo save) \
+       | $(AR) -M
+
+#########################################################################
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#########################################################################
index f61d598244ccb025f1bbe2f7a86812cc97872d3f..ea8b5a9c66144613b0b87df395aebbdf3bf107fc 100644 (file)
@@ -24,8 +24,6 @@
 #include <post.h>
 #include <common.h>
 
-#ifdef CONFIG_POST
-
 /*
  * SYSMON test
  *
@@ -328,4 +326,3 @@ int sysmon_post_test (int flags)
 }
 
 #endif /* CONFIG_POST & CFG_POST_SYSMON */
-#endif /* CONFIG_POST */
index 5a92d1ce73f062cd572a69ed3b5ca6c7ae2d0952..3cb6426e4dd8903f29efb901434634170827597d 100644 (file)
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston,
 # MA 02111-1307 USA
+include $(TOPDIR)/include/autoconf.mk
 
 LIB    = libpostlwmon5.a
 
-COBJS  = sysmon.o watchdog.o dspic.o fpga.o dsp.o gdc.o
+COBJS-$(CONFIG_HAS_POST)       += sysmon.o watchdog.o dspic.o fpga.o dsp.o gdc.o
 
 include $(TOPDIR)/post/rules.mk
index 1946f09d6b887d93ca84430e12224e7f93db50bd..a96ac7d681b2fe7038a129c39c48e7b4f645c215 100644 (file)
 
 #include <common.h>
 
-#ifdef CONFIG_POST
-
 #include <post.h>
 
-
 #if CONFIG_POST & CFG_POST_DSP
 #include <asm/io.h>
 
@@ -54,4 +51,3 @@ int dsp_post_test(int flags)
 }
 
 #endif /* CONFIG_POST & CFG_POST_DSP */
-#endif /* CONFIG_POST */
index fcbbc6031c10ad1c652b7ae52dec5309a83b38ab..eb1c31ce30a1fc2342f13974c56864d7651a52d1 100644 (file)
@@ -24,8 +24,6 @@
 
 #include <common.h>
 
-#ifdef CONFIG_POST
-
 /* There are two tests for dsPIC currently implemented:
  * 1. dsPIC ready test. Done in board_early_init_f(). Only result verified here.
  * 2. dsPIC POST result test.  This test gets dsPIC POST codes and version.
@@ -59,27 +57,25 @@ int dspic_init_post_test(int flags)
 
 #if CONFIG_POST & CFG_POST_BSPEC2
 /* Read a register from the dsPIC. */
-int dspic_read(ushort reg, ushort *data)
+int dspic_read(ushort reg)
 {
-       uchar buf[sizeof(*data)];
-       int rval;
-
-       rval = i2c_read(CFG_I2C_DSPIC_IO_ADDR, reg, sizeof(reg),
-                                              buf, sizeof(*data));
+       uchar buf[2];
 
-       *data = (buf[0] << 8) | buf[1];
+       if (i2c_read(CFG_I2C_DSPIC_IO_ADDR, reg, 2, buf, 2))
+               return -1;
 
-       return rval;
+       return (uint)((buf[0] << 8) | buf[1]);
 }
 
 /* Verify error codes regs, display version */
 int dspic_post_test(int flags)
 {
-       ushort data;
+       int data;
        int ret = 0;
 
        post_log("\n");
-       if (dspic_read(DSPIC_VERSION_REG, &data)) {
+       data = dspic_read(DSPIC_VERSION_REG);
+       if (data == -1) {
                post_log("dsPIC : failed read version\n");
                ret = 1;
        } else {
@@ -87,24 +83,23 @@ int dspic_post_test(int flags)
                        (data >> 8) & 0xFF, data & 0xFF);
        }
 
-       if (dspic_read(DSPIC_POST_ERROR_REG, &data)) {
+       data = dspic_read(DSPIC_POST_ERROR_REG);
+       if (data != 0) ret = 1;
+       if (data == -1) {
                post_log("dsPIC : failed read POST code\n");
        } else {
                post_log("dsPIC POST code 0x%04X\n", data);
        }
-       if (data != 0)
-               ret = 1;
 
-       if (dspic_read(DSPIC_SYS_ERROR_REG, &data)) {
+       data = dspic_read(DSPIC_SYS_ERROR_REG);
+       if (data == -1) {
                post_log("dsPIC : failed read system error\n");
                ret = 1;
-       } else if (data != 0) {
+       } else {
                post_log("dsPIC SYS-ERROR code: 0x%04X\n", data);
-               ret = 1;
        }
 
        return ret;
 }
 
 #endif /* CONFIG_POST & CFG_POST_BSPEC2 */
-#endif /* CONFIG_POST */
index 2d95b5e50ae6f302ebdffbceb24db3862b599d40..b48390ba98ad5e22d2bb55685ac2271f28bfb546 100644 (file)
@@ -23,8 +23,6 @@
  */
 #include <common.h>
 
-#ifdef CONFIG_POST
-
 /* This test performs testing of FPGA SCRATCH register,
  * gets FPGA version and run get_ram_size() on FPGA memory
  */
@@ -94,4 +92,3 @@ int fpga_post_test(int flags)
 }
 
 #endif /* CONFIG_POST & CFG_POST_BSPEC3 */
-#endif /* CONFIG_POST */
index 4af6a7a6e564812b8ce6c1fe1b04b85570c7676e..bc166850f8e49a94b6de0cb75066abbbd421c285 100644 (file)
@@ -23,8 +23,6 @@
  */
 #include <common.h>
 
-#ifdef CONFIG_POST
-
 /* This test attempts to verify board GDC. A scratch register tested, then
  * simple memory test (get_ram_size()) run over GDC memory.
  */
@@ -96,4 +94,3 @@ int gdc_post_test(int flags)
        return ret;
 }
 #endif /* CONFIG_POST & CFG_POST_BSPEC4 */
-#endif /* CONFIG_POST */
index 0cf1cf2a24c6e0008852bcbf29dd2ad88eedbe0a..15661e3e082919ece5e263ce1086e28e87ae5b8e 100644 (file)
@@ -25,8 +25,6 @@
 #include <post.h>
 #include <common.h>
 
-#ifdef CONFIG_POST
-
 /*
  * SYSMON test
  *
@@ -34,9 +32,9 @@
  * The test passes when all the following voltages and temperatures
  * are within allowed ranges:
  *
- * Temperature               -40 .. +85 C
- * +5V                     +4.75 .. +5.25 V
- * +5V standby             +4.75 .. +5.25 V
+ * Temperature                -40 .. +85 C
+ * +5V                      +4.75 .. +5.25 V
+ * +5V standby              +4.75 .. +5.25 V
  *
  * LCD backlight is not enabled if temperature values are not within
  * allowed ranges (-30 .. + 80). The brightness of backlite can be
@@ -58,7 +56,7 @@
 DECLARE_GLOBAL_DATA_PTR;
 
 /* from dspic.c */
-extern int dspic_read(ushort reg, ushort *data);
+extern int dspic_read(ushort reg);
 
 #define        RELOC(x) if (x != NULL) x = (void *) ((ulong) (x) + gd->reloc_off)
 
@@ -67,7 +65,6 @@ typedef struct sysmon_table_s sysmon_table_t;
 
 static void sysmon_dspic_init (sysmon_t * this);
 static int sysmon_dspic_read (sysmon_t * this, uint addr);
-static int sysmon_dspic_read_sgn (sysmon_t * this, uint addr);
 static void sysmon_backlight_disable (sysmon_table_t * this);
 
 struct sysmon_s
@@ -80,13 +77,9 @@ struct sysmon_s
 static sysmon_t sysmon_dspic =
        {CFG_I2C_DSPIC_IO_ADDR, sysmon_dspic_init, sysmon_dspic_read};
 
-static sysmon_t sysmon_dspic_sgn =
-       {CFG_I2C_DSPIC_IO_ADDR, sysmon_dspic_init, sysmon_dspic_read_sgn};
-
 static sysmon_t * sysmon_list[] =
 {
        &sysmon_dspic,
-       &sysmon_dspic_sgn,
        NULL
 };
 
@@ -114,17 +107,17 @@ struct sysmon_table_s
 
 static sysmon_table_t sysmon_table[] =
 {
-    {"Temperature", " C", &sysmon_dspic_sgn, NULL, sysmon_backlight_disable,
+    {"Temperature", " C", &sysmon_dspic, NULL, sysmon_backlight_disable,
      1, 1, -32768, 32767, 0xFFFF, 0x8000-40, 0x8000+85, 0,
-                                 0x8000-30, 0x8000+80, 0, 0x12BC},
+                                  0x8000-30, 0x8000+80, 0, 0x12BC},
 
     {"+ 5 V", "V", &sysmon_dspic, NULL, NULL,
-     100, 1000, 0, 0xFFFF, 0xFFFF, 4750, 5250, 0,
-                                  4750, 5250, 0, 0x12CA},
+     100, 1000, -0x8000, 0x7FFF, 0xFFFF, 0x8000+4750, 0x8000+5250, 0,
+                                         0x8000+4750, 0x8000+5250, 0, 0x12CA},
 
     {"+ 5 V standby", "V", &sysmon_dspic, NULL, NULL,
-     100, 1000, 0, 0xFFFF, 0xFFFF, 4750, 5250, 0,
-                                  4750, 5250, 0, 0x12C6},
+     100, 1000, -0x8000, 0x7FFF, 0xFFFF, 0x8000+4750, 0x8000+5250, 0,
+                                         0x8000+4750, 0x8000+5250, 0, 0x12C6},
 };
 static int sysmon_table_size = sizeof(sysmon_table) / sizeof(sysmon_table[0]);
 
@@ -161,7 +154,9 @@ static char *sysmon_unit_value (sysmon_table_t *s, uint val)
        static char buf[32];
        char *p, sign;
        int decimal, frac;
-       int unit_val =
+       int unit_val;
+
+       unit_val =
            s->unit_min + (s->unit_max - s->unit_min) * val / s->val_mask;
 
        if (val == -1)
@@ -197,18 +192,10 @@ static void sysmon_dspic_init (sysmon_t * this)
 
 static int sysmon_dspic_read (sysmon_t * this, uint addr)
 {
-       ushort data;
-
-       return (dspic_read(addr, &data)) ? -1 : data;
-}
-
-static int sysmon_dspic_read_sgn (sysmon_t * this, uint addr)
-{
-       ushort data;
+       int res = dspic_read(addr);
 
        /* To fit into the table range we should add 0x8000 */
-       return (dspic_read(addr, &data)) ? -1 :
-              (signed short)data + 0x8000;
+       return (res == -1) ? -1 : (res + 0x8000);
 }
 
 static void sysmon_backlight_disable (sysmon_table_t * this)
@@ -256,4 +243,3 @@ int sysmon_post_test (int flags)
 }
 
 #endif /* CONFIG_POST & CFG_POST_SYSMON */
-#endif /* CONFIG_POST */
index 899fbfbbd7191c797ecc1608241c88808f456f61..16c01bee4383af554fdcdb6eb28da75adf709432 100644 (file)
 
 #include <common.h>
 
-/*
- * This test verifies if the reason of last reset was an abnormal voltage
+/* This test verifies if the reason of last reset was an abnormal voltage
  * condition, than it performs watchdog test, measuing time required to
  * trigger watchdog reset.
  */
 
-#ifdef CONFIG_POST
-
 #include <post.h>
 
 #if CONFIG_POST & CFG_POST_WATCHDOG
@@ -55,9 +52,8 @@ static void watchdog_magic_write(uint value)
 
 int sysmon1_post_test(int flags)
 {
-       if (gpio_read_in_bit(CFG_GPIO_SYSMON_STATUS) == 0) {
-               /*
-                * 3.1. GPIO62 is low
+       if (gpio_read_in_bit(CFG_GPIO_SYSMON_STATUS)) {
+               /* 3.1. GPIO62 is low
                 * Assuming system voltage failure.
                 */
                post_log("Abnormal voltage detected (GPIO62)\n");
@@ -69,14 +65,11 @@ int sysmon1_post_test(int flags)
 
 int lwmon5_watchdog_post_test(int flags)
 {
-       ulong time;
-
        /* On each reset scratch register 1 should be tested,
         * but first test GPIO62:
         */
        if (!(flags & POST_MANUAL) && sysmon1_post_test(flags)) {
-               /*
-                * 3.1. GPIO62 is low
+               /* 3.1. GPIO62 is low
                 * Assuming system voltage failure.
                 */
                /* 3.1.1. Set scratch register 1 to 0x0000xxxx */
@@ -86,12 +79,12 @@ int lwmon5_watchdog_post_test(int flags)
        }
 
        if (watchdog_magic_read() != CFG_WATCHDOG_MAGIC) {
-               /*
-                * 3.2. Scratch register 1 differs from magic value 0x1248xxxx
+               /* 3.2. Scratch register 1 differs from magic value 0x1248xxxx
                 * Assuming PowerOn
                 */
                int ints;
                ulong base;
+               ulong time;
 
                /* 3.2.1. Set magic value to scratch register */
                watchdog_magic_write(CFG_WATCHDOG_MAGIC);
@@ -109,28 +102,26 @@ int lwmon5_watchdog_post_test(int flags)
                if (ints)
                        enable_interrupts ();
 
-               /*
-                * 3.2.5. Reset didn't happen. - Set 0x0000xxxx
+               /* 3.2.5. Reset didn't happen. - Set 0x0000xxxx
                 * into scratch register 1
                 */
                watchdog_magic_write(0);
                /* 3.2.6. Mark test as failed. */
                post_log("hw watchdog time : %u ms, failed ", time);
                return 2;
+       } else {
+               /* 3.3. Scratch register matches magic value 0x1248xxxx
+                * Assume this is watchdog-initiated reset
+                */
+               ulong time;
+               /* 3.3.1. So, the test succeed, save measured time to syslog. */
+               time = in_be32((void *)CFG_WATCHDOG_TIME_ADDR);
+               post_log("hw watchdog time : %u ms, passed ", time);
+               /* 3.3.2. Set scratch register 1 to 0x0000xxxx */
+               watchdog_magic_write(0);
+               return 0;
        }
-
-       /*
-        * 3.3. Scratch register matches magic value 0x1248xxxx
-        * Assume this is watchdog-initiated reset
-        */
-       /* 3.3.1. So, the test succeed, save measured time to syslog. */
-       time = in_be32((void *)CFG_WATCHDOG_TIME_ADDR);
-       post_log("hw watchdog time : %u ms, passed ", time);
-       /* 3.3.2. Set scratch register 1 to 0x0000xxxx */
-       watchdog_magic_write(0);
-
-       return 0;
+       return -1;
 }
 
 #endif /* CONFIG_POST & CFG_POST_WATCHDOG */
-#endif /* CONFIG_POST */
index e8817520fc6c9a6395cdc1af77b4e008fb5abc75..115e331fdbf2b4d08d5fafdd7ea1f667eebea2fb 100644 (file)
@@ -31,8 +31,6 @@
  * in the board specific function.
  */
 
-#ifdef CONFIG_POST
-
 #include <post.h>
 
 #if CONFIG_POST & CFG_POST_CODEC
@@ -45,4 +43,3 @@ int codec_post_test (int flags)
 }
 
 #endif /* CONFIG_POST & CFG_POST_CODEC */
-#endif /* CONFIG_POST */
index 63531a2a4ca7d865b4a5b1269e71559858f3fb5f..dcef4e821e3782c15994d02c86e787ef47e069e6 100644 (file)
@@ -31,8 +31,6 @@
  * in the board specific function.
  */
 
-#ifdef CONFIG_POST
-
 #include <post.h>
 
 #if CONFIG_POST & CFG_POST_DSP
@@ -45,4 +43,3 @@ int dsp_post_test (int flags)
 }
 
 #endif /* CONFIG_POST & CFG_POST_DSP */
-#endif /* CONFIG_POST */
index 501465c06a1fc702394e3ed3650a61d69c355876..36965a1672b71a20719488742379fea9fadc78f4 100644 (file)
@@ -29,8 +29,6 @@
  * several test scenarios.
  */
 
-#ifdef CONFIG_POST
-
 #include <post.h>
 #include <watchdog.h>
 
@@ -78,4 +76,3 @@ int cache_post_test (int flags)
 }
 
 #endif /* CONFIG_POST & CFG_POST_CACHE */
-#endif /* CONFIG_POST */
index 2d41b5566a8f9f7f2b0bb567c0a601908da6bb50..a3fc39bda11c125b2b5b5b4116e1f6a84ddae8ba 100644 (file)
@@ -22,7 +22,6 @@
 
 #include <config.h>
 
-#ifdef CONFIG_POST
 #if defined(CONFIG_MPC823) || \
     defined(CONFIG_MPC850) || \
     defined(CONFIG_MPC855) || \
@@ -492,4 +491,3 @@ cache_post_test6_data:
 
 #endif /* CONFIG_MPC823 || MPC850 || MPC855 || MPC860 */
 #endif /* CONFIG_POST & CFG_POST_CACHE */
-#endif /* CONFIG_POST */
index 8c87b5927e125c18c7f6c9d453d4ee450be0d2df..2fa5cf4ac991cf7f456977261b0b859208ae03ad 100644 (file)
@@ -35,8 +35,6 @@
  *   TEST_NUM - number of tests
  */
 
-#ifdef CONFIG_POST
-
 #include <post.h>
 #if CONFIG_POST & CFG_POST_ETHER
 #if defined(CONFIG_8xx)
@@ -627,5 +625,3 @@ int ether_post_test (int flags)
 }
 
 #endif /* CONFIG_POST & CFG_POST_ETHER */
-
-#endif /* CONFIG_POST */
index 330b977f1a56e4256028cf3bf42423f543175a14..83f04da55d7cf699de03cc7ae6af144e4b8fb4ce 100644 (file)
@@ -33,8 +33,6 @@
  * corresponding table value.
  */
 
-#ifdef CONFIG_POST
-
 #include <post.h>
 
 #if CONFIG_POST & CFG_POST_SPR
@@ -149,4 +147,3 @@ int spr_post_test (int flags)
        return ret;
 }
 #endif /* CONFIG_POST & CFG_POST_SPR */
-#endif /* CONFIG_POST */
index fd97e3899e9e1187aaff700cec7c97d06c89d4ee..635debe8d3eb33de37566e5de184ad1b80fc042a 100644 (file)
@@ -36,8 +36,6 @@
  *   TEST_NUM - number of tests
  */
 
-#ifdef CONFIG_POST
-
 #include <post.h>
 #if CONFIG_POST & CFG_POST_UART
 #if defined(CONFIG_8xx)
@@ -556,5 +554,3 @@ int uart_post_test (int flags)
 }
 
 #endif /* CONFIG_POST & CFG_POST_UART */
-
-#endif /* CONFIG_POST */
index 0c74cfa5dae3a905efc09fc3fb6f65bc0831343b..58779812f6afc6ca98e22a287d0b1f227981a4ce 100644 (file)
@@ -34,8 +34,6 @@
  * Initialization Example.
  */
 
-#ifdef CONFIG_POST
-
 #include <post.h>
 
 #if CONFIG_POST & CFG_POST_USB
@@ -265,5 +263,3 @@ int usb_post_test (int flags)
 }
 
 #endif /* CONFIG_POST & CFG_POST_USB */
-
-#endif /* CONFIG_POST */
index 48c4282e1dc536d5936687d7ad0329048498041c..f94158aa6f34499b0c46aaf5a1685f63dc9040ce 100644 (file)
@@ -33,8 +33,6 @@
  * reboots, on the second iteration the test routine reports a success.
  */
 
-#ifdef CONFIG_POST
-
 #include <post.h>
 #include <watchdog.h>
 
@@ -75,4 +73,3 @@ int watchdog_post_test (int flags)
 }
 
 #endif /* CONFIG_POST & CFG_POST_WATCHDOG */
-#endif /* CONFIG_POST */
index e3f44b7774be4f66a58a2deee954ab7a0cc9c372..7b13413b9d7e817bfa0edcdfa46b7d570bde249c 100644 (file)
 # 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
index 466ca926b77f87f0a26ad9b43aa618a616671d2d..be6a2bf54ccf13836f0551dff5fe482d3109ba1c 100644 (file)
@@ -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 */
index d5cb075d6b57074cdf7cf8177664b2be1e27c9d9..455ffa072691108b85d9b1aae32b3ce55514638f 100644 (file)
@@ -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 */
index 439f80d1f6586132799945e393a9f87ccaa85ec3..12a1bbfa87686f99c516d7bddd1bb500bc55877f 100644 (file)
@@ -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) */
index 4ac7491343f6332577c947b9fd19793c512b5d5e..ccbfcf91aea7e691838d18578840c5e447d6d50a 100644 (file)
@@ -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 */
index 0c26fe00e4c3b90aade7978ec06e759d0d64a7a3..fff4169976ea0ec9e72622719a07f12f64fb23ae 100644 (file)
@@ -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 */
index 37c95598f5be3521b034f3641b19fa0c2bbb33e1..6152eb21a909d38ecca9f0c01f2d89c83cbb80a6 100644 (file)
@@ -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 */
index f47b48e9dc2d1329aeb5d53d57d88d261b05f05b..27cfb91594822ebb215e7d58b6e0370bdfc013a0 100644 (file)
@@ -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 */
index bd4f4c9856b2bf1c43d54e4942dacf44687da400..7fdecb485c8524864ff9fed4afc823c579c69174 100644 (file)
@@ -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 */
index cb2f1deacd7083f50238c571c8fcd90c2226c148..0b6cdf58c9bb1439546ab289743aac2255b9ecd9 100644 (file)
 # 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
index 1b2e64471b30145607aed0594b8f5c1fd30f7e7e..f54fe9970a28e7f41b48bf780647feae4e74f853 100644 (file)
@@ -23,8 +23,6 @@
 
 #include <common.h>
 
-#ifdef CONFIG_POST
-
 /*
  * I2C test
  *
@@ -91,4 +89,3 @@ int i2c_post_test (int flags)
 }
 
 #endif /* CONFIG_POST & CFG_POST_I2C */
-#endif /* CONFIG_POST */
index fb969856bc32bbf926d10920376910d6a395ab79..e94d92c08b81d1bc9af69ef02c1eb826ea301932 100644 (file)
  * the whole RAM.
  */
 
-#ifdef CONFIG_POST
-
 #include <post.h>
 #include <watchdog.h>
 
@@ -483,4 +481,3 @@ int memory_post_test (int flags)
 }
 
 #endif /* CONFIG_POST & CFG_POST_MEMORY */
-#endif /* CONFIG_POST */
index e3da5e64ced488cd7b40d9ea4c8009677e447603..66e52651673e2dec2c33463f7dcf52bdec927886 100644 (file)
@@ -40,8 +40,6 @@
  *      nonleap-years.
  */
 
-#ifdef CONFIG_POST
-
 #include <post.h>
 #include <rtc.h>
 
@@ -195,4 +193,3 @@ int rtc_post_test (int flags)
 }
 
 #endif /* CONFIG_POST & CFG_POST_RTC */
-#endif /* CONFIG_POST */
index 9f1b329d70be472c92b1a948c62f510521ca671c..bd7a23299206d11d2f62d510987aa1e793ac0a63 100644 (file)
 # 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
index 7ddf2ab2f3bc01c2dc5aa66d294478d5a8038817..e3315bf15e4665fea22dbfe6cbd471be6d471817 100644 (file)
@@ -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
index 12791762ba27ba43a037ebd60e275f6fe057919e..6220ed2bb1b7e691de28bf5f92413bc68b3a5266 100644 (file)
@@ -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
index 6e276c48d5c062561364b6c8d55a049688ad0b52..45b9ff26e86b271e1d85a7465791a7407b8b1744 100644 (file)
@@ -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
index 789a24cb7f1bc1548712b03b5c33a8c94d3b45b8..89f754a0b11c867d0ee69dbc99cbd9cb6f7cbf4c 100644 (file)
@@ -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
index e0c2aaff8262d38213cf60ba8f9143254512d0da..0afdd711520a52b681a1b8ee998710fae4014d95 100644 (file)
@@ -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
index 033584bec087ca530c3de80f88409bfdde4c5cb5..271392a0e8c3314e84d5ada159251c99b7a7c921 100644 (file)
@@ -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
index 4ab6d2dc00288f11f2d539c8c40de79c4ac70bd6..5c7f76191d4d316eca7c9feaeb58ec842b0ebbf4 100644 (file)
@@ -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 */
index da6ef3745d0cb0c74282071b1fee1be5fec77cdc..0bd9e748f2aff2f6d15902e5010053ece5fd4139 100644 (file)
@@ -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
index f689b8232ff5e35416c1d7e3c0620a440a6e86d7..dece6148351cce276d6700d3bae9a620e3bed56c 100644 (file)
@@ -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 */
index 6e60507f9cadaa4886fdef17f6d533ec59318a35..8a172174c311400279606dc0e57c2e13eb919ed9 100644 (file)
@@ -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 */
index b2c47e3658a711f950f9ff1cb4b923224fc03735..f366252e66799e4fc7247a55b11cf4e0a0d66c26 100644 (file)
@@ -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 */
index 990aa0c98996bd1cda35c265af2d050925f2908b..7f26482a57d43516d59d3abf0013492ace48dea3 100644 (file)
@@ -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 */
index 82646c80d65676772710a60eb8ab5173f9e88a75..db435931d8d1e5206a966992e151d6b270ad6b1a 100644 (file)
 # 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
 
index 4cecbf6a4fe4bdbe319ae85079cf84b0edcab841..921282e8b697ce9728c99207e187e994f27c7531 100644 (file)
@@ -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 */
index d866ad5a36b45618784767487e8c7168f27c9f51..be8f6208ac2bcd99fe09449f54f2aebc47b998a0 100644 (file)
@@ -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 */
index 07dcba8cc92af2304c24f2afeed6bd9006820846..9ddb67a21d44a171c55f749543011155662609df 100644 (file)
@@ -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 */
index 67f48da33523bae86e2d6f48bb65469ae2cc9226..7e6fe87b013025820570f592533c0fccac212220 100644 (file)
@@ -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 */
index 393c56830d9d6cd4aa445df1880c629a30b6a8b0..86bc2234cf58903ac73b999c7065ec08a22c4371 100644 (file)
@@ -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
index 872438478fe445d2e19afdb1a476975170c74e4c..5d3f5842811e6d72c8562ff0b1f2180ddb6cb02a 100644 (file)
@@ -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
index f65f79a8e84dae8bcda9dcb810316a9f6eed16ce..1d8e61ec1f56f11c13e8cd3e3d6259d70527317f 100644 (file)
@@ -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
index e240c41b1a4dcfa84ebdd82f1af45979cca28136..113e79d00a76b750520e0aa150595e864c787f92 100644 (file)
@@ -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
index 523cf4da59b747879071f524adda4fbbba01d119..a6684bf60b64fdc627e8109d394f5eae3e71e3fb 100644 (file)
@@ -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
index 91c82c915f7a401d2c08f96869a60ebce0c5d23f..8c70007c548ee93925f44980da23d04d5bf8ced7 100644 (file)
@@ -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
index f495bf2aab103aeb5feef25c96290b4785b7c388..09ec48554e26f3d1fcd23cc964b5ac4bedb92a33 100644 (file)
@@ -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
index bd83bd136285c1fe75eea0634b6b1a4d3200869d..b2daa8804968ea628268235bea4e14e31d6ecedd 100644 (file)
@@ -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
index c2d7476047f67c23784a9ef364222ae9b2681db3..a7f1a866fdcc917dd9b64f31c49d31e3c64650c0 100644 (file)
@@ -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
index 79f01789c00e36e4cff93c066b9903a91d1d125e..bbb4f50b7aa24673b76421a152ac759969cb97a8 100644 (file)
@@ -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
index 2c72063848e0560de9580534adce9328bfb0ca34..6aac937890caa4ecc159ccd968572e77cee47586 100644 (file)
@@ -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
index cfbac5e6208029177b9e15e1fe5227a753e93357..3d6b3c016c62155a9d24279ab01e659e041d120d 100644 (file)
@@ -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
index 48d9954ca4857838b87c3199f8f2f184d3b136fc..7417a36808ae221032476823613a09e46a687c37 100644 (file)
@@ -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
index 1df0657d8b6130d27dce75bab46e63071d27aecb..c016c3ae4062b8575ee2194697e627168ea244f4 100644 (file)
@@ -30,8 +30,6 @@
 #include <logbuff.h>
 #endif
 
-#ifdef CONFIG_POST
-
 DECLARE_GLOBAL_DATA_PTR;
 
 #define POST_MAX_NUMBER                32
@@ -442,5 +440,3 @@ unsigned long post_time_ms (unsigned long base)
        return 0; /* Not implemented yet */
 #endif
 }
-
-#endif /* CONFIG_POST */
index e2c73c6004a879823b93b1d68e8091dc6f9bf4a3..94e72bec62a086a3703e132de753e1286237b05d 100644 (file)
@@ -23,6 +23,8 @@
 
 include $(TOPDIR)/config.mk
 
+COBJS  := $(COBJS-y)
+AOBJS  := $(AOBJS-y)
 SRCS   := $(AOBJS:.o=.S) $(COBJS:.o=.c)
 OBJS   := $(addprefix $(obj),$(AOBJS) $(COBJS))
 LIB    := $(obj)$(LIB)
index 53d01e355e6681ad4f9819b37d91565f7b335419..36473e311f8606eb805ad037d8108c0b96b3f553 100644 (file)
@@ -27,8 +27,6 @@
 
 #include <common.h>
 
-#ifdef CONFIG_POST
-
 #include <post.h>
 
 extern int cache_post_test (int flags);
@@ -278,5 +276,3 @@ struct post_test post_list[] =
 };
 
 unsigned int post_list_size = sizeof (post_list) / sizeof (struct post_test);
-
-#endif /* CONFIG_POST */