blob: a240c1e53d16e16bf3acf214b2847b79d8643965 [file] [log] [blame]
Bryan Wu0c6a8812008-12-02 21:33:44 +02001/*
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__ */