Merge tag 'block-5.11-2021-01-10' of git://git.kernel.dk/linux-block
[linux/fpc-iii.git] / drivers / media / pci / cobalt / cobalt-omnitek.h
blob129c5fccbe3958f863c3eda1c1a9cfb66b77a329
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3 * Omnitek Scatter-Gather DMA Controller
5 * Copyright 2012-2015 Cisco Systems, Inc. and/or its affiliates.
6 * All rights reserved.
7 */
9 #ifndef COBALT_OMNITEK_H
10 #define COBALT_OMNITEK_H
12 #include <linux/scatterlist.h>
13 #include "cobalt-driver.h"
15 struct sg_dma_descriptor {
16 u32 pci_l;
17 u32 pci_h;
19 u32 local;
20 u32 reserved0;
22 u32 next_l;
23 u32 next_h;
25 u32 bytes;
26 u32 reserved1;
29 int omni_sg_dma_init(struct cobalt *cobalt);
30 void omni_sg_dma_abort_channel(struct cobalt_stream *s);
31 void omni_sg_dma_start(struct cobalt_stream *s, struct sg_dma_desc_info *desc);
32 bool is_dma_done(struct cobalt_stream *s);
34 int descriptor_list_create(struct cobalt *cobalt,
35 struct scatterlist *scatter_list, bool to_pci, unsigned sglen,
36 unsigned size, unsigned width, unsigned stride,
37 struct sg_dma_desc_info *desc);
39 void descriptor_list_chain(struct sg_dma_desc_info *this,
40 struct sg_dma_desc_info *next);
41 void descriptor_list_loopback(struct sg_dma_desc_info *desc);
42 void descriptor_list_end_of_chain(struct sg_dma_desc_info *desc);
44 void *descriptor_list_allocate(struct sg_dma_desc_info *desc, size_t bytes);
45 void descriptor_list_free(struct sg_dma_desc_info *desc);
47 void descriptor_list_interrupt_enable(struct sg_dma_desc_info *desc);
48 void descriptor_list_interrupt_disable(struct sg_dma_desc_info *desc);
50 #endif