linux-compat.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #ifndef __LINUX_COMPAT_H__
  2. #define __LINUX_COMPAT_H__
  3. #include <malloc.h>
  4. #include <linux/list.h>
  5. #include <linux/compat.h>
  6. #define pr_debug(fmt, args...) debug(fmt, ##args)
  7. #define WARN(condition, fmt, args...) ({ \
  8. int ret_warn = !!condition; \
  9. if (ret_warn) \
  10. printf(fmt, ##args); \
  11. ret_warn; })
  12. #define writesl(a, d, s) __raw_writesl((unsigned long)a, d, s)
  13. #define readsl(a, d, s) __raw_readsl((unsigned long)a, d, s)
  14. #define writesw(a, d, s) __raw_writesw((unsigned long)a, d, s)
  15. #define readsw(a, d, s) __raw_readsw((unsigned long)a, d, s)
  16. #define writesb(a, d, s) __raw_writesb((unsigned long)a, d, s)
  17. #define readsb(a, d, s) __raw_readsb((unsigned long)a, d, s)
  18. #define device_init_wakeup(dev, a) do {} while (0)
  19. #define platform_data device_data
  20. #ifndef wmb
  21. #define wmb() asm volatile ("" : : : "memory")
  22. #endif
  23. #define msleep(a) udelay(a * 1000)
  24. /*
  25. * Map U-Boot config options to Linux ones
  26. */
  27. #ifdef CONFIG_OMAP34XX
  28. #define CONFIG_SOC_OMAP3430
  29. #endif
  30. #ifdef CONFIG_OMAP4430
  31. #define CONFIG_ARCH_OMAP4
  32. #endif
  33. #endif /* __LINUX_COMPAT_H__ */