All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Abbott <abbotti@mev.co.uk>
To: driverdev-devel@linuxdriverproject.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Ian Abbott <abbotti@mev.co.uk>, Bernd Porr <mail@berndporr.me.uk>,
	H Hartley Sweeten <hartleys@visionengravers.com>
Subject: [PATCH 03/12] staging: comedi: ni_labpc_isadma: new module for ISA DMA support
Date: Fri, 28 Jun 2013 17:09:19 +0100	[thread overview]
Message-ID: <1372435768-7428-4-git-send-email-abbotti@mev.co.uk> (raw)
In-Reply-To: <1372435768-7428-1-git-send-email-abbotti@mev.co.uk>

It's just an empty module at the moment, selected by COMEDI_NI_LABPC_ISA
&& ISA_DMA_API && VIRT_TO_BUS, but will be populated by later patches to
migrate ISA DMA support for NI Lab-PC cards out of the "ni_labpc"
module.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
---
 drivers/staging/comedi/Kconfig                   |  4 +++
 drivers/staging/comedi/drivers/Makefile          |  1 +
 drivers/staging/comedi/drivers/ni_labpc.c        |  1 +
 drivers/staging/comedi/drivers/ni_labpc_isadma.c | 37 ++++++++++++++++++++++++
 drivers/staging/comedi/drivers/ni_labpc_isadma.h | 16 ++++++++++
 5 files changed, 59 insertions(+)
 create mode 100644 drivers/staging/comedi/drivers/ni_labpc_isadma.c
 create mode 100644 drivers/staging/comedi/drivers/ni_labpc_isadma.h

diff --git a/drivers/staging/comedi/Kconfig b/drivers/staging/comedi/Kconfig
index 8c8a551..faecf67 100644
--- a/drivers/staging/comedi/Kconfig
+++ b/drivers/staging/comedi/Kconfig
@@ -473,6 +473,7 @@ config COMEDI_NI_ATMIO16D
 config COMEDI_NI_LABPC_ISA
 	tristate "NI Lab-PC and compatibles ISA support"
 	select COMEDI_NI_LABPC
+	select COMEDI_NI_LABPC_ISADMA if ISA_DMA_API && VIRT_TO_BUS
 	depends on VIRT_TO_BUS
 	---help---
 	  Enable support for National Instruments Lab-PC and compatibles
@@ -1262,6 +1263,9 @@ config COMEDI_NI_LABPC
 	select COMEDI_8255
 	select COMEDI_FC
 
+config COMEDI_NI_LABPC_ISADMA
+	tristate
+
 config COMEDI_NI_TIO
 	tristate
 
diff --git a/drivers/staging/comedi/drivers/Makefile b/drivers/staging/comedi/drivers/Makefile
index dbb93e3..3fdca81 100644
--- a/drivers/staging/comedi/drivers/Makefile
+++ b/drivers/staging/comedi/drivers/Makefile
@@ -132,6 +132,7 @@ obj-$(CONFIG_COMEDI_MITE)		+= mite.o
 obj-$(CONFIG_COMEDI_NI_TIO)		+= ni_tio.o
 obj-$(CONFIG_COMEDI_NI_TIOCMD)		+= ni_tiocmd.o
 obj-$(CONFIG_COMEDI_NI_LABPC)		+= ni_labpc.o
+obj-$(CONFIG_COMEDI_NI_LABPC_ISADMA)	+= ni_labpc_isadma.o
 
 obj-$(CONFIG_COMEDI_8255)		+= 8255.o
 obj-$(CONFIG_COMEDI_AMPLC_DIO200)	+= amplc_dio200_common.o
diff --git a/drivers/staging/comedi/drivers/ni_labpc.c b/drivers/staging/comedi/drivers/ni_labpc.c
index 7dec029..41f1674 100644
--- a/drivers/staging/comedi/drivers/ni_labpc.c
+++ b/drivers/staging/comedi/drivers/ni_labpc.c
@@ -70,6 +70,7 @@
 #include "8255.h"
 #include "comedi_fc.h"
 #include "ni_labpc.h"
