Remove endian swapping abstraction

All supported kernels (and since 4.10) emit data in big endian. This
removes the run time abstraction and uses htobe32 unconditionally.

Signed-off-by: Joel Stanley <joel@jms.id.au>
Change-Id: Ibdfae6b7b958c876e4ab0c89ecb130ec58ce2fac
diff --git a/targeting.hpp b/targeting.hpp
index 6d86b50..0ddae26 100644
--- a/targeting.hpp
+++ b/targeting.hpp
@@ -20,8 +20,6 @@
 constexpr auto fsiSlaveBaseDirOld =
     "/sys/devices/platform/fsi-master/slave@00:00/hub@00/";
 
-typedef uint32_t (*swap_endian_t)(uint32_t);
-
 /**
  * Represents a specific P9 processor in the system.  Used by
  * the access APIs to specify the chip to operate on.
@@ -34,12 +32,9 @@
      *
      * @param[in] - The logical position of the target
      * @param[in] - The sysfs device path
-     * @param[in] - The function pointer for swapping endianness
      */
-    Target(size_t position, const std::string& devPath,
-           const swap_endian_t swapper) :
-        pos(position),
-        cfamPath(devPath), doSwapEndian(swapper)
+    Target(size_t position, const std::string& devPath) :
+        pos(position), cfamPath(devPath)
     {
     }
 
@@ -71,16 +66,6 @@
      */
     int getCFAMFD();
 
-    /**
-     * Returns correct byte-order data. (May or may not swap it depending
-     * on the function received during construction from Targeting and the
-     * host endianness).
-     */
-    inline uint32_t swapEndian(uint32_t data) const
-    {
-        return doSwapEndian(data);
-    }
-
   private:
     /**
      * The logical position of this target
@@ -96,11 +81,6 @@
      * The file descriptor to use for read/writeCFAMReg
      */
     std::unique_ptr<openpower::util::FileDescriptor> cfamFD;
-
-    /**
-     * The function pointer for swapping endianness
-     */
-    const swap_endian_t doSwapEndian;
 };
 
 /**