2 * Copyright (C) 2010-2013 Freescale Semiconductor, Inc. All Rights Reserved.
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 #include <uapi/linux/pxp_dma.h>
25 struct dma_async_tx_descriptor txd;
26 struct list_head tx_list;
27 struct list_head list;
30 struct pxp_layer_param s0_param;
31 struct pxp_layer_param out_param;
32 struct pxp_layer_param ol_param;
34 struct pxp_proc_data proc_data;
36 u32 hist_status; /* Histogram output status */
38 struct pxp_tx_desc *next;
42 struct dma_chan dma_chan;
43 dma_cookie_t completed; /* last completed cookie */
44 enum pxp_channel_status status;
45 void *client; /* Only one client per channel */
46 unsigned int n_tx_desc;
47 struct pxp_tx_desc *desc; /* allocated tx-descriptors */
48 struct list_head queue; /* queued tx-descriptors */
49 struct list_head list; /* track queued channel number */
50 spinlock_t lock; /* protects sg[0,1], queue,
51 * status, cookie, free_list
55 char eof_name[16]; /* EOF IRQ name for request_irq() */
58 #define to_tx_desc(tx) container_of(tx, struct pxp_tx_desc, txd)
59 #define to_pxp_channel(d) container_of(d, struct pxp_channel, dma_chan)
61 void pxp_txd_ack(struct dma_async_tx_descriptor *txd,
62 struct pxp_channel *pxp_chan);
64 #ifdef CONFIG_MXC_PXP_CLIENT_DEVICE
65 int register_pxp_device(void);
66 void unregister_pxp_device(void);
68 int register_pxp_device(void) { return 0; }
69 void unregister_pxp_device(void) {}