From c46321d9b897a79030260aed9079037593ff369c Mon Sep 17 00:00:00 2001
From: Jonathan Hanks <jonathan.hanks@ligo.org>
Date: Thu, 13 Jan 2022 12:05:38 -0800
Subject: [PATCH] Renaming the ligo_iomap.h and LIGO_IOREMAP to be more
 general.

 * ligo_iomap.h becomes iomap_selection.h to denote what it actually does.
 * LIGO_IOREMAP becomes simply IOREMAP to note that it isn't LIGO specific.
---
 src/drv/mmap.rfm.5565/mmap5565.c      |  4 ++--
 src/drv/mmap.rfm.5579/mmap5579.c      |  6 +++---
 src/drv/mmap.rfm/mmap.c               |  6 +++---
 src/include/drv/gsc16ai64.c           |  6 +++---
 src/include/drv/gsc16ao16.c           |  6 +++---
 src/include/drv/gsc18ai32.c           |  6 +++---
 src/include/drv/gsc18ai64.c           |  6 +++---
 src/include/drv/gsc18ao8.c            |  6 +++---
 src/include/drv/gsc20ao8.c            |  6 +++---
 src/include/drv/ioremap_selection.h   | 21 +++++++++++++++++++++
 src/include/drv/ligoPcieTiming_core.c |  4 ++--
 src/include/drv/ligo_ioremap.h        | 16 ----------------
 src/include/drv/spectracomGPS.c       |  4 ++--
 src/include/drv/symmetricomGps.c      |  6 +++---
 src/include/drv/vmic5565.c            |  8 ++++----
 15 files changed, 58 insertions(+), 53 deletions(-)
 create mode 100644 src/include/drv/ioremap_selection.h
 delete mode 100644 src/include/drv/ligo_ioremap.h

diff --git a/src/drv/mmap.rfm.5565/mmap5565.c b/src/drv/mmap.rfm.5565/mmap5565.c
index b4c1dcb1e..436586ad6 100644
--- a/src/drv/mmap.rfm.5565/mmap5565.c
+++ b/src/drv/mmap.rfm.5565/mmap5565.c
@@ -253,7 +253,7 @@ unsigned long mapcard(struct pci_dev *pcidev, int memsize) {
         }
 
 
-  pRfmMem = LIGO_IOREMAP((unsigned long)pci_io_addr, memsize);
+  pRfmMem = IOREMAP((unsigned long)pci_io_addr, memsize);
   kmalloc_area[rfm_cnt] = pci_io_addr;
   printk("VMIC%x protected address=0x%lx\n", rfmType, (unsigned long)pRfmMem);
 
@@ -261,7 +261,7 @@ unsigned long mapcard(struct pci_dev *pcidev, int memsize) {
                  rfmType == 0x5565? PCI_BASE_ADDRESS_2:PCI_BASE_ADDRESS_1,
                  &csrAddress);
   printk("CSR address is 0x%x\n",csrAddress);
