Merge git://git.denx.de/u-boot-i2c
[platform/kernel/u-boot.git] / include / common.h
index c1bdaec..46f07fe 100644 (file)
@@ -73,6 +73,9 @@ typedef volatile unsigned char        vu_char;
 #ifdef CONFIG_ARM
 #define asmlinkage     /* nothing */
 #endif
+#ifdef CONFIG_X86
+#define asmlinkage __attribute__((regparm(0)))
+#endif
 #ifdef CONFIG_BLACKFIN
 #include <asm/blackfin.h>
 #endif
@@ -97,15 +100,19 @@ typedef volatile unsigned char     vu_char;
 #define _DEBUG 0
 #endif
 
+#ifndef pr_fmt
+#define pr_fmt(fmt) fmt
+#endif
+
 /*
  * Output a debug text when condition "cond" is met. The "cond" should be
  * computed by a preprocessor in the best case, allowing for the best
  * optimization.
  */
-#define debug_cond(cond, fmt, args...)         \
-       do {                                    \
-               if (cond)                       \
-                       printf(fmt, ##args);    \
+#define debug_cond(cond, fmt, args...)                 \
+       do {                                            \
+               if (cond)                               \
+                       printf(pr_fmt(fmt), ##args);    \
        } while (0)
 
 #define debug(fmt, args...)                    \
@@ -127,7 +134,7 @@ void __assert_fail(const char *assertion, const char *file, unsigned line,
                __assert_fail(#x, __FILE__, __LINE__, __func__); })
 
 #define error(fmt, args...) do {                                       \
-               printf("ERROR: " fmt "\nat %s:%d/%s()\n",               \
+               printf("ERROR: " pr_fmt(fmt) "\nat %s:%d/%s()\n",       \
                        ##args, __FILE__, __LINE__, __func__);          \
 } while (0)
 
@@ -438,11 +445,6 @@ extern ssize_t spi_read     (uchar *, int, uchar *, int);
 extern ssize_t spi_write (uchar *, int, uchar *, int);
 #endif
 
-#ifdef CONFIG_HERMES
-/* $(BOARD)/hermes.c */
-void hermes_start_lxt980 (int speed);
-#endif
-
 #ifdef CONFIG_EVB64260
 void  evb64260_init(void);
 void  debug_led(int, int);
@@ -967,7 +969,7 @@ static inline phys_addr_t map_to_sysmem(const void *ptr)
  * Usage of this macro shall be avoided or used with extreme care!
  */
 #define DEFINE_ALIGN_BUFFER(type, name, size, align)                   \
-       static char __##name[roundup(size * sizeof(type), align)]       \
+       static char __##name[ALIGN(size * sizeof(type), align)] \
                        __aligned(align);                               \
                                                                        \
        static type *name = (type *)__##name