Merge branch 'master' of /home/wd/git/u-boot/custodians
[oweals/u-boot.git] / include / common.h
index 59e0b00a9105833df6f2f430fb6b4fecc2bead48..74d97046a0e5242c330dd9fd923e492dde2b8349 100644 (file)
  */
 
 #ifndef __COMMON_H_
-#define __COMMON_H_
+#define __COMMON_H_    1
 
 #undef _LINUX_CONFIG_H
-#define _LINUX_CONFIG_H                /* avoid reading Linux autoconf.h file  */
+#define _LINUX_CONFIG_H 1      /* avoid reading Linux autoconf.h file  */
 
 #ifndef __ASSEMBLY__           /* put C only stuff in this section */
 
@@ -51,18 +51,18 @@ typedef volatile unsigned char      vu_char;
     defined(CONFIG_MPC859DSL)  || \
     defined(CONFIG_MPC866)     || defined(CONFIG_MPC866T)      || \
     defined(CONFIG_MPC866P)
-# define CONFIG_MPC866_FAMILY
+# define CONFIG_MPC866_FAMILY 1
 #elif defined(CONFIG_MPC870) \
    || defined(CONFIG_MPC875) \
    || defined(CONFIG_MPC880) \
    || defined(CONFIG_MPC885)
-# define CONFIG_MPC885_FAMILY
+# define CONFIG_MPC885_FAMILY   1
 #endif
 #if   defined(CONFIG_MPC860)      \
    || defined(CONFIG_MPC860T)     \
    || defined(CONFIG_MPC866_FAMILY) \
    || defined(CONFIG_MPC885_FAMILY)
-# define CONFIG_MPC86x
+# define CONFIG_MPC86x 1
 #endif
 #elif defined(CONFIG_5xx)
 #include <asm/5xx_immap.h>
@@ -77,10 +77,10 @@ typedef volatile unsigned char      vu_char;
    || defined(CONFIG_MPC8248) \
    || defined(CONFIG_MPC8271) \
    || defined(CONFIG_MPC8272)
-#define CONFIG_MPC8272_FAMILY
+#define CONFIG_MPC8272_FAMILY  1
 #endif
 #if defined(CONFIG_MPC8272_FAMILY)
-#define CONFIG_MPC8260
+#define CONFIG_MPC8260 1
 #endif
 #include <asm/immap_8260.h>
 #endif
@@ -200,12 +200,19 @@ typedef void (interrupt_handler_t)(void *);
  || defined(CONFIG_8xx_CONS_SCC1) || defined(CONFIG_8xx_CONS_SCC2) \
  || defined(CONFIG_8xx_CONS_SCC3) || defined(CONFIG_8xx_CONS_SCC4)
 
-#define CONFIG_SERIAL_MULTI
+#define CONFIG_SERIAL_MULTI    1
 
 #endif
 
 #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);
@@ -799,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