]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - include/common.h
hammerhead: move CONFIG_SYS_TEXT_BASE to header
[karo-tx-uboot.git] / include / common.h
index 2151597b2b6197b0916ebea48850148ed2b2c7d0..1e4a6a5757fe3e46b12d50161ae1834989039a9d 100644 (file)
@@ -35,6 +35,7 @@ typedef volatile unsigned short vu_short;
 typedef volatile unsigned char vu_char;
 
 #include <config.h>
+#include <asm-offsets.h>
 #include <linux/bitops.h>
 #include <linux/types.h>
 #include <linux/string.h>
@@ -179,11 +180,13 @@ typedef void (interrupt_handler_t)(void *);
  * General Purpose Utilities
  */
 #define min(X, Y)                              \
-       ({ typeof (X) __x = (X), __y = (Y);     \
+       ({ typeof (X) __x = (X);                \
+               typeof (Y) __y = (Y);           \
                (__x < __y) ? __x : __y; })
 
 #define max(X, Y)                              \
-       ({ typeof (X) __x = (X), __y = (Y);     \
+       ({ typeof (X) __x = (X);                \
+               typeof (Y) __y = (Y);           \
                (__x > __y) ? __x : __y; })
 
 #define MIN(x, y)  min(x, y)
@@ -214,14 +217,6 @@ typedef void (interrupt_handler_t)(void *);
  * Function Prototypes
  */
 
-#ifdef CONFIG_SERIAL_SOFTWARE_FIFO
-void   serial_buffered_init (void);
-void   serial_buffered_putc (const char);
-void   serial_buffered_puts (const char *);
-int    serial_buffered_getc (void);
-int    serial_buffered_tstc (void);
-#endif /* CONFIG_SERIAL_SOFTWARE_FIFO */
-
 void   hang            (void) __attribute__ ((noreturn));
 
 /* */
@@ -277,9 +272,9 @@ int setenv       (char *, char *);
 # include <asm/setup.h>
 # include <asm/u-boot-arm.h>   /* ARM version to be fixed! */
 #endif /* CONFIG_ARM */
-#ifdef CONFIG_I386             /* x86 version to be fixed! */
-# include <asm/u-boot-i386.h>
-#endif /* CONFIG_I386 */
+#ifdef CONFIG_X86              /* x86 version to be fixed! */
+# include <asm/u-boot-x86.h>
+#endif /* CONFIG_X86 */
 
 #ifdef CONFIG_AUTO_COMPLETE
 int env_complete(char *var, int maxv, char *cmdv[], int maxsz, char *buf);
@@ -454,6 +449,11 @@ void               out16(unsigned int, unsigned short value);
 #if defined (CONFIG_MPC83xx)
 void           ppcDWload(unsigned int *addr, unsigned int *ret);
 void           ppcDWstore(unsigned int *addr, unsigned int *value);
+void disable_addr_trans(void);
+void enable_addr_trans(void);
+#if defined(CONFIG_DDR_ECC) && !defined(CONFIG_ECC_INIT_VIA_DDRCONTROLLER)
+void ddr_enable_ecc(unsigned int dram_size);
+#endif
 #endif
 
 /* $(CPU)/cpu.c */
@@ -535,6 +535,7 @@ ulong get_PERCLK2(void);
 ulong get_PERCLK3(void);
 #endif
 ulong  get_bus_freq  (ulong);
+int get_serial_clock(void);
 
 #if defined(CONFIG_MPC85xx)
 typedef MPC85xx_SYS_INFO sys_info_t;
@@ -544,6 +545,10 @@ ulong      get_ddr_freq  (ulong);
 #if defined(CONFIG_MPC86xx)
 typedef MPC86xx_SYS_INFO sys_info_t;
 void   get_sys_info  ( sys_info_t * );
+static inline ulong get_ddr_freq(ulong dummy)
+{
+       return get_bus_freq(dummy);
+}
 #endif
 
 #if defined(CONFIG_4xx) || defined(CONFIG_IOP480)
@@ -591,8 +596,6 @@ uint        dpram_base(void);
 uint   dpram_base_align(uint align);
 uint   dpram_alloc(uint size);
 uint   dpram_alloc_align(uint size,uint align);
-void   post_word_store (ulong);
-ulong  post_word_load (void);
 void   bootcount_store (ulong);
 ulong  bootcount_load (void);
 #define BOOTCOUNT_MAGIC                0xB001C041
@@ -640,12 +643,14 @@ static inline IPaddr_t getenv_IPaddr (char *var)
 /* lib/qsort.c */
 void qsort(void *base, size_t nmemb, size_t size,
           int(*compar)(const void *, const void *));
+int strcmp_compar(const void *, const void *);
 
 /* lib/time.c */
 void   udelay        (unsigned long);
 
 /* 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, ...)
@@ -655,7 +660,7 @@ int sprintf(char * buf, const char *fmt, ...)
 int    vsprintf(char *buf, const char *fmt, va_list args);
 
 /* lib/strmhz.c */
-char * strmhz(char *buf, long hz);
+char * strmhz(char *buf, unsigned long hz);
 
 /* lib/crc32.c */
 #include <u-boot/crc.h>
@@ -663,7 +668,7 @@ char *      strmhz(char *buf, long hz);
 /* common/console.c */
 int    console_init_f(void);   /* Before relocation; uses the serial  stuff    */
 int    console_init_r(void);   /* After  relocation; uses the console stuff    */
-int    console_assign (int file, char *devname);       /* Assign the console   */
+int    console_assign(int file, const char *devname);  /* Assign the console   */
 int    ctrlc (void);
 int    had_ctrlc (void);       /* have we had a Control-C since last clear? */
 void   clear_ctrlc (void);     /* clear the Control-C condition */
@@ -737,6 +742,9 @@ int cpu_release(int nr, int argc, char * const argv[]);
 
 #ifdef CONFIG_POST
 #define CONFIG_HAS_POST
+#ifndef CONFIG_POST_ALT_LIST
+#define CONFIG_POST_STD_LIST
+#endif
 #endif
 
 #ifdef CONFIG_INIT_CRITICAL