Provide compatibility iowrite32() and ioread() for old sparc32
authorproski <proski@0192ed92-7a03-0410-a25b-9323aeb14dbd>
Sun, 24 May 2009 06:14:18 +0000 (06:14 +0000)
committerproski <proski@0192ed92-7a03-0410-a25b-9323aeb14dbd>
Sun, 24 May 2009 06:14:18 +0000 (06:14 +0000)
32-bit sparc only gets those functions in Linux 2.6.18.

git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@4028 0192ed92-7a03-0410-a25b-9323aeb14dbd

ath_hal/ah_osdep.h

index 8360e8a5b7351843d1f357fbc403fdc9342866e3..abe60faf184c0d5f6e25eb69a41aa97328630ce3 100644 (file)
@@ -123,6 +123,16 @@ struct ath_hal_rf *const *ah_rfs_ptrs[] = {                        \
 #endif
 #endif                         /* AH_BYTE_ORDER */
 
+/* 32-bit sparc gets iowrite32() and ioread32() in Linux 2.6.18 */
+#if (defined(CONFIG_SPARC32) && (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18)))
+#ifndef iowrite32
+#define iowrite32(_val, _addr) writel(_val, _addr)
+#endif
+#ifndef ioread32
+#define ioread32(_addr) readl(_addr)
+#endif
+#endif
+
 /*
  * The HAL programs big-endian platforms to use byte-swapped hardware registers.
  * This is done to avoid the byte swapping needed to access PCI devices.