summaryrefslogtreecommitdiffstats
path: root/drivers/usb/musb/blackfin.h
diff options
context:
space:
mode:
authorBryan Wu <cooloney@kernel.org>2008-12-02 21:33:44 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2009-01-07 10:00:07 -0800
commit0c6a8818447d38f7bb0b0013448659113d37a3e1 (patch)
treec4c7451232c6fdc9db1d4a51757c4e24ef2dcb4d /drivers/usb/musb/blackfin.h
parent2ffcdb3bdadaf8260986e96384df26c94a6ad42c (diff)
downloadop-kernel-dev-0c6a8818447d38f7bb0b0013448659113d37a3e1.zip
op-kernel-dev-0c6a8818447d38f7bb0b0013448659113d37a3e1.tar.gz
USB: musb: add Blackfin driver to MUSB framework (v2)
- replace MUSB_FIFOSIZE register to MUSB_TXCOUNT, cause no MUSB_FIFOSIZE register on Blackfin - use #ifdef to replace #if defined() Signed-off-by: Bryan Wu <cooloney@kernel.org> Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/musb/blackfin.h')
-rw-r--r--drivers/usb/musb/blackfin.h52
1 files changed, 52 insertions, 0 deletions
diff --git a/drivers/usb/musb/blackfin.h b/drivers/usb/musb/blackfin.h
new file mode 100644
index 0000000..a240c1e
--- /dev/null
+++ b/drivers/usb/musb/blackfin.h
@@ -0,0 +1,52 @@
+/*
+ * Copyright (C) 2007 by Analog Devices, Inc.
+ *
+ * The Inventra Controller Driver for Linux is free software; you
+ * can redistribute it and/or modify it under the terms of the GNU
+ * General Public License version 2 as published by the Free Software
+ * Foundation.
+ */
+
+#ifndef __MUSB_BLACKFIN_H__
+#define __MUSB_BLACKFIN_H__
+
+/*
+ * Blackfin specific definitions
+ */
+
+#undef DUMP_FIFO_DATA
+#ifdef DUMP_FIFO_DATA
+static void dump_fifo_data(u8 *buf, u16 len)
+{
+ u8 *tmp = buf;
+ int i;
+
+ for (i = 0; i < len; i++) {
+ if (!(i % 16) && i)
+ pr_debug("\n");
+ pr_debug("%02x ", *tmp++);
+ }
+ pr_debug("\n");
+}
+#else
+#define dump_fifo_data(buf, len) do {} while (0)
+#endif
+
+#ifdef CONFIG_BF52x
+
+#define USB_DMA_BASE USB_DMA_INTERRUPT
+#define USB_DMAx_CTRL 0x04
+#define USB_DMAx_ADDR_LOW 0x08
+#define USB_DMAx_ADDR_HIGH 0x0C
+#define USB_DMAx_COUNT_LOW 0x10
+#define USB_DMAx_COUNT_HIGH 0x14
+
+#define USB_DMA_REG(ep, reg) (USB_DMA_BASE + 0x20 * ep + reg)
+#endif
+
+/* Almost 1 second */
+#define TIMER_DELAY (1 * HZ)
+
+static struct timer_list musb_conn_timer;
+
+#endif /* __MUSB_BLACKFIN_H__ */
OpenPOWER on IntegriCloud