[PATCH 7/9] staging: comedi: addi_apci_1564: move register map defines to driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Move the defines for the register map from the included source file to
the main driver source file.

Signed-off-by: H Hartley Sweeten <hsweeten@xxxxxxxxxxxxxxxxxxx>
Cc: Ian Abbott <abbotti@xxxxxxxxx>
Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 .../comedi/drivers/addi-data/hwdrv_apci1564.c      | 41 -------------------
 drivers/staging/comedi/drivers/addi_apci_1564.c    | 47 ++++++++++++++++++++++
 2 files changed, 47 insertions(+), 41 deletions(-)

diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c
index 153b9e3..8eebece 100644
--- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c
+++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c
@@ -18,47 +18,6 @@
 #define ADDIDATA_WATCHDOG				2
 
 /*
- * PCI BAR 1 Register Map (dev->iobase)
- */
-#define APCI1564_DI_REG					0x04
-#define APCI1564_DI_INT_MODE1_REG			0x08
-#define APCI1564_DI_INT_MODE2_REG			0x0c
-#define APCI1564_DI_INT_STATUS_REG			0x10
-#define APCI1564_DI_IRQ_REG				0x14
-#define APCI1564_DO_REG					0x18
-#define APCI1564_DO_INT_CTRL_REG			0x1c
-#define APCI1564_DO_INT_STATUS_REG			0x20
-#define APCI1564_DO_IRQ_REG				0x24
-#define APCI1564_WDOG_REG				0x28
-#define APCI1564_WDOG_RELOAD_REG			0x2c
-#define APCI1564_WDOG_TIMEBASE_REG			0x30
-#define APCI1564_WDOG_CTRL_REG				0x34
-#define APCI1564_WDOG_STATUS_REG			0x38
-#define APCI1564_WDOG_IRQ_REG				0x3c
-#define APCI1564_WDOG_WARN_TIMEVAL_REG			0x40
-#define APCI1564_WDOG_WARN_TIMEBASE_REG			0x44
-#define APCI1564_TIMER_REG				0x48
-#define APCI1564_TIMER_RELOAD_REG			0x4c
-#define APCI1564_TIMER_TIMEBASE_REG			0x50
-#define APCI1564_TIMER_CTRL_REG				0x54
-#define APCI1564_TIMER_STATUS_REG			0x58
-#define APCI1564_TIMER_IRQ_REG				0x5c
-#define APCI1564_TIMER_WARN_TIMEVAL_REG			0x60
-#define APCI1564_TIMER_WARN_TIMEBASE_REG		0x64
-
-/*
- * PCI BAR 2 Register Map (devpriv->counters)
- */
-#define APCI1564_COUNTER_REG(x)				(0x00 + ((x) * 0x20))
-#define APCI1564_COUNTER_RELOAD_REG(x)			(0x04 + ((x) * 0x20))
-#define APCI1564_COUNTER_TIMEBASE_REG(x)		(0x08 + ((x) * 0x20))
-#define APCI1564_COUNTER_CTRL_REG(x)			(0x0c + ((x) * 0x20))
-#define APCI1564_COUNTER_STATUS_REG(x)			(0x10 + ((x) * 0x20))
-#define APCI1564_COUNTER_IRQ_REG(x)			(0x14 + ((x) * 0x20))
-#define APCI1564_COUNTER_WARN_TIMEVAL_REG(x)		(0x18 + ((x) * 0x20))
-#define APCI1564_COUNTER_WARN_TIMEBASE_REG(x)		(0x1c + ((x) * 0x20))
-
-/*
  * Configures The Timer or Counter
  *
  * data[0] Configure as: 0 = Timer, 1 = Counter
diff --git a/drivers/staging/comedi/drivers/addi_apci_1564.c b/drivers/staging/comedi/drivers/addi_apci_1564.c
index 47a1c14..b8bcfb9 100644
--- a/drivers/staging/comedi/drivers/addi_apci_1564.c
+++ b/drivers/staging/comedi/drivers/addi_apci_1564.c
@@ -31,6 +31,53 @@
 #include "amcc_s5933.h"
 #include "addi_watchdog.h"
 
+/*
+ * PCI BAR 0 Register Map
+ * see amcc_s5933.h for register and bit defines
+ */
+
+/*
+ * PCI BAR 1 Register Map (dev->iobase)
+ */
+#define APCI1564_EEPROM_REG			0x00
+#define APCI1564_DI_REG				0x04
+#define APCI1564_DI_INT_MODE1_REG		0x08
+#define APCI1564_DI_INT_MODE2_REG		0x0c
+#define APCI1564_DI_INT_STATUS_REG		0x10
+#define APCI1564_DI_IRQ_REG			0x14
+#define APCI1564_DO_REG				0x18
+#define APCI1564_DO_INT_CTRL_REG		0x1c
+#define APCI1564_DO_INT_STATUS_REG		0x20
+#define APCI1564_DO_IRQ_REG			0x24
+#define APCI1564_WDOG_REG			0x28
+#define APCI1564_WDOG_RELOAD_REG		0x2c
+#define APCI1564_WDOG_TIMEBASE_REG		0x30
+#define APCI1564_WDOG_CTRL_REG			0x34
+#define APCI1564_WDOG_STATUS_REG		0x38
+#define APCI1564_WDOG_IRQ_REG			0x3c
+#define APCI1564_WDOG_WARN_TIMEVAL_REG		0x40
+#define APCI1564_WDOG_WARN_TIMEBASE_REG		0x44
+#define APCI1564_TIMER_REG			0x48
+#define APCI1564_TIMER_RELOAD_REG		0x4c
+#define APCI1564_TIMER_TIMEBASE_REG		0x50
+#define APCI1564_TIMER_CTRL_REG			0x54
+#define APCI1564_TIMER_STATUS_REG		0x58
+#define APCI1564_TIMER_IRQ_REG			0x5c
+#define APCI1564_TIMER_WARN_TIMEVAL_REG		0x60
+#define APCI1564_TIMER_WARN_TIMEBASE_REG	0x64
+
+/*
+ * PCI BAR 2 Register Map (devpriv->counters)
+ */
+#define APCI1564_COUNTER_REG(x)			(0x00 + ((x) * 0x20))
+#define APCI1564_COUNTER_RELOAD_REG(x)		(0x04 + ((x) * 0x20))
+#define APCI1564_COUNTER_TIMEBASE_REG(x)	(0x08 + ((x) * 0x20))
+#define APCI1564_COUNTER_CTRL_REG(x)		(0x0c + ((x) * 0x20))
+#define APCI1564_COUNTER_STATUS_REG(x)		(0x10 + ((x) * 0x20))
+#define APCI1564_COUNTER_IRQ_REG(x)		(0x14 + ((x) * 0x20))
+#define APCI1564_COUNTER_WARN_TIMEVAL_REG(x)	(0x18 + ((x) * 0x20))
+#define APCI1564_COUNTER_WARN_TIMEBASE_REG(x)	(0x1c + ((x) * 0x20))
+
 struct apci1564_private {
 	unsigned long amcc;
 	unsigned long counters;
-- 
2.0.3

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




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux