aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/musb/blackfin.h
diff options
context:
space:
mode:
authorBryan Wu <cooloney@kernel.org>2008-12-02 14:33:44 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2009-01-07 13:00:07 -0500
commit0c6a8818447d38f7bb0b0013448659113d37a3e1 (patch)
treec4c7451232c6fdc9db1d4a51757c4e24ef2dcb4d /drivers/usb/musb/blackfin.h
parent2ffcdb3bdadaf8260986e96384df26c94a6ad42c (diff)
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 000000000000..a240c1e53d16
--- /dev/null
+++ b/drivers/usb/musb/blackfin.h
@@ -0,0 +1,52 @@
1/*
2 * Copyright (C) 2007 by Analog Devices, Inc.
3 *
4 * The Inventra Controller Driver for Linux is free software; you
5 * can redistribute it and/or modify it under the terms of the GNU
6 * General Public License version 2 as published by the Free Software
7 * Foundation.
8 */
9
10#ifndef __MUSB_BLACKFIN_H__
11#define __MUSB_BLACKFIN_H__
12
13/*
14 * Blackfin specific definitions
15 */
16
17#undef DUMP_FIFO_DATA
18#ifdef DUMP_FIFO_DATA
19static void dump_fifo_data(u8 *buf, u16 len)
20{
21 u8 *tmp = buf;
22 int i;
23
24 for (i = 0; i < len; i++) {
25 if (!(i % 16) && i)
26 pr_debug("\n");
27 pr_debug("%02x ", *tmp++);
28 }
29 pr_debug("\n");
30}
31#else
32#define dump_fifo_data(buf, len) do {} while (0)
33#endif
34
35#ifdef CONFIG_BF52x
36
37#define USB_DMA_BASE USB_DMA_INTERRUPT
38#define USB_DMAx_CTRL 0x04
39#define USB_DMAx_ADDR_LOW 0x08
40#define USB_DMAx_ADDR_HIGH 0x0C
41#define USB_DMAx_COUNT_LOW 0x10
42#define USB_DMAx_COUNT_HIGH 0x14
43
44#define USB_DMA_REG(ep, reg) (USB_DMA_BASE + 0x20 * ep + reg)
45#endif
46
47/* Almost 1 second */
48#define TIMER_DELAY (1 * HZ)
49
50static struct timer_list musb_conn_timer;
51
52#endif /* __MUSB_BLACKFIN_H__ */