Fix compiling on non-MIPS platforms
authorproski <proski@0192ed92-7a03-0410-a25b-9323aeb14dbd>
Thu, 13 Dec 2007 02:08:52 +0000 (02:08 +0000)
committerproski <proski@0192ed92-7a03-0410-a25b-9323aeb14dbd>
Thu, 13 Dec 2007 02:08:52 +0000 (02:08 +0000)
Define dma_cache_wback_inv(), move compatibility definitions before they
are needed.

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

ath/if_ath_ahb.h

index a6f8b4d246695b2b9feca4d148ade7e3207310ea..d32abe238a78b5726ced066d6adcca2925786c93 100644 (file)
 
 #define AR531X_BD_MAGIC 0x35333131   /* "5311", for all 531x platforms */
 
+/* Allow compiling on non-mips platforms for code verification */
+#ifndef __mips__
+#define CAC_ADDR(addr) (addr)
+#define UNCAC_ADDR(addr) (addr)
+#define KSEG1ADDR(addr) (addr)
+#define dma_cache_wback_inv(start,size)        \
+       do { (void) (start); (void) (size); } while (0)
+#endif
+
 /* set bus cachesize in 4B word units */
 static __inline void bus_dma_sync_single(void *hwdev, dma_addr_t dma_handle,
        size_t size, int direction)
@@ -135,11 +144,4 @@ void bus_free_consistent(void *, size_t, void *, dma_addr_t);
 
 #define sysRegRead(phys)      (*(volatile u_int32_t *)phys)
 
-/* Allow compiling on non-mips platforms for code verification */
-#ifndef __mips__
-#define CAC_ADDR(addr) (addr)
-#define UNCAC_ADDR(addr) (addr)
-#define KSEG1ADDR(addr) (addr)
-#endif
-
 #endif    /* _DEV_ATH_AHB_H_ */