X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=include%2Fcommon.h;h=21c05db3f47e110e3e2e93f807399016bc1fda76;hb=9dd5dad88777a7c6a63f8c103706b57364a135f4;hp=189ad8122b6445797a55bb597a0f581694057925;hpb=25ddd1fb0a2281b182529afbc8fda5de2dc16d96;p=u-boot diff --git a/include/common.h b/include/common.h index 189ad8122b..21c05db3f4 100644 --- a/include/common.h +++ b/include/common.h @@ -180,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) @@ -270,9 +272,9 @@ int setenv (char *, char *); # include # include /* ARM version to be fixed! */ #endif /* CONFIG_ARM */ -#ifdef CONFIG_I386 /* x86 version to be fixed! */ -# include -#endif /* CONFIG_I386 */ +#ifdef CONFIG_X86 /* x86 version to be fixed! */ +# include +#endif /* CONFIG_X86 */ #ifdef CONFIG_AUTO_COMPLETE int env_complete(char *var, int maxv, char *cmdv[], int maxsz, char *buf); @@ -538,6 +540,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) @@ -632,6 +638,7 @@ 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); @@ -647,7 +654,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 @@ -655,7 +662,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 */