Merge branch 'master' of /home/wd/git/u-boot/custodians
[oweals/u-boot.git] / include / common.h
index 5cfdd762dc6ee1ee9844a1526eb82953e264ff22..74d97046a0e5242c330dd9fd923e492dde2b8349 100644 (file)
@@ -206,6 +206,13 @@ typedef void (interrupt_handler_t)(void *);
 
 #endif /* CONFIG_SERIAL_MULTI */
 
+/*
+ * Return the time since boot in microseconds, This is needed for bootstage
+ * and should be defined in CPU- or board-specific code. If undefined then
+ * millisecond resolution will be used (the standard get_timer()).
+ */
+ulong timer_get_boot_us(void);
+
 /*
  * General Purpose Utilities
  */
@@ -260,12 +267,10 @@ int       print_buffer (ulong addr, void* data, uint width, uint count, uint linelen);
 
 /* common/main.c */
 void   main_loop       (void);
-int    run_command     (const char *cmd, int flag);
-#ifdef CONFIG_CMD_PXE
-int run_command2(const char *cmd, int flag);
-#endif
+int run_command(const char *cmd, int flag);
 int    readline        (const char *const prompt);
-int    readline_into_buffer    (const char *const prompt, char * buffer);
+int    readline_into_buffer(const char *const prompt, char *buffer,
+                       int timeout);
 int    parse_line (char *, char *[]);
 void   init_cmd_timeout(void);
 void   reset_cmd_timeout(void);
@@ -284,13 +289,7 @@ int        last_stage_init(void);
 extern ulong monitor_flash_len;
 int mac_read_from_eeprom(void);
 extern u8 _binary_dt_dtb_start[];      /* embedded device tree blob */
-
-/*
- * Called when console output is requested before the console is available.
- * The board should do its best to get the character out to the user any way
- * it can.
- */
-void board_pre_console_putc(int ch);
+int set_cpu_clk_info(void);
 
 /* common/flash.c */
 void flash_perror (int);
@@ -733,16 +732,7 @@ void uuid_str_to_bin(const char *uuid, unsigned char *out);
 int uuid_str_valid(const char *uuid);
 
 /* lib/vsprintf.c */
-ulong  simple_strtoul(const char *cp,char **endp,unsigned int base);
-int strict_strtoul(const char *cp, unsigned int base, unsigned long *res);
-unsigned long long     simple_strtoull(const char *cp,char **endp,unsigned int base);
-long   simple_strtol(const char *cp,char **endp,unsigned int base);
-void   panic(const char *fmt, ...)
-               __attribute__ ((format (__printf__, 1, 2), noreturn));
-int    sprintf(char * buf, const char *fmt, ...)
-               __attribute__ ((format (__printf__, 2, 3)));
-int    vsprintf(char *buf, const char *fmt, va_list args);
-char *simple_itoa(ulong i);
+#include <vsprintf.h>
 
 /* lib/strmhz.c */
 char * strmhz(char *buf, unsigned long hz);
@@ -808,10 +798,8 @@ int        pcmcia_init (void);
 #ifdef CONFIG_STATUS_LED
 # include <status_led.h>
 #endif
-/*
- * Board-specific Platform code can reimplement show_boot_progress () if needed
- */
-void show_boot_progress(int val);
+
+#include <bootstage.h>
 
 /* Multicore arch functions */
 #ifdef CONFIG_MP