blob: 1fc9391b8e0f6951fd81b825a66c8a24c46dd4c6 [file] [log] [blame]
Ilya Yanok06bb9202012-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 Yanok06bb9202012-11-06 13:48:21 +00008#define pr_debug(fmt, args...) debug(fmt, ##args)
Ilya Yanok06bb9202012-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 Yanok06bb9202012-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 Yanok06bb9202012-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 Yanokcc0fcbf2012-11-06 13:48:25 +000031#define msleep(a) udelay(a * 1000)
Ilya Yanoka3292f22012-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
Paul Kocialkowskid5a43ba2016-02-27 19:19:05 +010040#ifdef CONFIG_OMAP4430
41#define CONFIG_ARCH_OMAP4
42#endif
43
Ilya Yanok06bb9202012-11-06 13:48:21 +000044#endif /* __LINUX_COMPAT_H__ */