summaryrefslogtreecommitdiff
path: root/include/usb/lin_gadget_compat.h
diff options
context:
space:
mode:
authorLukasz Majewski <l.majewski@samsung.com>2011-10-27 10:36:46 +0200
committerRemy Bohmer <linux@bohmer.net>2011-12-11 14:44:40 +0100
commit38517a7821d531aabe8e14a3806a7913b14a57b2 (patch)
tree405bc0d8c0bf84206d94e4a51776347d5cbb7010 /include/usb/lin_gadget_compat.h
parent5f4b4f2fed3ab8590c8c06b78642f8c1467acacf (diff)
downloadu-boot-imx-38517a7821d531aabe8e14a3806a7913b14a57b2.zip
u-boot-imx-38517a7821d531aabe8e14a3806a7913b14a57b2.tar.gz
u-boot-imx-38517a7821d531aabe8e14a3806a7913b14a57b2.tar.bz2
usb:gadget:s5p USB Device Controller (UDC) implementation
This commit provides UDC driver support for Samsung's SoC family of processors. Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Cc: Minkyu Kang <mk7.kang@samsung.com> Cc: Remy Bohmer <linux@bohmer.net>
Diffstat (limited to 'include/usb/lin_gadget_compat.h')
-rw-r--r--include/usb/lin_gadget_compat.h62
1 files changed, 62 insertions, 0 deletions
diff --git a/include/usb/lin_gadget_compat.h b/include/usb/lin_gadget_compat.h
new file mode 100644
index 0000000..9b31511
--- /dev/null
+++ b/include/usb/lin_gadget_compat.h
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2011 Samsung Electronics
+ * Lukasz Majewski <l.majewski@samsung.com>
+ *
+ * This is a Linux kernel compatibility layer for USB Gadget
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#ifndef __LIN_COMPAT_H__
+#define __LIN_COMPAT_H__
+
+/* common */
+#define spin_lock_init(...)
+#define spin_lock(...)
+#define spin_lock_irqsave(lock, flags) do {flags = 1; } while (0)
+#define spin_unlock(...)
+#define spin_unlock_irqrestore(lock, flags) do {flags = 0; } while (0)
+#define disable_irq(...)
+#define enable_irq(...)
+
+#define mutex_init(...)
+#define mutex_lock(...)
+#define mutex_unlock(...)
+
+#define WARN_ON(x) if (x) {printf("WARNING in %s line %d\n" \
+ , __FILE__, __LINE__); }
+
+#define KERN_WARNING
+#define KERN_ERR
+#define KERN_NOTICE
+#define KERN_DEBUG
+
+#define GFP_KERNEL 0
+
+#define IRQ_HANDLED 1
+
+#define ENOTSUPP 524 /* Operation is not supported */
+
+#define kmalloc(size, type) memalign(CONFIG_SYS_CACHELINE_SIZE, size)
+#define kfree(addr) free(addr)
+#define mdelay(n) ({unsigned long msec = (n); while (msec--) udelay(1000); })
+
+#define __iomem
+#define min_t min
+#define dma_cache_maint(addr, size, mode) cache_flush()
+void cache_flush(void);
+
+#endif /* __LIN_COMPAT_H__ */