blob: d7a5663deb31aa12dc04408937e3e0800257a437 [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
8#define __init
9#define __devinit
10#define __devinitdata
11#define __devinitconst
12#define __iomem
13#define __deprecated
14
Ilya Yanokeb819552012-11-06 13:48:21 +000015struct unused {};
16typedef struct unused unused_t;
17
18typedef int irqreturn_t;
19typedef unused_t spinlock_t;
20
21struct work_struct {};
22
23struct timer_list {};
24struct notifier_block {};
25
26typedef unsigned long dmaaddr_t;
27
28#define spin_lock_init(lock) do {} while (0)
29#define spin_lock(lock) do {} while (0)
30#define spin_unlock(lock) do {} while (0)
31#define spin_lock_irqsave(lock, flags) do {} while (0)
32#define spin_unlock_irqrestore(lock, flags) do {} while (0)
33
34#define setup_timer(timer, func, data) do {} while (0)
Ilya Yanok673a5242012-11-06 13:48:29 +000035#define del_timer_sync(timer) do {} while (0)
Ilya Yanokeb819552012-11-06 13:48:21 +000036#define schedule_work(work) do {} while (0)
37#define INIT_WORK(work, fun) do {} while (0)
38
39#define cpu_relax() do {} while (0)
40
41#define pr_debug(fmt, args...) debug(fmt, ##args)
Ilya Yanokeb819552012-11-06 13:48:21 +000042
43#define WARN(condition, fmt, args...) ({ \
44 int ret_warn = !!condition; \
45 if (ret_warn) \
46 printf(fmt, ##args); \
47 ret_warn; })
48
Ilya Yanokeb819552012-11-06 13:48:21 +000049#define pm_runtime_get_sync(dev) do {} while (0)
50#define pm_runtime_put(dev) do {} while (0)
51#define pm_runtime_put_sync(dev) do {} while (0)
52#define pm_runtime_use_autosuspend(dev) do {} while (0)
53#define pm_runtime_set_autosuspend_delay(dev, delay) do {} while (0)
54#define pm_runtime_enable(dev) do {} while (0)
55
56#define MODULE_DESCRIPTION(desc)
57#define MODULE_AUTHOR(author)
58#define MODULE_LICENSE(license)
59#define MODULE_ALIAS(alias)
60#define module_param(name, type, perm)
61#define MODULE_PARM_DESC(name, desc)
62#define EXPORT_SYMBOL_GPL(name)
63
64#define writesl(a, d, s) __raw_writesl((unsigned long)a, d, s)
65#define readsl(a, d, s) __raw_readsl((unsigned long)a, d, s)
66#define writesw(a, d, s) __raw_writesw((unsigned long)a, d, s)
67#define readsw(a, d, s) __raw_readsw((unsigned long)a, d, s)
68#define writesb(a, d, s) __raw_writesb((unsigned long)a, d, s)
69#define readsb(a, d, s) __raw_readsb((unsigned long)a, d, s)
70
71#define IRQ_NONE 0
72#define IRQ_HANDLED 0
73
74#define dev_set_drvdata(dev, data) do {} while (0)
75
76#define disable_irq_wake(irq) do {} while (0)
77#define enable_irq_wake(irq) -EINVAL
78#define free_irq(irq, data) do {} while (0)
79#define request_irq(nr, f, flags, nm, data) 0
80
81#define device_init_wakeup(dev, a) do {} while (0)
82
83#define platform_data device_data
84
85#ifndef wmb
86#define wmb() asm volatile ("" : : : "memory")
87#endif
88
Ilya Yanok833a53c2012-11-06 13:48:25 +000089#define msleep(a) udelay(a * 1000)
Ilya Yanok673a5242012-11-06 13:48:29 +000090
91/*
92 * Map U-Boot config options to Linux ones
93 */
94#ifdef CONFIG_OMAP34XX
95#define CONFIG_SOC_OMAP3430
96#endif
97
Ilya Yanokeb819552012-11-06 13:48:21 +000098#endif /* __LINUX_COMPAT_H__ */