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 
8 #define __init
9 #define __devinit
10 #define __devinitdata
11 #define __devinitconst
12 #define __iomem
13 #define __deprecated
14 
15 struct unused {};
16 typedef struct unused unused_t;
17 
18 typedef int irqreturn_t;
19 typedef unused_t spinlock_t;
20 
21 struct work_struct {};
22 
23 struct timer_list {};
24 struct notifier_block {};
25 
26 typedef 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)
35 #define del_timer_sync(timer) do {} while (0)
36 #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)
42 
43 #define WARN(condition, fmt, args...) ({	\
44 	int ret_warn = !!condition;		\
45 	if (ret_warn)				\
46 		printf(fmt, ##args);		\
47 	ret_warn; })
48 
49 #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 
89 #define msleep(a)	udelay(a * 1000)
90 
91 /*
92  * Map U-Boot config options to Linux ones
93  */
94 #ifdef CONFIG_OMAP34XX
95 #define CONFIG_SOC_OMAP3430
96 #endif
97 
98 #endif /* __LINUX_COMPAT_H__ */
99