+#include "ni_labpc_isadma.h"
 
 /*
  * Register map (all registers are 8-bit)
diff --git a/drivers/staging/comedi/drivers/ni_labpc_isadma.c b/drivers/staging/comedi/drivers/ni_labpc_isadma.c
new file mode 100644
index 0000000..586ea54
--- /dev/null
+++ b/drivers/staging/comedi/drivers/ni_labpc_isadma.c
@@ -0,0 +1,37 @@
+/*
+ * comedi/drivers/ni_labpc_isadma.c
+ * ISA DMA support for National Instruments Lab-PC series boards and
+ * compatibles.
+ *
+ * Extracted from ni_labpc.c:
+ * Copyright (C) 2001-2003 Frank Mori Hess <fmhess@users.sourceforge.net>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#include <linux/module.h>
+
+#include "ni_labpc_isadma.h"
+
+static int __init ni_labpc_isadma_init_module(void)
+{
+	return 0;
+}
+module_init(ni_labpc_isadma_init_module);
+
+static void __exit ni_labpc_isadma_cleanup_module(void)
+{
+}
+module_exit(ni_labpc_isadma_cleanup_module);
+
+MODULE_AUTHOR("Comedi http://www.comedi.org");
+MODULE_DESCRIPTION("Comedi NI Lab-PC ISA DMA support");
+MODULE_LICENSE("GPL");
diff --git a/drivers/staging/comedi/drivers/ni_labpc_isadma.h b/drivers/staging/comedi/drivers/ni_labpc_isadma.h
new file mode 100644
index 0000000..ac644f0
--- /dev/null
+++ b/drivers/staging/comedi/drivers/ni_labpc_isadma.h
@@ -0,0 +1,16 @@
+/*
+ * ni_labpc ISA DMA support.
+*/
+
+#ifndef _NI_LABPC_ISADMA_H
+#define _NI_LABPC_ISADMA_H
+
+#define NI_LABPC_HAVE_ISA_DMA	IS_ENABLED(CONFIG_COMEDI_NI_LABPC_ISADMA)
+
+#if NI_LABPC_HAVE_ISA_DMA
+
+#else
+
+#endif
+
+#endif /* _NI_LABPC_ISADMA_H */
-- 
1.8.2.1

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

  parent reply	other threads:[~2013-06-28 16:09 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-28 16:09 [PATCH 00/12] staging: comedi: ni_labpc: split out ISA DMA support Ian Abbott
2013-06-28 16:09 ` [PATCH 01/12] staging: comedi: ni_labpc: fix possible double-free of dma_buffer Ian Abbott
2013-06-28 16:09 ` [PATCH 02/12] staging: comedi: ni_labpc: don't clear cmd3 bits explicitly in labpc_ai_cmd() Ian Abbott
2013-06-28 16:09 ` Ian Abbott [this message]
2013-06-28 16:09 ` [PATCH 04/12] staging: comedi: ni_labpc: migrate DMA channel init & free Ian Abbott
2013-06-28 16:09 ` [PATCH 05/12] staging: comedi: ni_labpc_isadma: add labpc_have_dma_chan() Ian Abbott
2013-06-28 16:09 ` [PATCH 06/12] staging: comedi: ni_labpc: use labpc_have_dma_chan() Ian Abbott
2013-06-28 16:09 ` [PATCH 07/12] staging: comedi: ni_labpc: move register defs to new file Ian Abbott
2013-06-28 16:09 ` [PATCH 08/12] staging: comedi: ni_labpc: migrate DMA transfer set-up Ian Abbott
2013-06-28 16:09 ` [PATCH 09/12] staging: comedi: ni_labpc: migrate labpc_drain_dma() Ian Abbott
2013-06-28 16:09 ` [PATCH 10/12] staging: comedi: ni_labpc: migrate DMA status handling Ian Abbott
2013-06-28 16:09 ` [PATCH 11/12] staging: comedi: ni_labpc: tidy up after DMA code migration Ian Abbott
2013-06-28 16:09 ` [PATCH 12/12] staging: comedi: COMEDI_NI_LABPC_ISA no longer depends on VIRT_TO_BUS Ian Abbott

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1372435768-7428-4-git-send-email-abbotti@mev.co.uk \
    --to=abbotti@mev.co.uk \
    --cc=driverdev-devel@linuxdriverproject.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hartleys@visionengravers.com \
    --cc=mail@berndporr.me.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.