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