diff options
Diffstat (limited to 'drivers/comedi')
-rw-r--r-- | drivers/comedi/drivers/comedi_isadma.c | 3 | ||||
-rw-r--r-- | drivers/comedi/drivers/comedi_isadma.h | 114 | ||||
-rw-r--r-- | drivers/comedi/drivers/das16.c | 3 | ||||
-rw-r--r-- | drivers/comedi/drivers/das1800.c | 3 | ||||
-rw-r--r-- | drivers/comedi/drivers/dt282x.c | 3 | ||||
-rw-r--r-- | drivers/comedi/drivers/ni_at_a2150.c | 3 | ||||
-rw-r--r-- | drivers/comedi/drivers/ni_labpc_isadma.c | 2 | ||||
-rw-r--r-- | drivers/comedi/drivers/pcl812.c | 3 | ||||
-rw-r--r-- | drivers/comedi/drivers/pcl816.c | 3 | ||||
-rw-r--r-- | drivers/comedi/drivers/pcl818.c | 3 |
10 files changed, 9 insertions, 131 deletions
diff --git a/drivers/comedi/drivers/comedi_isadma.c b/drivers/comedi/drivers/comedi_isadma.c index 63457bd4ff78..700982464c53 100644 --- a/drivers/comedi/drivers/comedi_isadma.c +++ b/drivers/comedi/drivers/comedi_isadma.c @@ -10,8 +10,7 @@ #include <linux/dma-mapping.h> #include <asm/dma.h> #include <linux/comedi/comedidev.h> - -#include "comedi_isadma.h" +#include <linux/comedi/comedi_isadma.h> /** * comedi_isadma_program - program and enable an ISA DMA transfer diff --git a/drivers/comedi/drivers/comedi_isadma.h b/drivers/comedi/drivers/comedi_isadma.h deleted file mode 100644 index 9d2b12db7e6e..000000000000 --- a/drivers/comedi/drivers/comedi_isadma.h +++ /dev/null @@ -1,114 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* - * COMEDI ISA DMA support functions - * Copyright (c) 2014 H Hartley Sweeten <hsweeten@visionengravers.com> - */ - -#ifndef _COMEDI_ISADMA_H -#define _COMEDI_ISADMA_H - -#include <linux/types.h> - -struct comedi_device; -struct device; - -/* - * These are used to avoid issues when <asm/dma.h> and the DMA_MODE_ - * defines are not available. - */ -#define COMEDI_ISADMA_READ 0 -#define COMEDI_ISADMA_WRITE 1 - -/** - * struct comedi_isadma_desc - cookie for ISA DMA - * @virt_addr: virtual address of buffer - * @hw_addr: hardware (bus) address of buffer - * @chan: DMA channel - * @maxsize: allocated size of buffer (in bytes) - * @size: transfer size (in bytes) - * @mode: DMA_MODE_READ or DMA_MODE_WRITE - */ -struct comedi_isadma_desc { - void *virt_addr; - dma_addr_t hw_addr; - unsigned int chan; - unsigned int maxsize; - unsigned int size; - char mode; -}; - -/** - * struct comedi_isadma - ISA DMA data - * @dev: device to allocate non-coherent memory for - * @desc: cookie for each DMA buffer - * @n_desc: the number of cookies - * @cur_dma: the current cookie in use - * @chan: the first DMA channel requested - * @chan2: the second DMA channel requested - */ -struct comedi_isadma { - struct device *dev; - struct comedi_isadma_desc *desc; - int n_desc; - int cur_dma; - unsigned int chan; - unsigned int chan2; -}; - -#if IS_ENABLED(CONFIG_ISA_DMA_API) - -void comedi_isadma_program(struct comedi_isadma_desc *desc); -unsigned int comedi_isadma_disable(unsigned int dma_chan); -unsigned int comedi_isadma_disable_on_sample(unsigned int dma_chan, - unsigned int size); -unsigned int comedi_isadma_poll(struct comedi_isadma *dma); -void comedi_isadma_set_mode(struct comedi_isadma_desc *desc, char dma_dir); - -struct comedi_isadma *comedi_isadma_alloc(struct comedi_device *dev, - int n_desc, unsigned int dma_chan1, - unsigned int dma_chan2, - unsigned int maxsize, char dma_dir); -void comedi_isadma_free(struct comedi_isadma *dma); - -#else /* !IS_ENABLED(CONFIG_ISA_DMA_API) */ - -static inline void comedi_isadma_program(struct comedi_isadma_desc *desc) -{ -} - -static inline unsigned int comedi_isadma_disable(unsigned int dma_chan) -{ - return 0; -} - -static inline unsigned int -comedi_isadma_disable_on_sample(unsigned int dma_chan, unsigned int size) -{ - return 0; -} - -static inline unsigned int comedi_isadma_poll(struct comedi_isadma *dma) -{ - return 0; -} - -static inline void comedi_isadma_set_mode(struct comedi_isadma_desc *desc, - char dma_dir) -{ -} - -static inline struct comedi_isadma * -comedi_isadma_alloc(struct comedi_device *dev, int n_desc, - unsigned int dma_chan1, unsigned int dma_chan2, - unsigned int maxsize, char dma_dir) -{ - return NULL; -} - -static inline void comedi_isadma_free(struct comedi_isadma *dma) -{ -} - -#endif /* !IS_ENABLED(CONFIG_ISA_DMA_API) */ - -#endif /* #ifndef _COMEDI_ISADMA_H */ diff --git a/drivers/comedi/drivers/das16.c b/drivers/comedi/drivers/das16.c index f6649ffa9670..937a69ce0977 100644 --- a/drivers/comedi/drivers/das16.c +++ b/drivers/comedi/drivers/das16.c @@ -66,8 +66,7 @@ #include <linux/comedi/comedidev.h> #include <linux/comedi/comedi_8255.h> #include <linux/comedi/comedi_8254.h> - -#include "comedi_isadma.h" +#include <linux/comedi/comedi_isadma.h> #define DAS16_DMA_SIZE 0xff00 /* size in bytes of allocated dma buffer */ diff --git a/drivers/comedi/drivers/das1800.c b/drivers/comedi/drivers/das1800.c index a43d3414a122..f09608c0f4ff 100644 --- a/drivers/comedi/drivers/das1800.c +++ b/drivers/comedi/drivers/das1800.c @@ -75,8 +75,7 @@ #include <linux/io.h> #include <linux/comedi/comedidev.h> #include <linux/comedi/comedi_8254.h> - -#include "comedi_isadma.h" +#include <linux/comedi/comedi_isadma.h> /* misc. defines */ #define DAS1800_SIZE 16 /* uses 16 io addresses */ diff --git a/drivers/comedi/drivers/dt282x.c b/drivers/comedi/drivers/dt282x.c index 078f8fba7183..4ae80e6c7266 100644 --- a/drivers/comedi/drivers/dt282x.c +++ b/drivers/comedi/drivers/dt282x.c @@ -52,8 +52,7 @@ #include <linux/interrupt.h> #include <linux/io.h> #include <linux/comedi/comedidev.h> - -#include "comedi_isadma.h" +#include <linux/comedi/comedi_isadma.h> /* * Register map diff --git a/drivers/comedi/drivers/ni_at_a2150.c b/drivers/comedi/drivers/ni_at_a2150.c index 9942d770add8..df8d219e6723 100644 --- a/drivers/comedi/drivers/ni_at_a2150.c +++ b/drivers/comedi/drivers/ni_at_a2150.c @@ -41,8 +41,7 @@ #include <linux/io.h> #include <linux/comedi/comedidev.h> #include <linux/comedi/comedi_8254.h> - -#include "comedi_isadma.h" +#include <linux/comedi/comedi_isadma.h> #define A2150_DMA_BUFFER_SIZE 0xff00 /* size in bytes of dma buffer */ diff --git a/drivers/comedi/drivers/ni_labpc_isadma.c b/drivers/comedi/drivers/ni_labpc_isadma.c index dd37ec0d9b15..0652ca8345b6 100644 --- a/drivers/comedi/drivers/ni_labpc_isadma.c +++ b/drivers/comedi/drivers/ni_labpc_isadma.c @@ -11,8 +11,8 @@ #include <linux/module.h> #include <linux/slab.h> #include <linux/comedi/comedidev.h> +#include <linux/comedi/comedi_isadma.h> -#include "comedi_isadma.h" #include "ni_labpc.h" #include "ni_labpc_regs.h" #include "ni_labpc_isadma.h" diff --git a/drivers/comedi/drivers/pcl812.c b/drivers/comedi/drivers/pcl812.c index 790f54476a91..70dbc129fcf5 100644 --- a/drivers/comedi/drivers/pcl812.c +++ b/drivers/comedi/drivers/pcl812.c @@ -116,8 +116,7 @@ #include <linux/io.h> #include <linux/comedi/comedidev.h> #include <linux/comedi/comedi_8254.h> - -#include "comedi_isadma.h" +#include <linux/comedi/comedi_isadma.h> /* * Register I/O map diff --git a/drivers/comedi/drivers/pcl816.c b/drivers/comedi/drivers/pcl816.c index 77b30246d966..a5e5320be648 100644 --- a/drivers/comedi/drivers/pcl816.c +++ b/drivers/comedi/drivers/pcl816.c @@ -37,8 +37,7 @@ #include <linux/interrupt.h> #include <linux/comedi/comedidev.h> #include <linux/comedi/comedi_8254.h> - -#include "comedi_isadma.h" +#include <linux/comedi/comedi_isadma.h> /* * Register I/O map diff --git a/drivers/comedi/drivers/pcl818.c b/drivers/comedi/drivers/pcl818.c index e5b7793cce05..29e503de8267 100644 --- a/drivers/comedi/drivers/pcl818.c +++ b/drivers/comedi/drivers/pcl818.c @@ -99,8 +99,7 @@ #include <linux/interrupt.h> #include <linux/comedi/comedidev.h> #include <linux/comedi/comedi_8254.h> - -#include "comedi_isadma.h" +#include <linux/comedi/comedi_isadma.h> /* * Register I/O map |