mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-12-11 05:42:58 +00:00
0c06db5983
- move linux specific defines from usb and video code into linux/compat.h - move common linux specific defines from include/ubi_uboot.h to linux/compat.h - add for new mtd/ubi/ubifs sync new needed linux specific defines to linux/compat.h Signed-off-by: Heiko Schocher <hs@denx.de> Cc: Marek Vasut <marex@denx.de> Cc: Anatolij Gustschin <agust@denx.de> [trini: Add spin_lock_irqsave/spin_unlock_irqrestore dummies from usb/lin_gadet_compat.h] Signed-off-by: Tom Rini <trini@ti.com>
40 lines
1,021 B
C
40 lines
1,021 B
C
#ifndef __LINUX_COMPAT_H__
|
|
#define __LINUX_COMPAT_H__
|
|
|
|
#include <malloc.h>
|
|
#include <linux/list.h>
|
|
#include <linux/compat.h>
|
|
|
|
#define pr_debug(fmt, args...) debug(fmt, ##args)
|
|
|
|
#define WARN(condition, fmt, args...) ({ \
|
|
int ret_warn = !!condition; \
|
|
if (ret_warn) \
|
|
printf(fmt, ##args); \
|
|
ret_warn; })
|
|
|
|
#define writesl(a, d, s) __raw_writesl((unsigned long)a, d, s)
|
|
#define readsl(a, d, s) __raw_readsl((unsigned long)a, d, s)
|
|
#define writesw(a, d, s) __raw_writesw((unsigned long)a, d, s)
|
|
#define readsw(a, d, s) __raw_readsw((unsigned long)a, d, s)
|
|
#define writesb(a, d, s) __raw_writesb((unsigned long)a, d, s)
|
|
#define readsb(a, d, s) __raw_readsb((unsigned long)a, d, s)
|
|
|
|
#define device_init_wakeup(dev, a) do {} while (0)
|
|
|
|
#define platform_data device_data
|
|
|
|
#ifndef wmb
|
|
#define wmb() asm volatile ("" : : : "memory")
|
|
#endif
|
|
|
|
#define msleep(a) udelay(a * 1000)
|
|
|
|
/*
|
|
* Map U-Boot config options to Linux ones
|
|
*/
|
|
#ifdef CONFIG_OMAP34XX
|
|
#define CONFIG_SOC_OMAP3430
|
|
#endif
|
|
|
|
#endif /* __LINUX_COMPAT_H__ */
|