-  csrAddr = LIGO_IOREMAP((unsigned long)csrAddress, 0x40);
+  csrAddr = IOREMAP((unsigned long)csrAddress, 0x40);
 
   if(rfmType == 0x5565) {
           p5565Csr = (VMIC5565_CSR *)csrAddr;
diff --git a/src/drv/mmap.rfm.5579/mmap5579.c b/src/drv/mmap.rfm.5579/mmap5579.c
index 830fa09bd..38599cfb7 100644
--- a/src/drv/mmap.rfm.5579/mmap5579.c
+++ b/src/drv/mmap.rfm.5579/mmap5579.c
@@ -12,7 +12,7 @@
 #  include <linux/modversions.h>
 #endif
 #include <asm/io.h>
-#include "ligo_ioremap.h"
+#include "ioremap_selection.h"
 
 #define VMIC_VID                0x114a
 #define VMIC_TID                0x5565
@@ -253,7 +253,7 @@ unsigned long mapcard(struct pci_dev *pcidev, int memsize) {
         }
 
 
-  pRfmMem = LIGO_IOREMAP((unsigned long)pci_io_addr, memsize);
+  pRfmMem = IOREMAP((unsigned long)pci_io_addr, memsize);
   kmalloc_area[rfm_cnt] = pci_io_addr;
   printk("VMIC%x protected address=0x%lx\n", rfmType, (unsigned long)pRfmMem);
 
@@ -261,7 +261,7 @@ unsigned long mapcard(struct pci_dev *pcidev, int memsize) {
                  rfmType == 0x5565? PCI_BASE_ADDRESS_2:PCI_BASE_ADDRESS_1,
                  &csrAddress);
   printk("CSR address is 0x%x\n",csrAddress);
-  csrAddr = LIGO_IOREMAP((unsigned long)csrAddress, 0x40);
+  csrAddr = IOREMAP((unsigned long)csrAddress, 0x40);
 
   if(rfmType == 0x5565) {
           p5565Csr = (VMIC5565_CSR *)csrAddr;
diff --git a/src/drv/mmap.rfm/mmap.c b/src/drv/mmap.rfm/mmap.c
index 489734edb..4b9aa6d57 100644
--- a/src/drv/mmap.rfm/mmap.c
+++ b/src/drv/mmap.rfm/mmap.c
@@ -12,7 +12,7 @@
 #  include <linux/modversions.h>
 #endif
 #include <asm/io.h>
-#include "ligo_ioremap.h"
+#include "ioremap_selection.h"
 
 #define VMIC_VID                0x114a
 #define VMIC_TID                0x5565
@@ -253,7 +253,7 @@ unsigned long mapcard(struct pci_dev *pcidev, int memsize) {
         }
 
 
-  pRfmMem = LIGO_IOREMAP((unsigned long)pci_io_addr, memsize);
+  pRfmMem = IOREMAP((unsigned long)pci_io_addr, memsize);
   kmalloc_area[rfm_cnt] = pci_io_addr;
   printk("VMIC%x protected address=0x%lx\n", rfmType, (unsigned long)pRfmMem);
 
@@ -261,7 +261,7 @@ unsigned long mapcard(struct pci_dev *pcidev, int memsize) {
                  rfmType == 0x5565? PCI_BASE_ADDRESS_2:PCI_BASE_ADDRESS_1,
                  &csrAddress);
   printk("CSR address is 0x%x\n",csrAddress);
-  csrAddr = LIGO_IOREMAP((unsigned long)csrAddress, 0x40);
+  csrAddr = IOREMAP((unsigned long)csrAddress, 0x40);
 
   if(rfmType == 0x5565) {
           p5565Csr = (VMIC5565_CSR *)csrAddr;
diff --git a/src/include/drv/gsc16ai64.c b/src/include/drv/gsc16ai64.c
index d874cec78..9dbb37bd8 100644
--- a/src/include/drv/gsc16ai64.c
+++ b/src/include/drv/gsc16ai64.c
@@ -10,7 +10,7 @@
 
 #include "gsc_adc_common.h"
 #include "gsc16ai64.h"
-#include "ligo_ioremap.h"
+#include "ioremap_selection.h"
 
 // *****************************************************************************
 /// \brief Routine to initialize GSC 16bit, 32 channel ADC modules
@@ -50,7 +50,7 @@ gsc16ai64Init( CDS_HARDWARE* pHardware, struct pci_dev* adcdev )
         return -1;
     printk( "pci0 = 0x%x\n", pci_io_addr );
     /// Map module DMA space directly to computer memory space.
-    _adc_add = LIGO_IOREMAP( (unsigned long)pci_io_addr, 0x200 );
+    _adc_add = IOREMAP( (unsigned long)pci_io_addr, 0x200 );
     /// Map the module DMA control registers via PLX chip registers
     adcDma[ devNum ] = (PLX_9056_DMA*)_adc_add;
 
@@ -60,7 +60,7 @@ gsc16ai64Init( CDS_HARDWARE* pHardware, struct pci_dev* adcdev )
         return -1;
     printk( "pci2 = 0x%x\n", pci_io_addr );
     /// Map the module control register so local memory space.
-    _adc_add = LIGO_IOREMAP( (unsigned long)pci_io_addr, 0x200 );
+    _adc_add = IOREMAP( (unsigned long)pci_io_addr, 0x200 );
     printk( "ADC I/O address=0x%x  0x%lx\n", pci_io_addr, (long)_adc_add );
     /// Set global ptr to control register memory space.
     _adcPtr[ devNum ] = (GSA_ADC_REG*)_adc_add;
diff --git a/src/include/drv/gsc16ao16.c b/src/include/drv/gsc16ao16.c
index 77552a29a..91ffa997b 100644
--- a/src/include/drv/gsc16ao16.c
+++ b/src/include/drv/gsc16ao16.c
@@ -10,7 +10,7 @@
 
 #include "gsc_dac_common.h"
 #include "gsc16ao16.h"
-#include "ligo_ioremap.h"
+#include "ioremap_selection.h"
 
 // *****************************************************************************
 /// \brief Routine to initialize GSC 16AO16 DAC modules.
@@ -44,7 +44,7 @@ gsc16ao16Init( CDS_HARDWARE* pHardware, struct pci_dev* dacdev )
     if(pedStatus != 0)
         return -1;
     printk( "pci0 = 0x%x\n", pci_io_addr );
-    _dac_add = LIGO_IOREMAP( (unsigned long)pci_io_addr, 0x200 );
+    _dac_add = IOREMAP( (unsigned long)pci_io_addr, 0x200 );
     /// Set up a pointer to DMA registers on PLX chip
     dacDma[ devNum ] = (PLX_9056_DMA*)_dac_add;
 
@@ -53,7 +53,7 @@ gsc16ao16Init( CDS_HARDWARE* pHardware, struct pci_dev* dacdev )
     if(pedStatus != 0)
         return -1;
     printk( "dac pci2 = 0x%x\n", pci_io_addr );
-    _dac_add = LIGO_IOREMAP( (unsigned long)pci_io_addr, 0x200 );
+    _dac_add = IOREMAP( (unsigned long)pci_io_addr, 0x200 );
     printk( "DAC I/O address=0x%x  0x%lx\n", pci_io_addr, (long)_dac_add );
     _dacPtr[ devNum ] = (GSC_DAC_REG*)_dac_add;
 
diff --git a/src/include/drv/gsc18ai32.c b/src/include/drv/gsc18ai32.c
index 8297e7bc9..740c20e43 100644
--- a/src/include/drv/gsc18ai32.c
+++ b/src/include/drv/gsc18ai32.c
@@ -6,7 +6,7 @@
 
 #include "gsc_adc_common.h"
 #include "gsc18ai32.h"
-#include "ligo_ioremap.h"
+#include "ioremap_selection.h"
 
 // *****************************************************************************
 /// \brief Routine to initialize GSC 18bit, 32 channel ADC modules
@@ -44,7 +44,7 @@ gsc18ai32Init( CDS_HARDWARE* pHardware, struct pci_dev* adcdev )
         return -1;
     printk( "pci0 = 0x%x\n", pci_io_addr );
     /// Map module DMA space directly to computer memory space.
-    _adc_add = LIGO_IOREMAP( (unsigned long)pci_io_addr, 0x200 );
+    _adc_add = IOREMAP( (unsigned long)pci_io_addr, 0x200 );
     /// Map the module DMA control registers via PLX chip registers
     adcDma[ devNum ] = (PLX_9056_DMA*)_adc_add;
 
@@ -54,7 +54,7 @@ gsc18ai32Init( CDS_HARDWARE* pHardware, struct pci_dev* adcdev )
         return -1;
     printk( "pci2 = 0x%x\n", pci_io_addr );
     /// Map the module control register so local memory space.
-    _adc_add = LIGO_IOREMAP( (unsigned long)pci_io_addr, 0x200 );
+    _adc_add = IOREMAP( (unsigned long)pci_io_addr, 0x200 );
     printk( "ADC 18 I/O address=0x%x  0x%lx\n", pci_io_addr, (long)_adc_add );
     /// Set global ptr to control register memory space.
     adc18Ptr = (GSA_ADC_REG*)_adc_add;
diff --git a/src/include/drv/gsc18ai64.c b/src/include/drv/gsc18ai64.c
index ba77e487b..4206418e8 100644
--- a/src/include/drv/gsc18ai64.c
+++ b/src/include/drv/gsc18ai64.c
@@ -6,7 +6,7 @@
 
 #include "gsc_adc_common.h"
 #include "gsc18ai64.h"
-#include "ligo_ioremap.h"
+#include "ioremap_selection.h"
 
 // *****************************************************************************
 /// \brief Routine to initialize GSC 18bit, 64 channel ADC modules
@@ -44,7 +44,7 @@ gsc18ai64Init( CDS_HARDWARE* pHardware, struct pci_dev* adcdev )
         return -1;
     printk( "pci0 = 0x%x\n", pci_io_addr );
     /// Map module DMA space directly to computer memory space.
-    _adc_add = LIGO_IOREMAP( (unsigned long)pci_io_addr, 0x200 );
+    _adc_add = IOREMAP( (unsigned long)pci_io_addr, 0x200 );
     /// Map the module DMA control registers via PLX chip registers
     adcDma[ devNum ] = (PLX_9056_DMA*)_adc_add;
 
@@ -54,7 +54,7 @@ gsc18ai64Init( CDS_HARDWARE* pHardware, struct pci_dev* adcdev )
         return -1;
     printk( "pci2 = 0x%x\n", pci_io_addr );
     /// Map the module control register so local memory space.
-    _adc_add = LIGO_IOREMAP( (unsigned long)pci_io_addr, 0x200 );
+    _adc_add = IOREMAP( (unsigned long)pci_io_addr, 0x200 );
     printk( "ADC I/O address=0x%x  0x%lx\n", pci_io_addr, (long)_adc_add );
     /// Set global ptr to control register memory space.
     adc18Ptr = (GSA_ADC_REG*)_adc_add;
diff --git a/src/include/drv/gsc18ao8.c b/src/include/drv/gsc18ao8.c
index c736c232b..350e29f1f 100644
--- a/src/include/drv/gsc18ao8.c
+++ b/src/include/drv/gsc18ao8.c
@@ -10,7 +10,7 @@
 
 #include "gsc_dac_common.h"
 #include "gsc18ao8.h"
-#include "ligo_ioremap.h"
+#include "ioremap_selection.h"
 
 // *****************************************************************************
 /// \brief Routine to initialize GSC 18AO8 DAC modules.
@@ -49,7 +49,7 @@ gsc18ao8Init( CDS_HARDWARE* pHardware, struct pci_dev* dacdev )
     if(pedStatus != 0)
         return -1;
     printk( "pci0 = 0x%x\n", pci_io_addr );
-    _dac_add = LIGO_IOREMAP( (unsigned long)pci_io_addr, 0x200 );
+    _dac_add = IOREMAP( (unsigned long)pci_io_addr, 0x200 );
     /// Set up a pointer to DMA registers on PLX chip
     dacDma[ devNum ] = (PLX_9056_DMA*)_dac_add;
 
@@ -58,7 +58,7 @@ gsc18ao8Init( CDS_HARDWARE* pHardware, struct pci_dev* dacdev )
     if(pedStatus != 0)
         return -1;
     printk( "dac pci2 = 0x%x\n", pci_io_addr );
-    _dac_add = LIGO_IOREMAP( (unsigned long)pci_io_addr, 0x200 );
+    _dac_add = IOREMAP( (unsigned long)pci_io_addr, 0x200 );
     printk( "DAC I/O address=0x%x  0x%lx\n", pci_io_addr, (long)_dac_add );
 
     dac18bitPtr = (GSC_DAC_REG*)_dac_add;
diff --git a/src/include/drv/gsc20ao8.c b/src/include/drv/gsc20ao8.c
index be3f6f40d..e0ec9e1dd 100644
--- a/src/include/drv/gsc20ao8.c
+++ b/src/include/drv/gsc20ao8.c
@@ -10,7 +10,7 @@
 
 #include "gsc_dac_common.h"
 #include "gsc20ao8.h"
-#include "ligo_ioremap.h"
+#include "ioremap_selection.h"
 
 // *****************************************************************************
 /// \brief Routine to initialize GSC 20AO8 DAC modules.
@@ -47,7 +47,7 @@ gsc20ao8Init( CDS_HARDWARE* pHardware, struct pci_dev* dacdev )
     if(pedStatus != 0)
         return -1;
     printk( "pci0 = 0x%x\n", pci_io_addr );
-    _dac_add = LIGO_IOREMAP( (unsigned long)pci_io_addr, 0x200 );
+    _dac_add = IOREMAP( (unsigned long)pci_io_addr, 0x200 );
     /// Set up a pointer to DMA registers on PLX chip
     dacDma[ devNum ] = (PLX_9056_DMA*)_dac_add;
 
@@ -57,7 +57,7 @@ gsc20ao8Init( CDS_HARDWARE* pHardware, struct pci_dev* dacdev )
         return -1;
     // Send some info to dmesg
     printk( "dac pci2 = 0x%x\n", pci_io_addr );
-    _dac_add = LIGO_IOREMAP( (unsigned long)pci_io_addr, 0x200 );
+    _dac_add = IOREMAP( (unsigned long)pci_io_addr, 0x200 );
     // Send some info to dmesg
     printk( "DAC I/O address=0x%x  0x%lx\n", pci_io_addr, (long)_dac_add );
 
diff --git a/src/include/drv/ioremap_selection.h b/src/include/drv/ioremap_selection.h
new file mode 100644
index 000000000..fdc27e3c0
--- /dev/null
+++ b/src/include/drv/ioremap_selection.h
@@ -0,0 +1,21 @@
+/*
+ * The ioremap call changes names at kernel 5.6.
+ *
+ * In 5.10 we use ioremap, in older versions we use ioremap_nocache.
+ * At least on x86 the impelmentation of these functions is the same.
+ */
+
+#ifndef IOREMAP_SELECTION_H
+#define IOREMAP_SELECTION_H
+
+/* Keeping IOREMAP as a macro instead of a static inline function as
+ * the kernel has a few similar but different definitions of the argument
+ * types, and I will not wade into that here.
+ */
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 6, 0)
+#define IOREMAP ioremap_nocache
+#else
+#define IOREMAP ioremap
+#endif
+
+#endif /* IOREMAP_SELECTION_H */
diff --git a/src/include/drv/ligoPcieTiming_core.c b/src/include/drv/ligoPcieTiming_core.c
index 239578499..4e8b5129a 100644
--- a/src/include/drv/ligoPcieTiming_core.c
+++ b/src/include/drv/ligoPcieTiming_core.c
@@ -3,7 +3,7 @@
 #ifndef LIGO_PCIE_TIMING_CORE_IMPL
 #define LIGO_PCIE_TIMING_CORE_IMPL
 #include "ligoPcieTiming.h"
-#include "ligo_ioremap.h"
+#include "ioremap_selection.h"
 
 /// Convert fractional part of 2^32 Hz LPTC timing counter to microseconds 
 /// \param clock_ticks_2_32_hz fractional time as reported by LPTC
@@ -31,7 +31,7 @@ lptcInit( CDS_HARDWARE* pCds, struct pci_dev* lptcdev )
     printk( "Xilinx enabled status = %d\n", status );
     pci_read_config_dword( lptcdev, PCI_BASE_ADDRESS_0, &pci_io_addr );
     pci_io_addr &= 0xfffffff0;
-    addr = (char*)LIGO_IOREMAP( (unsigned long)pci_io_addr, 0x2000 );
+    addr = (char*)IOREMAP( (unsigned long)pci_io_addr, 0x2000 );
     printk( "Xilinx mapped  = 0x%x   0x%p\n", pci_io_addr, addr );
     pCds->lptc[ card ] = (unsigned int*)addr;
 
diff --git a/src/include/drv/ligo_ioremap.h b/src/include/drv/ligo_ioremap.h
deleted file mode 100644
index 852997351..000000000
--- a/src/include/drv/ligo_ioremap.h
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- * The ioremap call changes names.
- *
- * In 5.10 we use ioremap, in older versions we use ioremap_nocache
- */
-
-#ifndef ADVLIGORTS_LIGO_IOREMAP_H
-#define ADVLIGORTS_LIGO_IOREMAP_H
-
-#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 6, 0)
-#define LIGO_IOREMAP ioremap_nocache
-#else
-#define LIGO_IOREMAP ioremap
-#endif
-
-#endif /* ADVLIGORTS_LIGO_IOREMAP_H */
diff --git a/src/include/drv/spectracomGPS.c b/src/include/drv/spectracomGPS.c
index 147f8e435..7aa0af2b5 100644
--- a/src/include/drv/spectracomGPS.c
+++ b/src/include/drv/spectracomGPS.c
@@ -8,7 +8,7 @@
 ///<    TSync-PCIe Manual</a>
 
 #include "spectracomGPS.h"
-#include "ligo_ioremap.h"
+#include "ioremap_selection.h"
 
 // *****************************************************************************
 /// \brief Initialize TSYNC GPS card (model BC635PCI-U)
@@ -41,7 +41,7 @@ spectracomGpsInitCheckSync( CDS_HARDWARE*   pHardware,
     pci_io_addr &= 0xfffffff0;
     printk( "TSYNC PIC BASE 0 address = %x\n", pci_io_addr );
 
-    addr1 = (unsigned char*)LIGO_IOREMAP( (unsigned long)pci_io_addr, 0x30 );
+    addr1 = (unsigned char*)IOREMAP( (unsigned long)pci_io_addr, 0x30 );
     printk( "Remapped 0x%p\n", addr1 );
     pHardware->gps = (unsigned int*)addr1;
     pHardware->gpsType = TSYNC_RCVR;
diff --git a/src/include/drv/symmetricomGps.c b/src/include/drv/symmetricomGps.c
index 1b86374cd..911ef1868 100644
--- a/src/include/drv/symmetricomGps.c
+++ b/src/include/drv/symmetricomGps.c
@@ -1,5 +1,5 @@
 #include "symmetricomGps.h"
-#include "ligo_ioremap.h"
+#include "ioremap_selection.h"
 
 // *****************************************************************************
 /// Initialize Symmetricom GPS card (model BC635PCI-U)
@@ -22,7 +22,7 @@ symmetricomGpsInit( CDS_HARDWARE* pHardware, struct pci_dev* gpsdev )
     pci_io_addr &= 0xfffffff0;
     printk( "PIC BASE 2 address = %x\n", pci_io_addr );
 
-    addr1 = (unsigned char*)LIGO_IOREMAP( (unsigned long)pci_io_addr, 0x40 );
+    addr1 = (unsigned char*)IOREMAP( (unsigned long)pci_io_addr, 0x40 );
     printk( "Remapped 0x%p\n", addr1 );
     pHardware->gps = (unsigned int*)addr1;
     pHardware->gpsType = SYMCOM_RCVR;
@@ -32,7 +32,7 @@ symmetricomGpsInit( CDS_HARDWARE* pHardware, struct pci_dev* gpsdev )
     pci_read_config_dword( gpsdev, PCI_BASE_ADDRESS_3, &pci_io_addr );
     pci_io_addr &= 0xfffffff0;
     addr3 =
-        (unsigned char*)LIGO_IOREMAP( (unsigned long)pci_io_addr, 0x200 );
+        (unsigned char*)IOREMAP( (unsigned long)pci_io_addr, 0x200 );
     printk( "PIC BASE 3 address = 0x%x\n", pci_io_addr );
     printk( "PIC BASE 3 address = 0x%p\n", addr3 );
     dramRead = (unsigned int*)( addr3 + 0x82 );
diff --git a/src/include/drv/vmic5565.c b/src/include/drv/vmic5565.c
index 080a8f84c..de1635de6 100644
--- a/src/include/drv/vmic5565.c
+++ b/src/include/drv/vmic5565.c
@@ -9,7 +9,7 @@
 ///<    Manual</a>
 
 #include "vmic5565.h"
-#include "ligo_ioremap.h"
+#include "ioremap_selection.h"
 
 // *****************************************************************************
 /// \brief Routine to initialize VMIC RFM modules. \n
@@ -35,7 +35,7 @@ vmic5565Init( CDS_HARDWARE* pHardware, struct pci_dev* rfmdev )
     pci_read_config_dword( rfmdev, PCI_BASE_ADDRESS_3, &pci_io_addr );
     // Map full 128 MByte new cards only
     pHardware->pci_rfm[ devNum ] =
-        (long)LIGO_IOREMAP( (unsigned long)pci_io_addr, 128 * 1024 * 1024 );
+        (long)IOREMAP( (unsigned long)pci_io_addr, 128 * 1024 * 1024 );
     // Allocate local memory for IPC DMA xfers from RFM module
     pHardware->pci_rfm_dma[ devNum ] = (long)pci_alloc_consistent(
         rfmdev, IPC_BUFFER_SIZE, &rfm_dma_handle[ devNum ] );
@@ -44,7 +44,7 @@ vmic5565Init( CDS_HARDWARE* pHardware, struct pci_dev* rfmdev )
     // Find the RFM control/status register
     pci_read_config_dword( rfmdev, PCI_BASE_ADDRESS_2, &csrAddress );
     printk( "CSR address is 0x%x\n", csrAddress );
-    csrAddr = LIGO_IOREMAP( (unsigned long)csrAddress, 0x40 );
+    csrAddr = IOREMAP( (unsigned long)csrAddress, 0x40 );
 
     p5565Csr[ devNum ] = (VMIC5565_CSR*)csrAddr;
     // pHardware->rfm_reg[devNum] = p5565Csr;
@@ -75,7 +75,7 @@ vmic5565Init( CDS_HARDWARE* pHardware, struct pci_dev* rfmdev )
     // Find DMA Engine controls in RFM Local Configuration Table
     pci_read_config_dword( rfmdev, PCI_BASE_ADDRESS_0, &dmaAddress );
     printk( "DMA address is 0x%ux\n", dmaAddress );
-    dmaAddr = LIGO_IOREMAP( dmaAddress, 0x200 );
+    dmaAddr = IOREMAP( dmaAddress, 0x200 );
     p5565Dma[ devNum ] = (VMIC5565DMA*)dmaAddr;
     // pHardware->rfm_dma[devNum] = p5565Dma[devNum];
     printk( "5565DMA at 0x%lx\n", (unsigned long int)p5565Dma[ devNum ] );
-- 
GitLab