]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - post/post.c
Merge branch 'master' of git://git.denx.de/u-boot-arm
[karo-tx-uboot.git] / post / post.c
index d31829ba162b41c30d5e0672cf5104cd725e3dfc..b29eb87fc2113701ca8c92618b62bdf568ee8e24 100644 (file)
@@ -22,7 +22,7 @@
  */
 
 #include <common.h>
-#include <console.h>
+#include <stdio_dev.h>
 #include <watchdog.h>
 #include <post.h>
 
@@ -58,6 +58,22 @@ int post_init_f (void)
        return res;
 }
 
+/*
+ * Supply a default implementation for post_hotkeys_pressed() for boards
+ * without hotkey support. We always return 0 here, so that the
+ * long-running tests won't be started.
+ *
+ * Boards with hotkey support can override this weak default function
+ * by defining one in their board specific code.
+ */
+int __post_hotkeys_pressed(void)
+{
+       return 0;       /* No hotkeys supported */
+}
+int post_hotkeys_pressed(void)
+       __attribute__((weak, alias("__post_hotkeys_pressed")));
+
+
 void post_bootmode_init (void)
 {
        int bootmode = post_bootmode_get (0);
@@ -319,6 +335,7 @@ int post_run (char *name, int flags)
                }
 
                if (i < post_list_size) {
+                       WATCHDOG_RESET();
                        return post_run_single (post_list + i,
                                                test_flags[i],
                                                flags, i);
@@ -371,7 +388,7 @@ int post_log (char *format, ...)
 {
        va_list args;
        uint i;
-       char printbuffer[CFG_PBSIZE];
+       char printbuffer[CONFIG_SYS_PBSIZE];
 
        va_start (args, format);
 
@@ -392,6 +409,7 @@ int post_log (char *format, ...)
        return 0;
 }
 
+#ifndef CONFIG_RELOC_FIXUP_WORKS
 void post_reloc (void)
 {
        unsigned int i;
@@ -436,6 +454,7 @@ void post_reloc (void)
                }
        }
 }
+#endif
 
 
 /*
@@ -447,7 +466,7 @@ void post_reloc (void)
 unsigned long post_time_ms (unsigned long base)
 {
 #ifdef CONFIG_PPC
-       return (unsigned long)(get_ticks () / (get_tbclk () / CFG_HZ)) - base;
+       return (unsigned long)(get_ticks () / (get_tbclk () / CONFIG_SYS_HZ)) - base;
 #else
 #warning "Not implemented yet"
        return 0; /* Not implemented yet */