blob: 46f83d9b36024abc8f2b7b697b52fbdd2177510c [file] [log] [blame]
Ilya Yanokeb819552012-11-06 13:48:21 +00001#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 Yanokeb819552012-11-06 13:48:21 +00008#define pr_debug(fmt, args...) debug(fmt, ##args)
Ilya Yanokeb819552012-11-06 13:48:21 +00009
10#define WARN(condition, fmt, args...) ({ \
11 int ret_warn = !!condition; \
12 if (ret_warn) \
13 printf(fmt, ##args); \
14 ret_warn; })
15
Ilya Yanokeb819552012-11-06 13:48:21 +000016#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 Yanokeb819552012-11-06 13:48:21 +000023#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 Yanok833a53c2012-11-06 13:48:25 +000031#define msleep(a) udelay(a * 1000)
Ilya Yanok673a5242012-11-06 13:48:29 +000032
33/*
34 * Map U-Boot config options to Linux ones
35 */
36#ifdef CONFIG_OMAP34XX
37#define CONFIG_SOC_OMAP3430
38#endif
39
Ilya Yanokeb819552012-11-06 13:48:21 +000040#endif /* __LINUX_COMPAT_H__ */