Full support for Ginger Console
[linux-ginger.git] / drivers / usb / musb / cppi41_dma.h
blob34004ee02e955df22568151772038568718cbcb3
1 /*
2 * Copyright (C) 2005-2006 by Texas Instruments
3 * Copyright (c) 2008, MontaVista Software, Inc. <source@mvista.com>
5 * This program is free software; you can distribute it and/or modify it
6 * under the terms of the GNU General Public License (Version 2) as
7 * published by the Free Software Foundation.
9 * This program is distributed in the hope it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * for more details.
14 * You should have received a copy of the GNU General Public License along
15 * with this program; if not, write to the Free Software Foundation, Inc.,
16 * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
20 #ifndef _CPPI41_DMA_H_
21 #define _CPPI41_DMA_H_
22 #include <plat/usb.h>
24 /**
25 * struct usb_cppi41_info - CPPI 4.1 USB implementation details
26 * @dma_block: DMA block number
27 * @ep_dma_ch: DMA channel numbers used for EPs 1 .. Max_EP
28 * @q_mgr: queue manager number
29 * @num_tx_comp_q: number of the Tx completion queues
30 * @num_rx_comp_q: number of the Rx queues
31 * @tx_comp_q: pointer to the list of the Tx completion queue numbers
32 * @rx_comp_q: pointer to the list of the Rx queue numbers
34 struct usb_cppi41_info {
35 u8 dma_block;
36 u8 ep_dma_ch[USB_CPPI41_NUM_CH];
37 u8 q_mgr;
38 u8 num_tx_comp_q;
39 u8 num_rx_comp_q;
40 const u16 *tx_comp_q;
41 const u16 *rx_comp_q;
44 extern const struct usb_cppi41_info usb_cppi41_info;
46 /**
47 * cppi41_completion - Tx/Rx completion queue interrupt handling hook
48 * @musb: the controller
49 * @rx: bitmask having bit N set if Rx queue N is not empty
50 * @tx: bitmask having bit N set if Tx completion queue N is not empty
52 void cppi41_completion(struct musb *musb, u32 rx, u32 tx);
54 /**
55 * cppi41_disable_sched_rx
57 int cppi41_disable_sched_rx(void);
59 /**
60 * cppi41_enable_sched_rx
62 int cppi41_enable_sched_rx(void);
63 #endif /* _CPPI41_DMA_H_ */