Merge branch 'mini2440-dev-unlikely' into mini2440-dev
[linux-2.6/mini2440.git] / drivers / usb / musb / blackfin.h
bloba240c1e53d16e16bf3acf214b2847b79d8643965
1 /*
2 * Copyright (C) 2007 by Analog Devices, Inc.
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 */
10 #ifndef __MUSB_BLACKFIN_H__
11 #define __MUSB_BLACKFIN_H__
14 * Blackfin specific definitions
17 #undef DUMP_FIFO_DATA
18 #ifdef DUMP_FIFO_DATA
19 static void dump_fifo_data(u8 *buf, u16 len)
21 u8 *tmp = buf;
22 int i;
24 for (i = 0; i < len; i++) {
25 if (!(i % 16) && i)
26 pr_debug("\n");
27 pr_debug("%02x ", *tmp++);
29 pr_debug("\n");
31 #else
32 #define dump_fifo_data(buf, len) do {} while (0)
33 #endif
35 #ifdef CONFIG_BF52x
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
44 #define USB_DMA_REG(ep, reg) (USB_DMA_BASE + 0x20 * ep + reg)
45 #endif
47 /* Almost 1 second */
48 #define TIMER_DELAY (1 * HZ)
50 static struct timer_list musb_conn_timer;
52 #endif /* __MUSB_BLACKFIN_H__ */