aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH Hartley Sweeten <[email protected]>2014-11-10 16:20:15 -0700
committerGreg Kroah-Hartman <[email protected]>2014-11-26 15:31:33 -0800
commit1a69a887d69250778e5493fcebc6e95d1c625d20 (patch)
tree3b49f3b401c6b343abdec829a1d200cec13f01bb
parent3a2cf2f971b7128b1daff50abbd88c766b458544 (diff)
staging: comedi: addi_apci_1564: move counter register defines to driver
Move the defines for the counter registers from the included source file to the main driver source file. Signed-off-by: H Hartley Sweeten <[email protected]> Reviewed-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
-rw-r--r--drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c12
-rw-r--r--drivers/staging/comedi/drivers/addi_apci_1564.c13
2 files changed, 13 insertions, 12 deletions
diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c
index b689303cbf0c..af37df713a37 100644
--- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c
+++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c
@@ -18,18 +18,6 @@
#define ADDIDATA_WATCHDOG 2
/*
- * devpriv->counters Register Map
- */
-#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 3fb9cc06973d..958eb7d29be2 100644
--- a/drivers/staging/comedi/drivers/addi_apci_1564.c
+++ b/drivers/staging/comedi/drivers/addi_apci_1564.c
@@ -107,6 +107,19 @@
#define APCI1564_TIMER_WARN_TIMEVAL_REG 0x18 /* Rev 2.x only */
#define APCI1564_TIMER_WARN_TIMEBASE_REG 0x1c /* Rev 2.x only */
+/*
+ * devpriv->counters Register Map
+ * PLD Revision 2.x - PCI BAR 1 + 0x00
+ */
+#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 eeprom; /* base address of EEPROM register */
unsigned long timer; /* base address of 12-bit timer */