]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - include/common.h
arm: ls102xa: Add LPUART support for LS1021AQDS board
[karo-tx-uboot.git] / include / common.h
index c1bdaeccaa48800fcff919fe9a4cc599dcceb2de..4b3e0d3bbd75adb6fe1a78e3ff1710de5df08297 100644 (file)
@@ -70,9 +70,6 @@ typedef volatile unsigned char        vu_char;
 #ifdef CONFIG_4xx
 #include <asm/ppc4xx.h>
 #endif
-#ifdef CONFIG_ARM
-#define asmlinkage     /* nothing */
-#endif
 #ifdef CONFIG_BLACKFIN
 #include <asm/blackfin.h>
 #endif
@@ -97,15 +94,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 +128,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)
 
@@ -414,10 +415,6 @@ int  eeprom_probe (unsigned dev_addr, unsigned offset);
 #endif
 int  eeprom_read  (unsigned dev_addr, unsigned offset, uchar *buffer, unsigned cnt);
 int  eeprom_write (unsigned dev_addr, unsigned offset, uchar *buffer, unsigned cnt);
-#ifdef CONFIG_LWMON
-extern uchar pic_read  (uchar reg);
-extern void  pic_write (uchar reg, uchar val);
-#endif
 
 /*
  * Set this up regardless of board
@@ -438,18 +435,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);
-void  display_mem_map(void);
-void  perform_soft_reset(void);
-#endif
-
 /* $(BOARD)/$(BOARD).c */
 int board_early_init_f (void);
 int board_late_init (void);
@@ -494,10 +479,6 @@ ulong      get_endaddr   (void);
 void   trap_init     (ulong);
 #if defined (CONFIG_4xx)       || \
     defined (CONFIG_MPC5xxx)   || \
-    defined (CONFIG_74xx_7xx)  || \
-    defined (CONFIG_74x)       || \
-    defined (CONFIG_75x)       || \
-    defined (CONFIG_74xx)      || \
     defined (CONFIG_MPC85xx)   || \
     defined (CONFIG_MPC86xx)   || \
     defined (CONFIG_MPC83xx)
@@ -967,7 +948,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