]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - include/common.h
Merge branch 'master' of http://www.denx.de/git/u-boot
[karo-tx-uboot.git] / include / common.h
index 8000dd01f3a6de87d9b785132bb7504a07fd05e9..0cd0d4ca00336b6c8e1d716201f6eecc5f410646 100644 (file)
@@ -113,6 +113,12 @@ typedef volatile unsigned char     vu_char;
 #define debugX(level,fmt,args...)
 #endif /* DEBUG */
 
+#define BUG() do { \
+        printf("BUG: failure at %s:%d/%s()!\n", __FILE__, __LINE__, __FUNCTION__); \
+       panic("BUG!"); \
+} while (0)
+#define BUG_ON(condition) do { if (unlikely((condition)!=0)) BUG(); } while(0)
+
 typedef void (interrupt_handler_t)(void *);
 
 #include <asm/u-boot.h> /* boot information for Linux kernel */